‎2007 Jun 25 9:23 AM
Hi Experts,
How to debug the program in background.
Thanks in Advance
Regards,
IFF
‎2007 Jun 25 9:26 AM
Goto SM51-> keep a cursor on user running program in background.
Then program/mode ->program ->debugging.
Alternatively what you can do it.. add few WRITE statements in your program where you want to check your values. Once program is finished.
Goto SM37 and check spool for the user. You will see value populated in your program.
‎2007 Jun 25 9:25 AM
Hi
Debugging a program running in background in not possible as far as I know.
Regards
Navneet.
‎2007 Jun 25 9:25 AM
HI,
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.
Thanks.
‎2007 Jun 25 9:26 AM
Goto SM51-> keep a cursor on user running program in background.
Then program/mode ->program ->debugging.
Alternatively what you can do it.. add few WRITE statements in your program where you want to check your values. Once program is finished.
Goto SM37 and check spool for the user. You will see value populated in your program.
‎2007 Jun 25 9:27 AM
Hi,
goto tcode SM50-- selct your process bu user name or program name>Menu bar Program/session>Program---->debugging.
Don't forget to rewar if useful......
‎2007 Jun 25 9:27 AM
hi
<b> u cannot debug the program running in background</b> at all instead u can know its status
regards
ravish
<b>dont forget to reward if useful</b>
‎2007 Jun 25 9:28 AM
Hi
You <b> Cannot.</b>
but once the job is completed in sm37 select the job and type JDBG at command box, the job will go in debug mode and show you how it was executed.
Regards
Raj
‎2020 Oct 16 4:32 PM
‎2007 Jun 25 9:29 AM
Hi,
The best way to debugg, I will not say debug as you may not know when the program is in background, you can actually use LOGGING statements in your program which will help you to analyze the program.
Regards,
Sesh