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.
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.
1. Enter VA01 in command bar to go to transaction and then click on System → Status.
2. Pick the program name in the below popup.
3. Display the same program in SE38.In our case the program is SAPMV45A and click on search button.
4. Enter the search string “USEREXIT_ ” in the below popup and click in OK.
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.
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.
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.
Go to the include MV45AFZZ in SE38 and then the subroutine USEREXIT_SAVE_DOCUMENT_PREPARE to write the below code.
SAPLearners.com is now on Telegram. Click here to join our channel and stay updated with the latest tutorials and updates.