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

Do BADIs get triggered while doing BDC in background?

Former Member
0 Likes
912

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
Read only

Former Member
0 Likes
752

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.

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

2 REPLIES 2
Read only

Former Member
0 Likes
753

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.

Read only

Clemenss
Active Contributor
0 Likes
752

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