Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to debug the back ground job

Former Member
0 Kudos

Hi All,

I want to debug the program, but it is taking more time so iam running it in back ground, but i need to debug the program from some particular point....is there any other way to debug the program...

Means...to run the program in background upto particular point and later i need to run it in debug mode.

Please suggest.

Thanks & Regards,

Hari

8 REPLIES 8

Former Member
0 Kudos

Hi,

You can use the statement

break-point

at the place where you want to break your program and then execute the program

You can also use watch points, start your program in debug mode

set the watch point and then execute you program it will go to debug mode once it meets the condition of watchpoint

Regards,

Siddarth

Edited by: Siddharth Chordia on Feb 9, 2009 8:29 AM

Former Member
0 Kudos

HI,

Check these links..

[how to debug back ground job |]

Edited by: Avinash Kodarapu on Feb 9, 2009 1:00 PM

faisal_altaf2
Active Contributor
0 Kudos

Hi,

Please Have a look at the following Thread hope you will be able to solve out your Problem,

[How to Debug a Back ground JOB |]

Kind Regards,

Faisal

Former Member
0 Kudos

hi,

you will get the answer here...

thanks

Former Member
0 Kudos

Hi,

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 and sy-batch set to 'X'.

  • Use SM37 to get list of jobs , type 'JDBG' in the command line ( no '/' ), put the cursor on the job 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.

Hope this helps u.

Thanks.

0 Kudos

Hi,

Else, you can put an infinite loop in your code to stop execution at a certain point in your code:

data x type c.

while x is initial.

break username.

endwhile.

Go to transaction SM50.

select the record for your program

click on Program/session --> Porgram --> debugging.

this will trigger the break point in your while loop, then just modify the value of variable x to come out of the loop and continue debugging.

Regards.

Former Member
0 Kudos

Hi,

Check the below link

Regards,

Anki Reddy

Former Member
0 Kudos

Goto SM37, Specify the job, type JDBG press OK button . This can be used for both completed jobs and jobs to be processed.

Regards,

Joan