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

Debug

Former Member
0 Likes
505

Hi,

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

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
460

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

MariaJooRocha
Contributor
0 Likes
460

Hi,

Please see:

Regards,

Maria João Rocha

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
461

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