Application Development and Automation 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: 
Read only

Tips on Debugging

former_member191391
Participant
0 Likes
535

Hello frnds,

Kindly suggest me tips over debugging BADIs

and some helpful sites too

Thanks & Regards.

Manmeet

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
499

hi,

1) Goto se24 (Display class cl_exithandler)

2) Double click on the method GET_INSTANCE.

3) Put a break point at Line no.25 (CASE sy-subrc).

Now

4) Execute SAP standard transaction

5) Press the required button for which you need to write an exit logic, the execution will stop at the break point.

6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.

7) This way you will find all the BADIs called on click of any button in any transaction

if you follow this 7 steps, you will find a suitable BADI

Go to Se19 -> Badi Implementation and put a break point over there and run your transaction, there the cursor will be stoped and you will there in the debugger, and that will be a normal debugging, you can see the filed values and every thing.

Regards

Sudheer

3 REPLIES 3
Read only

Former Member
0 Likes
499

hi Manmeet,

you can do the following steps to debug the BAdI.

<b>

step1: Goto sE19 and enter the BAPI implementation name->display

step2: choose the interface tab->double click on the method which

is under consideration

step3: code as below</b>

data lv_flag.
        while flag is initial.

         endwhile.

.

<b>step4: Now activate the BAdI and execute the transaction, and do the necessary actions(save/delete etc)

step5: goto transaction sm50->you can see your program there

step6: select your program from the list->choose PROGRAM/SESSION from the

menu->Select PROGRAM->DEBUGGING</b>

you are now in the debugger with the BAdI.

Hope this helps.

Sajan Joseph.

Message was edited by:

<b>This is an infinite loop inside the BAdI; You should take this out, and re-activate the BAdI, once you are done with the debugging</b>

Sajan Joseph

Read only

Former Member
0 Likes
500

hi,

1) Goto se24 (Display class cl_exithandler)

2) Double click on the method GET_INSTANCE.

3) Put a break point at Line no.25 (CASE sy-subrc).

Now

4) Execute SAP standard transaction

5) Press the required button for which you need to write an exit logic, the execution will stop at the break point.

6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.

7) This way you will find all the BADIs called on click of any button in any transaction

if you follow this 7 steps, you will find a suitable BADI

Go to Se19 -> Badi Implementation and put a break point over there and run your transaction, there the cursor will be stoped and you will there in the debugger, and that will be a normal debugging, you can see the filed values and every thing.

Regards

Sudheer

Read only

Former Member
0 Likes
499

First thing you may want to know is whether the BADI triggers or not by putting

1. break_point command.

2. or writing some endless loop in its implementation (SE19).

3. Referring its documentation to know its functional purpose.

Thanks,

Santosh