‎2009 Feb 27 7:45 AM
How do i debug a report a during execution?
1) I know we can do this by putting a breakpoint in a Program before execution through se38.
2) Or it can be done by putting a /h before execution.
But what if i forget to put break point and also forget /h. Now during the execution,the program takes a long time in processing , so i want to know at which statement or loop is the processing going on.Is there any transaction or way how i can find this out and then put a break point there .
‎2009 Feb 27 7:49 AM
Hi Dilip.
Go to ST05
put the trace on.
and execute your program.
and in the middle of that program go to ST05 and check with your program name.
or else you can do one thing.
put the infinte loop in the program.
set your program in the back ground process and go to the SM50 and check there your program will be at the infinete loop. break that loop and find the which loop taking more time.
hope it helps you.
Regards!
Edited by: Prasanth on Feb 27, 2009 1:20 PM
‎2009 Feb 27 7:49 AM
Hi ,,
U can not put break in the execution in a way u want,
You must put a break point or fire Tcode /h to debuge it ,,
So Stop he transaction & put breakpoint..
U will succeed,
Regards,
Nishit.
‎2009 Feb 27 7:49 AM
Hi Dilip.
Go to ST05
put the trace on.
and execute your program.
and in the middle of that program go to ST05 and check with your program name.
or else you can do one thing.
put the infinte loop in the program.
set your program in the back ground process and go to the SM50 and check there your program will be at the infinete loop. break that loop and find the which loop taking more time.
hope it helps you.
Regards!
Edited by: Prasanth on Feb 27, 2009 1:20 PM
‎2009 Feb 27 7:49 AM
I dont think what you want is possible. But if you want to see what statments etc are taking a long time to execute, SAP has provided tools like ST05 ( SQL trace) and SE30 to analyse the program runtime.
To know more about ST05 and SE30 search on SCN.
regards,
Advait
‎2009 Feb 27 7:50 AM
hi,
for running program you can turn on debugging in sm50 transaction ;
see menu command:program/session-program-debugging...
regards,darek
‎2009 Feb 27 7:50 AM
Hi Dilip,
You can put hard breakpoint in your program before the statement where you want to stop.
BREAK-POINT . -
It will stop for every user
BREAK-POINT DILIP. -
It will halt for only user Dilip
Regards,
Anil
‎2009 Feb 27 7:50 AM
You can do through transaction SM50, you will find active sessions select the one you want and in the Program Menu choose program -> debugging.
‎2009 Feb 27 7:55 AM
Hello Dilip,
In order to know which statement takes long time. you may use the "Trace Request" tool. (Transaction:ST05)
Goto transaction ST05
Select SQL trace
Put the Trace On.
Execute your report program
and then come back to ST05 screen and put the Trace Off.
Now you may select the " List Trace" option in ST05 to see the execution time taken by each DB operation, and you will come to know the statements which take more time.
Hope this helps you.
Regards,
Shiny
‎2009 Feb 27 7:56 AM
Hi Dilip
As per my understanding,implementing the Watch Points mechanism is the best solution for your case.
Using the watch points, we can came to know where exactly the problem is occuring if the execution is taking long hours.
For example I have 1- 10000 employee numbers and for each employee,I am handling some mechanism.
In this case suppose let assume EMP# 1024 is giving some problem.
By putting the Watching point as EMPNo = 00001024, directly we can go to that EMP# part and can observe the problematic statements.
Hope you got some idea if not please let me know so that I can provide more stuff with live examples.
Regards,
Sreeram Kumar.Madisetty
‎2009 Feb 27 7:56 AM
Hi
Good!
You can use a hard coded BREAK-POINT if you know the place where the error may occur, otherwise its not possible to go to debug mode without using the methods you have mentioned in your post.
Thanks
mrutyun^
‎2009 Feb 27 8:50 AM
Thanx guys the transaction SM50 worked perfectly as i wanted.