How to find User Exits in SAP ABAP

0
2149

[adsenseyu2]

After knowing about user exits in sap abap, its time to find one and implement it. As you know user exits mostly exits in Sales and distribution module.Lets take a sample scenario and try to implement user exist.

Scenario
While creating a sales order in VA01, you need to through a error message if the quantity of order is      > 100.00. To find the user exits available while creating VA01.

Approach-1

1. Enter VA01 in command bar to go to transaction and then click on System → Status.

us3

2. Pick the program name in the below popup.

us4

3. Display the same program in SE38.In our case the program is SAPMV45A and click on search button.

us5

4. Enter the search string “USEREXIT_ ” in the below popup and click in OK.

us6

5. you will get the screen like below with search results. From them choose the correct one to write the code.You can choose the correct use exits by reading the documentation available in every subroutine.In our case i have chosen user exit USEREXIT_SALVE_DOCUMENT_PREPARE in the include MV45AFZZ.

[adsenseyu1]

Approach-2

1. Go to SE80, select Package and put VMOD and press enter. All the includes under this package contains many user exits and choose the correct one to fit your requirement.

User Exit in SAP
User Exit in SAP

You can choose any the above approaches to find the user exit. You can find the full documentation of each and every user exit here.

Implementation

Go to the include MV45AFZZ in SE38 and then the subroutine USEREXIT_SAVE_DOCUMENT_PREPARE to write the below code.