Learn SAP — Debug Background Jobs — SM37

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.

 job-debug-01

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.

job-debug-02

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.

Advertisements

One thought on “Learn SAP — Debug Background Jobs — SM37

  1. in another way also we can debug a program running in back ground.
    schedule a job in back ground and go to tcode – sm51 – we can find our respective job running there.
    select the line item of our program – and go to main menu – you will find – PROGRAM / SESSION tab – select the same – you can go to DEBUG screen directly or even u can cancel the scheduled job.

    regards
    SG

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s