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: 

Debugiing a BackGround Job.

Former Member
0 Kudos
111

Hi All,

I am facing a problem when my program is being run in the Background. As far as i know Background Jobs can be debugged by using transaction SM50. But i am unable to.

Could anyone please provide me pointers on this or could guide me on how to debug a background job. Thanks in advance for tour replies.

Regards,

Goutham.

PS: Points will be definitely awarded.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
85

Hi Goutham

As Anversha has already mentioned, we can perform the debugging from SM50 transaction.

Steps:

1. Go to Transaction SM50.

2. <b>Select the process(check box) where your job is executing</b>.

3. Use Menupath: Program/Mode -> Program -> Debugging.

By doing this it will open a new session in debugging mode of your current execution.

<b>Also make sure that you havent occupied all sessions permitted so that the debugging window can open a new session.</b>

If the job has already finished, use transaction SM37. Display the job. Select the

job, execute command JDBG in command field. A series of

F7 need to be done until you reach your program. From

then you can debug to see how the commands are executed.

Hope the info helps you.

Kind Regards

Eswar

4 REPLIES 4

anversha_s
Active Contributor
0 Kudos
85

hi,

Debug program running in background

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.

Rgds

Anver

Former Member
0 Kudos
86

Hi Goutham

As Anversha has already mentioned, we can perform the debugging from SM50 transaction.

Steps:

1. Go to Transaction SM50.

2. <b>Select the process(check box) where your job is executing</b>.

3. Use Menupath: Program/Mode -> Program -> Debugging.

By doing this it will open a new session in debugging mode of your current execution.

<b>Also make sure that you havent occupied all sessions permitted so that the debugging window can open a new session.</b>

If the job has already finished, use transaction SM37. Display the job. Select the

job, execute command JDBG in command field. A series of

F7 need to be done until you reach your program. From

then you can debug to see how the commands are executed.

Hope the info helps you.

Kind Regards

Eswar

Former Member
0 Kudos
85

Thank you very much for your replies.

Here is my detailed question:

In the transaction SE38: i have entered the program name, say ZTEST which has a simple WRITE stmt with 'Hello World'. In SE38, i have entered the program name and i said Program -> Execute -> background, and selected Execute Immediately. After this in SM37 i can see the job status finished. In SM50, there is no entry for my background job. Only one Dialog WP is running under my name.

Could anyone please give me detailed way of debugging like any settings or options to be set.

Thanks & Regards,

Goutham

0 Kudos
85

HI Goutham

In this case, by the time you go for debugging job is already finished. So go for the option i have mentioned with SM37 that i have given above.

If you need to go by SM50 option in this case, proceed as below:

Place an infinite loop in the program, execute in background. Go to SM50, select the process. Go to menu Program/Mode -> Program -> Debugging. Which will open your program in debugging mode, change the value to exit the infinite loop and proceed with other steps.

Kind Regards

Eswar