Debug any background process

Steven Maes
02 Jan 2003, Rating 4.17 (out of 5)

Have you ever been in a situation where you want to debug a program but the darn thing runs in background? Here is a tip that will solve all your background debugging problems. There's only one condition: You have to be able to edit the coding. Enter an endless loop at the point you want to start debugging and start the program. Go to SM50. Wait till your process will seem to be "hanging". In the menu goto Program -> debugging. You will get into your program at the code you just entered. Change variable w_flag = 'X'. Continue debugging. Good luck.



Code

do.

clear w_flag.

If w_flag = 'X'.

†† Exit.

Endif.

Enddo.

 

Debugging a background job

Efim Makhson

24 Oct 2003

Rating: -4.46- (out of 5)

How to debug background jobs? In SM37: Select the job, type JDBG in the OK-code and press enter. This can be used for both completed jobs and jobs to be processed (just make sure you have enough time to debug before the job actually starts). Breakpoints set in the job flow works. This method has been successfully used in R/3 4.6C.