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

CALL FUNCTION STARTING NEW TASK Debug

Former Member
0 Likes
8,324

Hi,

How can you debug a function module which is called with an add on 'STARTING NEW TASK' ?

Thank you.

6 REPLIES 6
Read only

Former Member
0 Likes
3,679

This message was moderated.

Read only

0 Likes
3,679

Hi,

the only way i know is :

1. Create an endless loop in the FM like:

clear x.


do.
 if x = 1. exit. endif.
enddo.

Now run the program. If you call the sm50 trx you'll see a new task : your function module. Now get the session in debug (Menu Program/Sessio -> Program -> Debugging) and change the x value to exit form the loop. Continue with the debug.

Regards

Andrea

Read only

0 Likes
3,679

Thank you for the input. What if I plan to do the debugging in a non development box. Is there a way to directly trigger the debugger screen once you call the function module ?

Read only

3,679

Use BREAK-POINT command in your function module.

Regards

~Satya

Read only

ThangaPrakash
Active Contributor
0 Likes
3,679

Hi,

Try to turn on the system and update debugging and try.

I too had the problem and i used the same to debug the function module.

In debugger screen, Goto settings -> Display/change debugger settings -> check on System and update debugging.

Regards,

Thanga Prakash T

Read only

Former Member
0 Likes
3,679

Keep a session break point before the function module call and and external break point inside the fm.

Then once the debugger starts,check the flag 'Block TRFC Sending / TRFC: Block Sending' in the debugger(Go to settings ->change debugger settings, this flag should be under Debug type if i remember correctly).

Then execute the FM.

Go to SM58, press F8, the fm should be visible there. Select the FM, go to edit and select 'debug luw'...Here you will have to go through some std. sap code before the FM and this is where the 2nd break point comes into play,Press F8, it will go right into your fm and you can debug from there.