Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  program editing →  Testing and Checking Programs →  Runtime Measurement 

SET RUN TIME ANALYZER

Short Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


SET RUN TIME ANALYZER {ON|OFF}. 

Effect

This statement influences the measurement of a program with the runtime analysis tool. If you activate the setting particular units in the runtime analysis, which can be done via Restrictions → Program units, the runtime analysis only measures statements that occur between SET RUN TIME ANALYZER ON and SET RUN TIME ANALYZER OFF.

System fields

The statement SET RUN TIME ANALYZER always sets the return value sy-subrc to 0.


Notes

  • This statement should only be used in the test phase of a program, in order to enable a later runtime measurement independent of a source text.
  • You can switch the runtime analysis on and off in the transation SAT, by selecting System → Utilities → Runtime analysis or by entering /RON and /ROFF in the command field of the system function bar
  • You can start and stop the runtime analysis on a program-controlled basis, by calling the static methods ON and OFF CL_ABAP_TRACE_SWITCH either before or the SET RUN TIME ANALYZER statements.

Example

If you execute the method m0 when the runtime analysis is switched on, only the runtime from callup and execution of the method m2 is measured.

METHOD m0.
  me->m1( ).
  SET RUN TIME ANALYZER ON.
  me->m2( ).
  SET RUN TIME ANALYZER OFF.
  me->m3( ).
ENDMETHOD.