Skip to Content
author's profile photo Former Member
Former Member

Regarding background job.

Hi All,

I have to debug background job which is currently running.

I know how to get the job in debug mode, that is through SM51 transaction...But once i m done with seeing some values in debug mode. I need to put this job back again in the background. Becasue since this is long running job i can not run it in forground.

Plase guide me in this regards.

-Sanjay

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 12:30 PM

    Hi,

    You can debug batch jobs by going to 'SM37', type in 'JDBG' in the

    command line ( no '/' ), put the cursor on the job and press enter - will

    take you to the job in debug mode.

    You can do this only after the job has finished execution. This will simulate the exact background scenario with the same selection screen values as used in the job also sy-batch will set to 'X'.

    So type in the transaction code 'JDBG' and place your cursor on the job after It has finished. It will take you to a SAP program in debug mode. Step through this program which is about 10 lines, after this your program will be executed in the debug mode.

    Steps

    1. Create variant called BACKGROUND for program to be debugged.

    2. Execute ZDEBUGBG (pgm code below) in background for immediate processing.

    3. Execute transaction SM50.

    4. Select process that runs ZDEBUGBG.

    5. Goto 'Program/Session' 'Program' 'Debugging'.

    A se80 debug session will open.

    6. Change variable W_EXIT to 'E'.

    7. Step thru (F6) until ZWBTEST comes up.

    1. Go to Transaction SM66 and find your work porocess.

    Select the line work process is on and click on the Debugging button.

    If this is a custom program, you can put a wait statement in the code to buy yourself sometime.

    2. Go to Transaction SM50. From the tool bar "Program/session"->Program->Debugging.

    goto SM37 and from Program menu(not sure.. try other menu's)

    -->Catchjob . it will goto the active job in debugging mode.

    Regards,

    Raj.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 12:29 PM

    Hi,

    I searched the forum with the terms 'debug background job' and found loads of answers.

    You may want to do the same.

    Regards,

    Nick

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 18, 2008 at 12:31 PM

    HI,

    Goto sm37 give ur job name and give JDBG in command and execute,then u can debugg ur job.

    if u want to delete long running job goto sm04 and click on end session.

    reward points if hlpful.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.