‎2007 Aug 03 4:32 AM
Hi,
Can someone tell me what should be the ideal execution time of a program in microseconds. My program consists of 2586 lines and has almost around 10 subroutines and some 10 function modules. Could you suggest me how the execution time is determined for a program.
Thanks,
Binay.
‎2007 Aug 03 4:38 AM
Hi Binay,
Just by line of code you can't judge that. It depends on the select queries and many more things.
The best way to check this is run the program in background and based on differece between start time and end time you can know the execution time. or you can check the details in transaction STAD.
Regards,
Atish
‎2007 Aug 03 4:38 AM
Hi Binay,
Just by line of code you can't judge that. It depends on the select queries and many more things.
The best way to check this is run the program in background and based on differece between start time and end time you can know the execution time. or you can check the details in transaction STAD.
Regards,
Atish
‎2007 Aug 03 4:42 AM
You can use simple command like
declare three variables :
data : a Type i,
b type i,
c type i.
start-of-selection.
Write the command in staring
get runtime field a. -> will have intial start time
write the one more command in last
get runtime field b. -> this is final time
c = b - a. -> c will have total execution time in micro seconds
or
you can use ST05 Transaction to find out the time,here you need count the all times.
Thanks
Seshu
‎2007 Aug 03 8:07 AM
The ideal time is always one microsecond less than the current execution time.
As has been pointed out one can't say anything about execution time just by looking at the number of code lines and subroutines and function module calls.
Use the profiling tools available (depends on your version, but you haven't said what version you are on) to see if any part of the program is taking up large parts of the execution time. That's where it is worth looking for potential improvements. Repeat until (customer) satisfied.
‎2007 Aug 03 8:34 AM
The ideal execution time, you know that nobody can say how long a program should need. A dialog program should need less than 2 seconds for response.
Measuring runtimes of programs is done automatically by the system, and can be seen in the STAD, call the transaction right after the execution, filter your user, sometimes it might be better, to change the starting point and interval.
More information is displayed in the ABAP Runtime Trace (SE30), there you can see details and you can decide where you should start with improbements.
Siegfried
‎2007 Aug 10 12:44 PM
Hi ,
You cannot judge the performance of the program from the times it takes to execute . It it is accessing some big tables like mseg it will take more time .
Performance can be judged by run time analysis . Se30
Go to se30 .
enter program or transaction name .
execute the program .
press back .
in se30 screen press analyse or evaluate .
abap
database
system
bar chart should not show red color .
Regards
‎2007 Aug 10 2:22 PM
> bar chart should not show red color .
why not, the red color tells you only that one contribution is more than 50%,
it can not know whether this is o.k.
... there is no solution for this problem ... nobody knows the ideal execution time
but you can check whether a program can be made better.