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

how to debug a background program

Former Member
0 Likes
2,319

Hi all,

In sm37, I creat a job for my program,but I don't konw how to debug my program

when I execute the job?

Can any one tell me how to do it?

Best regards.

Thank you.

x.xu

7 REPLIES 7
Read only

Former Member
0 Likes
770

Hi,

Just refer to the below links.

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/abap+debugger&;

Reward points if useful.

Regards,

Atish

Read only

Former Member
0 Likes
770

BACKGROND PROGRAMS:you can debug the background jobs, use the command BDUG

One way of debuging programs which are already running in background is via transaction SM50. This displays a

list of process running in the server. In order to debug the program go to Menu option:

Program/Mode>Program>Debugging.

Thanks

Seshu

Read only

Former Member
0 Likes
770

Hi,

Add the following code in your pgm For creating a dummy loop.

Data: w_I type I.

w_i = 0.

Do while w_i = 0.

Enddo.

  • Since w_i is always o this will go in a loop.

Once You fire the jon in background go to SM37, select your job by ticking the checkbox, then Select option JOB from the menu bar ( 1st from left )----->Capture Active job. Noe you are in debugg mode, & pgm will halt at one of the above added statements. Change the value of w_i to say 1 so that 'endless loop' will end & pgm will proceed with code after 'Enddo'.

I hope this helps,

Regards,

Raju Chitale

Read only

Former Member
0 Likes
770

Use JDBG transaction to debugg after executing in backround

will work

Regards

Sagar

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
770

Please search before posting.

Read only

Former Member
0 Likes
770

Before anyone else jumps in, please note the date of the original question.

Rob

Read only

0 Likes
770

))))) Oops ...