Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  program editing →  Testing and Checking Programs →  Runtime Measurements 

SET RUN TIME ANALYZER

Quick 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 the setting Particular Units is activated in the runtime analysis, which can be done using 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 code sy-subrc to 0.


Notes

  • This statement should only be used in the test phase of a program, to enable a later runtime measurement independently of the source code.
  • Runtime analysis can be switched on and off in transaction SAT by selecting System → Utilities → Runtime Analysis or by entering /RON and /ROFF in the command field of the system toolbar
  • Runtime analysis can be stopped and started on a program-driven basis by calling the static methods ON and OFF in CL_ABAP_TRACE_SWITCH either before or after the statements SET RUN TIME ANALYZER.
  • Runtime analysis was replaced by ABAP Profiler in the ABAP Development Tools (ADT).

Example

If the method m0 is executed when runtime analysis is switched on, only the runtime from the call 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.