Find SAP BADI triggered from a SAP transaction, also find tcode from BADI name

The following simple steps will allow you to find all BADI's that are called when you execute a specific SAP transaction code. Once you have found the BADI name you can view its full details and implement it via SAP transaction SE18.

If you only have the BADI name the last section will also help you find where the BADI is triggered from.

Use SAP function module SXV_GET_CLIF_BY_NAME to find BADI

1. Execute transaction SE37 or SE80 and find function module 'SXV_GET_CLIF_BY_NAME'.
2. Insert a breakpoint in it.
3. Now go to the SAP transaction you want to find a BADI in.
4. When you execute it, it will stop at the above function module.
5. Look at the value of field EXIT_NAME.
6. This will provide you with the name of the BADI that is available in your SAP transaction code.

Use SAP method GET_INSTANCE of class CL_EXITHANDLER to find BADI

Another way to find which BADI's are executed from a specific transaction is to place a break-point within method 'GET_INSTANCE' of class 'CL_EXITHANDLER'. To do this use the following steps

1. Execute the class builder transaction SE24
2. Enter the class name 'CL_EXITHANDLER' and press display
3. Once within the class simply double click on the method GET_INSTANCE
4. Place a session breakpoint on the first executable line of ABAP code.
   i.e. CALL METHOD cl_exithandler=>get_class_name_by_interface
5. Execute the transaction you want to find a BADI in
6. For example if you now execute PA30 the code will stop at the break point and disaply the following information with variable HRPADAUTH_AC_UNIT containing the name of your BADI.

7. To find more in this transaction simply press the execute(F8) button and the break-point will be triggered again if a second BADI is called, keep doing this until all have been found.

Help finding SAP Transactions a BADI may be triggered from

This is not an exact science but may help you locate where a BADI is triggered from

1. Execute the BADI transaction SE18, enter BADI name and press display

2. Within the properties tab you should see the package associated with the BADI (i.e. SZAD). Simply copy it or remember it.
3. Now go to tcode SE80 and select package as the repository browser object type

4. Enter the package name from the BADI properties (i.e. SZAD)

5. Now expand the transactions node and you will see all the tcodes assiciated with this package, one of which will probably execute this BADI.

6. Also note all the other objects within this package including programs, includes, function modules etc as well as a full list of other classic BADi's and enhancement spots.

BADI related articles
  Find which BADI's are triggered within a SAP transaction
  Classic BADI enhancement
  Multiple Use BADI's
  Classic BADI with filter
  Migrated BADI to enhancement
  All SAP Enhancement

sapdev logo background
sapdev logo sapdev logo

Can't find something on ERPWorkbench? A quick search should fix that: