Ansicht
Dokumentation
ABAPGET_TIME-STAMP - GET TIME-STAMP
BAL Application Log Documentation Addresses (Business Address Services)This documentation is copyright by SAP AG.
GET TIME STAMP
GET TIME STAMP FIELD time_stamp.
Effect
This statement uses the system time and system date of the AS ABAP to create a UTC time stamp according to the POSIX standard and assigns it to the variable time_stamp of type p as a time stamp in a packed number.
The following can be specified for time_stamp:
- An existing variable of the data type TIMESTAMP or TIMESTAMPL from the ABAP Dictionary, in accordance with the ABAP type p with length 8 or p with length 11 and seven decimal places. Depending on the data type, the time stamp is created either in the short form or in the long form.
- An inline declaration DATA(var) or FINAL(var), where a variable of type TIMESTAMP is declared.
Notes
- The precision of the decimal places of the generated time stamp depends on the hardware (processor) of the host computer of the current . Resolutions in the one-digit or two-digit microsecond range are realistic.
- A time stamp in its short form is the integer part of a time stamp in its long form. A long form
time stamp cannot be used to create the associated short form time stamp using a simple assignment, since this would involve commercial rounding. The method MOVE of the system class
CL_ABAP_TSTMP can be used instead.
Example
Creation of two time stamps. An existing variable of the type TIMESTAMPL must be used for the long form.
An inline declaration can be used for the short form. The time stamps must be formatted specially for the output, since otherwise only numbers of type p would be displayed.
Exceptions
Non-Catchable Exceptions
- Cause: The target field differs from TIMESTAMP or TIMESTAMPL with respect to type, length, and decimal places.
Runtime Error: GET_TIMESTAMP_FORMAT
Fill RESBD Structure from EBP Component Structure SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up
This documentation is copyright by SAP AG.
Length: 3636 Date: 20240418 Time: 070731 sap01-206 ( 51 ms )