sapdev logo background
sapdev logo sapdev logo
Comments

Find a SAP BADI called from within an SAP transaction



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.

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.



comments powered by Disqus


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