cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to debug a function module called in background task ?

0 Likes
15,258

I have a custom function module, which is called in during a standard process at Work Order SAVE.
The FM is called by using statement : 'Call Function <FM name> in Background task'.

To analyze the issue, I need to go inside this FM during debugging when the process is executed. I have also tried endless loops as well, the flow is stuck there but it is not visible in transaction SM50. As a result, I am not able to debug the same, and also the Order is not getting opened in Change mode.

Is there any way of doing this ?

View Entire Topic
Former Member

Hi,

in de abap editor go to utilities-->settings

Then tab ABAP editor-->Debugging.

Type here the user id that is used when you call the fm in background task. Now place an external break-point in the code and reproduce the behaviour.

If the user is a background user, then temporarily change it to dialog.

Kind regards, Rob Dielemans

0 Likes

Hi Rob,

We have debugged the scenario by putting an external breakpoint in the code. But we are not able to drill down into the custom FM that is called in 'Background task'.

Regards,
Tapas

harald_lesche-holzbecher
Product and Topic Expert
Product and Topic Expert
0 Likes

Did you try setting the external breakpoint in the custom FM that is called in 'Background task'?