Skip to Content
author's profile photo Former Member
Former Member

How to get Runtime for each statement in abap program

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

Thanks in advance

PRASANNA

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Dec 20, 2008 at 12:22 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 20, 2008 at 12:33 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.