How to Find User Exits in ABAP Codes of SAP Transaction
In this SAP ABAP tutorial, I'll try to show how to find function module exit (function exit or user exits) in ABAP codes of a SAP transaction.
First start with answering what is user exit?
User exit is a slot in ABAP code of a standard SAP program available for customer coding.
Using user exits provided by SAP for customers, ABAP developers can customize and enhance standard SAP transactions by adding custom code according to their requirements.
ABAP developers can use two methods to find user module exits in an SAP transaction.
First method uses SAP transaction SMOD (SAP Enhancements)
And the other method is searching for CALL CUSTOMER-FUNCTION in SAP transaction ABAP program.
Find Function Module User Exit on VF02 using SMOD
First call transaction VF02. Provide a valid billing document number and press enter to display billing document data.
When billing document data is being displayed in VF02 transaction screen, choose System > Status... from screen menu.
In System Status screen, you will see the active transaction (VF02 in this case) and the ABAP program SAPMV60A running behind the VF02 screen.
Double click on the screen program name (SAPMV60A) to display the ABAP codes executing behind this VF02 transaction screen.
When the ABAP report is displayed, choose Goto > Attributes from top menu options.
When the ABAP program attributes is displayed, copy the program package name. In our case the ABAP report package is VF.
Then exit from the current transaction and go to main SAP screen.
Call SAP transaction SMOD (SAP Enhancements transaction).
Highlight Enhancement input text area and click Find button.
Provide the package name we have copied in previous steps into the Package search criteria and press F8 or Execute button.
Here is the list of user exits in VF package.
Double click on V60A0001 to see the function module exist in SAP Enhancement V60A0001
ABAP developers can double click on the function module name EXIT_SAPLV60A_002 given in the function module exits section to see the user exit codes.
Find User Exits on VA02 by Searching CALL CUSTOMER-FUNCTION
Now we will try to find out the user exits in VA02 transaction screen.
Just as on the first method call VA02 tcode with a valid sales document number.
Open the System Status screen using menu options System > Status...
And then go to the ABAP program running behind VA02 transaction screen by double click on the Program (screen) text area in repository data.
For VA02 transaction the screen program is SAPMV45A
When the ABAP report is displayed, click on Find button to make a search within the ABAP program codes.
When the Find/Replace screen is shown, enter text "CALL CUSTOMER-FUNCTION" in Find textbox and choose option "In main program" in Programs to Be Included section.
Then press enter to list where the Customer-Function call is executed in the ABAP program.
As shown in the below screenshot, there a numerous Customer Function calls in VA02 screen ABAP program.
Click on one of them to see where the call exists in the ABAP source code.
Then on the CALL CUSTOMER-FUNCTION ABAP code line, double click on user exit number text to display the user exit definition.