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: 

Do BADIs get triggered while doing BDC in background?

0 Kudos
331

Hello All,

A small doubt. I have an active implementation for BADI DELIVERY_PUBLISH, which gets triggered when I do a Goods Issue. I have put a break point there and it stop at the break point for Goods Issue.

However, when I do a Goods Issue using BDC (in foreground or background), I dont find the breakpoint getting triggered.

Now, I am confused whether the BADI gets triggered at all during a BDC call. Or is it just that the BADI gets triggered but the cursor doesn't stop at the break point? I guess its an elementary doubt.

Kindly help me.

Thank you,

Johnson

1 ACCEPTED SOLUTION

Former Member
0 Kudos
171

I would expect the BADI to be executed. The best way to find out is add the following code.

data field.

do.

if not field is initial.

exit.

endif.

enddo.

Then run the program in the background. You should then see this running via SM51, you can then capture it in debug mode and change the value of field to 'X' to come out of the loop.

2 REPLIES 2

Former Member
0 Kudos
172

I would expect the BADI to be executed. The best way to find out is add the following code.

data field.

do.

if not field is initial.

exit.

endif.

enddo.

Then run the program in the background. You should then see this running via SM51, you can then capture it in debug mode and change the value of field to 'X' to come out of the loop.

Clemenss
Active Contributor
0 Kudos
171

Hi Johnson,

generally there is no difference with foreground and background. But a brekpoint will not interrupt in background because background means there is no connection to any terminal with SAPGUI for debug process.

If you want to know for sure,

enter this code at the beginning of your BADI:


Data: xyz.
while xyz is initial.
endwhile.

Start your job/transation/bdc. From SM50, you can see the process waiting in its endless loop.Via Menu Program - debug or in SM37 Job overview Job - catch active job you can enter the debugger.

Set any value to xyz and step forward.

DO NOT FORGET TO REMOVE THIS SEQUENCE!

Regards,

Clemens