Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to debug a BADI

Former Member
16,281

Can someone please post the steps needed to debug a BADI.

How do we see the source code for a BADI to add the breakpoints, Please note i am not an abaper so baby steps would really be good.

Please dont refer me to documents and Links as i have posted this after plenty of googling and reading documents and not finding a straight answer.

MC

4 REPLIES 4

Former Member
0 Kudos
3,046

Hi,

take in SE18 the BADI, choose the method you need and set an breakpoint.

Regards, dieter

Former Member
3,046

Hi,

1. Go to the TCode SE24 and enter CL_EXITHANDLER as object type.

2. In 'Display' mode, go to 'Methods' tab.

3. Double click the method 'Get Instance' to display it source code.

4. Set a breakpoint on 'CALL METHOD cl_exithandler=>get_class_name_by_interface'.

5. Then run your transaction.

6. The screen will stop at this method.

Now you can debug the required BADI's for the transaction.

Hope this helps

Regards

Shiva

0 Kudos
3,046

Hi,

The above reply holds good when U dont know the BADI being used.

When U know the Badi, the following process ll help:

Go to SE18>click radio button-badi name>give the badi name

then click the option 'enhancement implementation' in the menu bar-->select 'overview'.

U ll be directed to the implementations available for the badi.

select the required implementation(double click).

then go to 'interface' tab.

U ll find the methods available.

double click the required method, if any code has been written for that method, U ll see that.

there U can place a break point, if u want to debug that method in that implementation.

The implementation required and the method required can be searched by the naming convention.

this can help you. Try on some badi first to see the code. then search for the exact implementation and method.

Former Member
0 Kudos
3,046

Hi ,

in ur badi u can place breakpoint two type of break points are there if you are triggring badi form a webdynpro application then place external breakpoint otherwise use internal breakpoint or start debugging your program whenever ur badi id triggred it will stop there at where you put breakpoint.

thnaks,

Girish