Application Development and Automation 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: 
Read only

Execution time in microseconds

Former Member
0 Likes
1,724

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,055

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

6 REPLIES 6
Read only

Former Member
0 Likes
1,056

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

Read only

Former Member
0 Likes
1,055

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

Read only

KjetilKilhavn
Active Contributor
0 Likes
1,055

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.


Kjetil Kilhavn (Vettug AS) - ABAP developer since Feb 2000, but will probably never be a Rockstar developer
Read only

Former Member
0 Likes
1,055

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

Read only

Former Member
0 Likes
1,055

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

Read only

Former Member
0 Likes
1,055

> 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.