In this post let us see how we can debug the Background jobs in SAP.
To setup the jobs click here.
first setup the job as mentioned in the above link. Once the job is setup go to SM37. You should see the job that you setup in sm37. See the following screen shot.
Now the job is setup and not released.
Now select the job and enter JDBG in the command center with out /n. See the following screen shot.
Once you click enter press F7 until control goes to your Z code. This is important else you will have some issues.
* Cancelled jobs can also be debugged in this way.
But please keep in mind, this is no simulation. All updates, deletes or whatever else is done in this job will be executed !
Thanks to Sadananda Chinnahalli who provided this information. He is one of the best programmer that I know and very good knowledge in SAP.