2006 Dec 02 5:34 AM
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.
2006 Dec 02 6:04 AM
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
2006 Dec 02 5:36 AM
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
2006 Dec 02 6:04 AM
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
2006 Dec 02 6:13 AM
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
2006 Dec 02 6:39 AM
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