GET RUN TIME FIELD f.
Relative runtime in microseconds. The first call sets (initializes) the field
f to zero. For each subsequent call, f contains
the runtime in microseconds since the first call. The field f should be of type I.
The ABAP statements that lie between two calls of the GET RUN TIME
statement are known as the runtime. The time from the first to the second call is known as the measurement interval.
Use SET RUN TIME
CLOCK RESOLUTION to specify the precision with which the time is to be measured, before
you call GET RUN TIME FIELD for the first time. The default setting is high precision.
Measuring Runtime for the MOVE Statement
DATA: T1 TYPE I,
T2 TYPE I,
TMIN
TYPE I.
DATA: F1(4000), F2 LIKE F1.
TMIN = 1000000.
DO 10 TIMES.
GET
RUN TIME FIELD T1.
MOVE F1 TO F2.
GET RUN TIME FIELD T2.
T2 = T2 - T1.
IF T2 < TMIN.
TMIN = T2.
ENDIF.
ENDDO.
WRITE: 'MOVE of 4000 byte:', TMIN, 'microseconds'.
SAP recommends that you measure the runtime several times and take the minimum result.
To perform runtime measurements of complex processes, use Runtime analysis (Transaction SE30).
Measuring Runtimes of Program Segments