SAP® Documentation

Single view

ABAPGET_TIME - GET TIME

Fill RESBD Structure from EBP Component Structure   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.
SAP E-Book

GET TIME

Short Reference



Syntax

GET TIME $[FIELD tim$].

Addition:

... FIELD tim

Effect

Without the addition FIELD, the system fields for date and time, sy-datlo, sy-datum, sy-timlo, and sy-uzeit, are set to the current value. The content of the system fields sy-dayst, sy-fdayw, sy-tzone, and sy-zonlo is not updated.

Note

Except for GET TIME, the system fields are updated after starting a program, after sending a screen, and after changing the internal session.

Example

Approximate runtime measurement. You should use the statement GET RUN TIME instead.

GET TIME.
DATA(t1) = sy-timlo.

DO 5000000 TIMES.
ENDDO.

GET TIME.
DATA(t2) = sy-timlo.

cl_demo_output=>display( t2 - t1 ).

Addition

... FIELD tim

Effect

The addition FIELD is used to pass the current system time in the format "hhmmss" to the variable tim instead of sy-uzeit, and none of the system fields are updated. The return value of the statement has data type t. The following can be specified for tim:

  • An existing variable of the data type t or a variable to which the type t can be converted.
  • An inline declaration DATA(var), where a variable of type t is declared.


Example

The example has the same function as the previous one.

GET TIME.

DO 5000000 TIMES.
ENDDO.

GET TIME FIELD DATA(time).

cl_demo_output=>display( time - sy-uzeit ).






General Data in Customer Master   BAL Application Log Documentation  
This documentation is copyright by SAP AG.

Length: 3048 Date: 20191208 Time: 090755     sap01-206 ( 23 ms )

Our Service

Looking for Support? Questions?

The

Consolut

Callback-Service

Leave us your contact details and we will call you back. Panels marked with * are mandatory.