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: 

Debug

Former Member
0 Kudos
85

Hi,

How to debug a program, that runs in background only ?

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
40

You can debug very easily if your program that you want to debug is a custom program. You can put an endless loop in the code somewhere.

WHILE SY-SUBRC = 0.

CHECK SY-SUBRC = 0.

ENDWHILE.

Now go to SM50, select the work process that is running the program. Click Program/Session->Program->Debugging, it will then open the debugger and you will be looping at your endless loop. Change the value of SY-SUBRC to get out of the loop and debug as normal.

Regards,

Rich HEilman

2 REPLIES 2

MariaJoãoRocha
Contributor
0 Kudos
40

Hi,

Please see:

Regards,

Maria João Rocha

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
41

You can debug very easily if your program that you want to debug is a custom program. You can put an endless loop in the code somewhere.

WHILE SY-SUBRC = 0.

CHECK SY-SUBRC = 0.

ENDWHILE.

Now go to SM50, select the work process that is running the program. Click Program/Session->Program->Debugging, it will then open the debugger and you will be looping at your endless loop. Change the value of SY-SUBRC to get out of the loop and debug as normal.

Regards,

Rich HEilman