02-09-2009 7:26 AM
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
02-09-2009 7:28 AM
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
02-09-2009 7:29 AM
02-09-2009 7:30 AM
02-09-2009 7:33 AM
02-09-2009 8:09 AM
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.
02-09-2009 8:21 AM
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.
02-09-2009 10:36 AM
02-09-2009 11:45 AM
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