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 batch jobs in active condition

Former Member
0 Likes
995

Hi All,

How can i debug atch jobs which are in active mode?

null

7 REPLIES 7
Read only

Former Member
0 Likes
911

You can debug batch jobs by going to 'SM37', select the active job and type in 'JDBG' in the command line ( no '/' )

check this below link also..

may be helpful for you

Read only

Former Member
0 Likes
911

Hi,

You can use transaction SM50. Select the corresponding work process for the background job and then go to menu (there is submenu for debugging).

Sorry, I don't have SAP system now and can not tell you exact path.

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
911

As ferry said,

may be this is the path to fallow....

from SM50 transaction.

From menu - program/mode - Program - debugging.

Read only

0 Likes
911

Just to reinforce what the others have said....

You can do it in SM50, the path is actually Program/Session -> Program -> Debugging. I assume that you have found it.

Also, if you want to start debuggin at a particular place, there is a little trick to doing so. Say you want to debug at the very beginning of the program, but if you submit the program, it will most likely be past that point when you get to SM50. To get around this, you can implement an endless loop. Of course, the program would have to be custom.

while sy-subrc = 0.
  check sy-subrc  = 0.
endwhile.

so you put his code in the place where you want to start debuggin, then go to SM50, select the process in which the program is running and turn on debugging. It will be in the WHILE loop. simply change the value of SY-SUBRC and it will come out of the loop, now you can continue debugging your program.

Hope this helps.

Regards,

RIch Heilman

Read only

0 Likes
911

I tried sm37 -> select job -> jdbg . but its not working for me.iam getting a message " Job is active. Debugging is not possiblenot possible" .

null

Read only

0 Likes
911

check with SM50...

Read only

0 Likes
911

sm50 is also not working .