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: 

Background to Debug mode

Former Member
0 Kudos

Hi,

I am running a program in Background job. But it was giving dump.

Could any one let me know how can i do debug in

background mode.

Thanks

Gopi.

1 ACCEPTED SOLUTION

andreas_mann3
Active Contributor
0 Kudos

hi,

1)insert an endless loop, with a condition that can be manipulate, into your code

2)start report in backgr.

3)go to sm50 and debug your program

4)manipulate your condition from 1) that report continues

Andreas

7 REPLIES 7

Former Member
0 Kudos

Hi Addepalli,

From dump analysis you can debug where dump has

triggered. Goto St22 transaction and check.

I think immediatly only we can check it.

best way is goto SM50 and locate your job and then in

the menu Program/Mode -> Program -> Debugging.

Hope this will help you.

Thanks&Regards,

Siri.

Message was edited by: Srilatha T

andreas_mann3
Active Contributor
0 Kudos

hi,

1)insert an endless loop, with a condition that can be manipulate, into your code

2)start report in backgr.

3)go to sm50 and debug your program

4)manipulate your condition from 1) that report continues

Andreas

Former Member
0 Kudos

Hi,

In transaction SM50, you can choose the background process running this program and cleck the menu item Program/Mode --> Program --> Debugging...

If it is a Z-Program write an endless loop(at the start of the program) with an exit condition(which does not exit normally)...so that the background process will be stuck in this loop...Then choose debugging as mentioned...then change the exit condition correctly in debugging so that you are out of the endless loop...This is for making sure that the by the time you get to SM50 the execution is not over....

Thanks & Regards,

Renjith.

Former Member
0 Kudos

Hi,

According to my knowledge, if you put a hard break point in an ABAP program and execute it in BAck ground mode, it doesn't stop there.

It means that Break point doesn't work for background execution program.

Its better you run the same by putting a Break point in online mode.

former_member188685
Active Contributor
0 Kudos

Hi In SM50 select your Program and Go to Program Debugging.

regards

vijay

former_member186741
Active Contributor
0 Kudos

a variation on some of the other answers, from transaction SM37 you can go directly to debug via job->capture active job. Again you will need it to run for some time to be able to capture it so you'll probably need to put an infinite loop in. Use of Job Capture is sometimes restricted at certain sites so you may not be able to use it.

Former Member
0 Kudos

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.