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 get Runtime for each statement in abap program

Former Member
0 Kudos

Is there any tool which tells the runtime of each statement in our program..apart from sto5 and se30

Thanks in advance

PRASANNA

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi.

Check The Transaction DWDM. from here you can get sample Code. and it will take you into the

one screen. there you can write and test the Execution time.

Search in that Transaction.

Regards.

SrEeNu.

2 REPLIES 2

Former Member
0 Kudos

hi.

Check The Transaction DWDM. from here you can get sample Code. and it will take you into the

one screen. there you can write and test the Execution time.

Search in that Transaction.

Regards.

SrEeNu.

SantoshKallem
Active Contributor
0 Kudos

Determining the calculation time for calculating the tangent of 1. Since the runtime of the statement is less than a microsecond, the runtime of several executions in an inner loop is measured. The exection time for the loop itself is also measured in order to deduct it as an offset. These measurements are executed several times in an outer loop and the mean value is created using division by n0. Through division by ni, the runtime of an individual statement is determined.


DATA: t0    TYPE i, 
      t1    TYPE i, 
      t2    TYPE i, 
      t3    TYPE i, 
      t4    TYPE i, 
      tm    TYPE f, 
      no    TYPE i VALUE 100, 
      ni    TYPE i VALUE 1000, 
      res   TYPE f. 

DO no TIMES. 
  GET RUN TIME FIELD t1. 
  DO ni TIMES. 
    res = TAN( 1 ). 
  ENDDO. 
  GET RUN TIME FIELD t2. 
  GET RUN TIME FIELD t3. 
  DO ni TIMES. 
  ENDDO. 
  GET RUN TIME FIELD t4. 
  t0 = t0 + ( ( t2 - t1 ) - ( t4 - t3 ) ). 
ENDDO. 

tm = t0 / ni / no. 

Source: SAP Help.

Regards,

Santosh