Find BAdI for ABAP Program and Display Implementation Class Code
In this ABAP tutorial for developers we will see how to find BAdI implementations and display BAdI implementation class ABAP source codes for any ABAP program or SAP transaction code.
First, for ABAP developers tutorial shows how to find BAdI (Business Add-In) for an SAP program or a SAP transaction code.
Then programmers can use the ABAP function module SXV_GET_CLIF_BY_NAME from Business Add-In Administration Module function group to find the BAdI names used in the target ABAP program or SAP transaction.
Finally, using SE18 ABAP BAdI Builder tool, programmers can display ABAP codes for class methods of the BAdI implementation.
Find BAdI for SAP Program or Transaction Code
Using SE37 tcode, launch Function Builder editor and display SXV_GET_CLIF_BY_NAME function module.
Put a break point at CALL FUNCTION 'SXV_ADD_PREFIX' code line.
Then launch target SAP transaction code or ABAP program.
When the break point is hit on ABAP debugger tool, for example for VA02 tcode the debugger will hit at following values
The Exit_Name is the BAdI name
The CLIF is the class name for the BAdI
In my example, the ABAP function module is hit 5 times with following values in ABAP debugger tool.
NAME BADI_SD_SALES
PREFIX CL_EX_
CLIF CL_EX_BADI_SD_SALES
NAME BADI_SD_SALES_BASIC
PREFIX CL_EX_
CLIF CL_EX_BADI_SD_SALES_BASIC
NAME UKM_R3_ACTIVATE
PREFIX CL_EX_
CLIF CL_EX_UKM_R3_ACTIVATE
NAME UKM_FILL
PREFIX CL_EX_
CLIF CL_EX_UKM_FILL
NAME BADI_MATN1
PREFIX CL_EX_
CLIF CL_EX_BADI_MATN1
Display ABAP Codes of a BAdI
To display ABAP source codes of a BAdI, developers can use the SE18 (BAdI Builder) SAP transaction
Launch SE18 and type the BAdI name in the relevant input textbox then click on Display button
Using top menu, click on Implementation > Overview
This menu option will enable ABAP developer to list all implementations of the BAdI definition
Select the related implementation and double-click on it to display implementation details.
When the implementation details screen is displayed, switch to Interface tab. The list of ABAP class methods for the interface will be shown on a table view.
Double click on the method name to see ABAP codes running behind the class method.