Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Getting Started Newsletters Store

Hi, Guest

Log On Join Us

Search the Community

Products

Services & Support

About SCN

Downloads

Industries

Training & Education

Partnership

Developer Center

Activity

Lines of Business

University Alliances

Events & Webinars

Innovation

Browse

More discussions in

Communications

Actions

ABAP Development

Actions
3 Replies Latest reply: Jul 26, 2006 2:59 PM by B. F.

Share

Like

Login to follow, like, comment, share and


bookmark content.

senthil velan

Login

Register

Jul 26, 2006 2:52 PM

how to debug background job


This question has been Answered.
is it possible to debugg a background job

Correct Answer
by viven chandar on Jul 26, 2006 2:53 PM
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.

Incoming Links
Re: debug a background job - start immediate
Re: how to debug the background job

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.
See the answer in context

Helpful Answer by B. F.

71887 Views

Topics: abap

Average User Rating


(5 ratings)

converted by Web2PDFConvert.com

viven chandar Jul 26, 2006 2:53 PM (in response to senthil velan)
Correct Answer Re: how to debug background job
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.

Alert Moderator

Like (7)

Alert Moderator

Like (0)

Alert Moderator

Like (1)

sap j Jul 26, 2006 2:56 PM (in response to senthil velan)


Re: how to debug background job
Hi,
Yes , it is possible to debug background job .
1. select active job in sm37.
2. type "jdbg" command in command field.
No need to type /n or /o .
3. Double click the job , it will go in debug mode.
OR
1. Go to sm50 .
2. place the cursor on active job.
3. goto program mode> program> Debugging.
regards.
santosh.

B. F. Jul 26, 2006 2:59 PM (in response to sap j)


Helpful Answer Re: how to debug background job
If your job is running. Simply go to SM51
- select your active job
- got to Program/Mode on menu . choose Program->Debug
You are now debugging your background job .
J

Go to original post

converted by Web2PDFConvert.com

Share

Site Index
Privacy

Like

Contact Us
Terms of Use

SAP Help Portal


Legal Disclosure

Copyright

Follow SCN

converted by Web2PDFConvert.com

You might also like