Get Example source ABAP code based on a different SAP table
ID SET-RUN-TIME • SET RUN TIME ANALYZER ABAP Statement • ON SET RUN TIME ANALYZER • OFF SET RUN TIME ANALYZER
SET RUN TIME ANALYZER> Short Reference >
ABAP_SYNTAX SET RUN TIME ANALYZER ${ON$|OFF$}.>
What does it do? This statement affects 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 the runtime of 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.
Latest 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 the ABAP Profiler in the ABAP Development Tools (ADT)>. ABAP_HINT_END
Example ABAP Coding
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.> ABAP_EXAMPLE_END