‎2005 Nov 24 12:09 PM
Hi all,
Greetings!
How to debug the background job? If anyone knows please let me know?
And one more doubt i have if we put the <b>BREAK-POINT</b>in code and once we execute that job in background then the program will stop at that particular breakpoint level or it will execute without stopping at the breakpoint level.
Thanking you
Best Regards
Satish
Message was edited by: satish chowdary
‎2005 Nov 24 12:25 PM
Hi satish,
The easiest way is to build an endless loop in your program. Then use transaction SM50, select the workprocess and go via the menu program/session->program->debugging. Set the variable to leave the loop and enjoy the debugging.
Regards,
John.
‎2005 Nov 24 12:23 PM
Hi Satish.
In transaction sm37 you can mark your job. In the command field you can enter the command jdbg (jobdebugging) without a /h. Then you come into your program and system beheaves as it does in background.
Hope this helps.
wbr
Michael
‎2005 Nov 24 12:25 PM
Hi satish,
The easiest way is to build an endless loop in your program. Then use transaction SM50, select the workprocess and go via the menu program/session->program->debugging. Set the variable to leave the loop and enjoy the debugging.
Regards,
John.
‎2005 Nov 25 1:18 AM
‎2005 Nov 25 10:15 AM
Hi,
You can see note 573128 - Debugging programs in the background:
Symptom
How can you debug a program that runs in the background?
Other terms
Background, job
Reason and Prerequisites
Information on troubleshooting
Solution
There are 3 options:
1. In SM37, select a job that has not yet been started (status 'planned' or 'released'). In addition, set a breakpoint at the point in the source code that you want to analyze when debugging. In SM37, enter JDBG in the OK code field, and select ENTER. The selected job is now started in debug mode, and the debugger initially stops in a system program. Select F8 to continue the job up to the next breakpoint.
Caution: After debugging, the job still appears in SM37 as 'planned' or 'released', but the entire job (or, more specifically, a copy of it) ran during debugging, and possible database changes are effective as a result of the job.
1. You can catch a current batch job by using SM37 (Catch active job) or SM50 (Debug program). To do this, you must be logged on to the instance on which the job is running. The job is then stopped, and you can keep it running in the debugger.
2. Use SM36 to create a job with two steps, step 1 with the BTCLOOP report and step 2 with the report to be debugged. Then release the job.
You can then debug the job in Transaction SM50. To do this, exit the endless loop in the BTCLOOP report by changing the variable i. "
Regards,
Maria João Rocha
‎2005 Nov 25 10:20 AM
‎2005 Nov 25 10:40 AM
Hi
Select the corresponding job and type jdbg in the command window for debugging...
The system will not stop at the static break points / dynamic break points while processing in background...
Regards,
Abdul
‎2005 Nov 25 12:22 PM
Hi, when I want to debbug um backgroung, I always make it like this:
At first I put a DO into the code, for the program to stop there
data: vl_1.
DO .
if v_1 = 'X'. exit. endif .
ENDDO.
So, the program is gonna stop in this loop, and you know the exactly point that you will deddug, because the deddug in background stops in anywhere into the program.
So You go to the SM50, find out your procces, and select the following menu Program/Mode --> Program --> debbug.
I hope it help you.
Alexandre Nogueira.