Enhancements: User Exits

 User Exits:

  • User Exits are Modifications. We enhance the SAP functionalities in SAP namespace.
  • They are only available in SAP SD(Sales&Distribution) Module.
  • They are available in the form of subroutines.
  • The most important user exits related to sales order are available in program MV45AFZZ.

Ways to find User-Exit:

1.Check the documentation of the program.

2.Search for the statement - PERFORM USEREXIT.

3.Search in package - VMOD


 1.Check the documentation of the program.

Steps:.

1.Goto VA01--System-- Status


2.Double click on Program.


User Exits are available in the above includes  and the most common one is MV45AZZ.

Double click on 'MV45AFZZ' and you can read the documentation of user exits.


2.Search for the statement - PERFORM USEREXIT.

Goto VA01--System--status-Double click on program

Click on 'Find' icon and search for 'PERFORM USEREXIT.


3.Search in package - VMOD

Goto SE80--Enter pakage 'VMOD' and press 'ENTER'.

The user exits are starts with the program name. Eg:prog name SAPMV45A and user exits related to program starts with MV45AFZZ.

 

Example:

X- new data , Y-old data, Update indicator : I ---Insert, U --- Update or change and D--- Delete

While creating the Sales order through 'VA01', populating error message If Quantity is more than 100 for each line items.

USEREXIT_SAVE_DOCUMENT_PREPARE

DATAlv_flag  TYPE boolean,
      ls_xvbap TYPE vbapvb.

LOOP AT xvbap INTO ls_xvbap WHERE updkz NE 'D'.

  IF  ls_xvbap-kwmeng  > '100.000'.
    MESSAGE  'Order Quantity can not be greater than 100'  TYPE 'I'.
    lv_flag 'X'.
    EXIT.
  ENDIF.
ENDLOOP.
IF lv_flag 'X'.
  LEAVE TO SCREEN sy-dynnr"Current screen number
ENDIF.


 

Comments

Popular posts from this blog

CDS Views: Table Functions with Example

Passing Dynamic Variables to SO10 TEXT

Adobe Form/PDF Form Introduction