SAP GET TIME ABAP Statements



Get Example source ABAP code based on a different SAP table
  


ID GET-TIME
• GET TIME ABAP Statement

GET TIME
Short Reference

ABAP_SYNTAX
GET TIME $[FIELD tim$].

ABAP Addition
... FIELD tim

What does it do?
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.



Latest notes:

Besides with GET TIME, the system fields are updated after a program is started, a screen layout is sent, and the ABAP_ISESS is changed.
ABAP_HINT_END



Example ABAP Coding

Approximate runtime measurement. The statement GET RUN TIME should be used instead.
ABEXA 00307
ABAP_EXAMPLE_END
• FIELD GET TIME

ABAP Addition

What does it do?
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 the 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) or FINAL(var), where a variable of type t is declared.



Example ABAP Coding

The example has the same function as the previous example.
ABEXA 00308
ABAP_EXAMPLE_END

Return to menu