At the very outset let me tell you guys that as an
Abaper (Rookie) the first object that you get to work on is to debug a Batch
job, Report, Smartform, Idoc or to do Dump Analysis. Some senior team mates in
the project even say “IF YOU KNOW DEBUGGING THEN YOU KNOW ABAP”. So Abapers’
(Especially Rookies) be good at Debugging.
Coming to debugging a batch job, first
let us know what exactly the batch job is? Let me put this way, Batch Job is a
scheduled program which runs in the background and
which doesn't require any action from the user end.
The Batch job can be scheduled in two
ways.
· One is through the T-Code : SM36.
· Second is through the Job Wizard. To
schedule a batch job through wizard, you have to execute the T-Code: SM36 and
click on Job Wizard in application bar.
Now coming to the main question how to debug a batch job?
The STATUS of the Batch Job decides the
way in which Batch Job can be debugged.
If the Batch Job is having
Scheduled/Released/Finished/Cancelled Status then we can debug the batch job
through SM37 Tcode. In SM37, the job needs to be selected first and then type “JDBG”
in the command line to start debugging. Below screen shots illustrate the way
to enter the debugging mode of a batch job.
If the Batch Job is having Ready/Active
Status then we can debug the batch job through SM51 Tcode. In SM51, the job
needs to be selected first and then click on the menu item Program/Mode -->
Program --> debugging.
We can debug the batch job even using the T-Code SM50. For that go to SM50 Tcode, select the batch job and click on the menu item Administration --> Program --> debugging.
There is one more T-Code SM35p for Batch Input Log Overview which allows you to view the Logs with/without session and SM66 is used for debugging Asynchronous update tasks.
References:
No comments:
Post a Comment