Skip to Content
avatar image
Former Member

how to debug the background job

Hi All,

one zreport is there for that background job is scheduled , now it is in production ......... in production database level the values are not properly stored,

i hope we need to check the validataion .. for that i want to debug the zreport but it is scheduled in backgroud job ..

how to Debug the zreport which is having background job?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Jun 04, 2012 at 06:51 AM

    Hi

    JDBG - Job Debug

    This is basically for the job has finished execution. This will simulate the exact background scenario with the same selection screen values as used in the job and sy-batch set to 'X'.

    • Use SM37 to get list of jobs, put the cursor on the job, type JDBG in the command line ( without '/' ), and press ENTER
    • You are in debug mode now.
    • Step through SAP program (press F7 couple of times) until you get to code you need.

    Regards,

    Venkat

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 04, 2012 at 06:57 AM

    Hi

    Unfortunately as far as I know you cannot debug a background job...Unless the background job fails or has errors then you can take a look at SM35. You can however run the app in foreground and debug it that way, this should give you your error. I would suggest you rather try doing the error tracing in your quality system and not on Production though, of course taking into account that the patch levels are the same on both systems and the quality system has the same version of the program.

    If you could maybe give us a bit more info as to your problem that would help as well.

    Regards

    Vic

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 04, 2012 at 08:17 AM

    Hi

       You can debug Background Job from SE37 after job is finished by using JDBG command...

    The same is discussed here:

    http://scn.sap.com/thread/185784

    Regards

    Srinivas

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 04, 2012 at 11:13 AM

    Hi,

    To debug a job in background :

    Stage 1:

    goto sm37-> select job -> press F2 then job details button and check the WP/PID number of job.

    Stage2:

    Return back to SM37 -> select job -> press F9 -> select the PID number of the processes currently running -> at top select Program/Session -> Program (2 options : Debugging / cancel ) -> select debugging.

    It will allow you the debug the program which is running as a background job. This will be similar to how we debug foreground jobs but the control will goto place where the job was already executed.

    This is helpful when the job is running which i think is your case.

    JDBG works when job is finished.

    If you know of the program name and process then you can directly avoid first stage and goto debugging by selecting the correct process.

    Hope this helps!!!

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 04, 2012 at 11:32 AM

    Frequently Asked Question. Locked.

    Add comment
    10|10000 characters needed characters exceeded