Showing posts with label USER_EXIT. Show all posts
Showing posts with label USER_EXIT. Show all posts

Saturday, April 23, 2022

What is ENHANCEMENTS in SAP.

 ENHANCEMENTS in SAP ABAP. 

These are used to add extra intelligence to SAP standard programs to suit the business requirements. If we want to add extra code to SAP standard programs, if we go for change mode system asks for access key. Instead of this, SAP has provided hooks where we can write the code. These hooks are enhancement spots. If a code is written in theses spots along with the normal program the code written in these spots is also executed. There are two ways to enhance the SAP standard code.

User Exits

BADIS (Business Addins)


If user exits are used one time in any project it can not be reused. But Badis can 

be used any no of times.



There are 4 types user exits.

Function module exit

Field exit

screen exit

Menu exit


Exits are defined at package level. So we want to enhance any T-code first we 

have to find out the package for that T-code. Then we have to find out the exits present in that package. For finding the exits present in a package we have to use SMOD T-code. After finding the suitable exit for writing the code we have to use CMOD T-code.


Tuesday, October 13, 2020

Billing Date validation In SAP ABAP.

Billing Date validation In SAP ABAP.

INCLUDE  RV60AFZZ 

FORM USEREXIT_ACCOUNT_PREP_KOMKCV.
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Form USEREXIT_ACCOUNT_PREP_KOMKCV, Start                                                                                                          A
*$*$-Start: (1)---------------------------------------------------------------------------------$*$*
ENHANCEMENT 1  ZAK_INVOICE_VALID.    "active version

**TYPES: BEGIN OF ty_final,
**        vbeln TYPE vbeln_vl,
**        lfdat TYPE lfdat_v,
**       END OF ty_final.
**DATA: it_final TYPE STANDARD TABLE OF ty_final,
**      wa_final TYPE ty_final.
**
**      SELECT SINGLE vbeln lfdat
**        FROM likp
**        INTO wa_final
**        WHERE vbeln = vbrp-vgbel.
**
**      IF VBRK-FKDAT < wa_final-lfdat.
**        MESSAGE 'billing Date should not be less than delivery date' TYPE 'E'.
**        fcode = 'ENT1'.
**        PERFORM FOLGE_GLEICHSETZEN(SAPMV60A).
**        SET SCREEN 6105.
**        LEAVE SCREEN.
**      ENDIF.