An easy technique to find BADI or Exit in standard SAP program is by using the class \’CL_EXITHANDLER\’.
Please find below an example on how to find BADI\’s or Exits which are available when the transaction VA03 is execute.
Step 1:
Go to transaction code SE24 and display the class \’CL_EXITHANDLER\’.
Step 2:
Double click on the method \’GET_INSTANCE\’.
Step 3:
Set a break point (or external breakpoint) just after the method \’CL_EXITHANDLER=>GET_CLASS_NAME_BY_INTERFACE\’ (please refer to below screenshot).
The variable \’EXIT_NAME\’ (underline in the screenshot) will contain the name of the BADI or Exit.
Step 4:
Now we will check how to get the BADI or Exit name, execute transaction VA03 (or any other standard transaction you want to find BADI or Exit). If the above steps have been done correctly, the debugger will open and it will stop at the breakpoint set up above.
In the debugger, enter the variable \’EXIT_NAME\’ and the variable \’EXIT_NAME\’ will return the name of the BADI/Exit available when transaction code VA03 was execute. For example, in the screenshot above, we can noticed that the first BADI encountered is \’BADI_SD_SALES\’.
Press \’F8\’ to view all other BADI\’s/Exit\’s available when transaction VA03 was executed.
For the example above, the following BADI\’s/Exits was found:
- BADI_SD_SALES
- BADI_SD_SALES_BASIC
- UKM_R3_ACTIVATE
- UKM_FILL
Information:
CL_EXITHANDLER is the class which contains the Ext. Services Within Framework of Exit Technique and is used in the enhancement framework. The class \’CL_EXITHANDLER \’ has the method \’GET_INSTANCE\’ which is used to trigger BADI\’s from the standard SAP program. Thus, each time a standard program which contains BADI\’s/Exit\’s is executed, the method \’GET_INSTANCE\’ is triggered and we can find BADI/Exit used by the standard program.