GET TIME STAMP FIELD f.
Returns the time stamp in either short or long form. The short form consists of the current date and
time. The long form contains date and time with seven decimal places for fractions of a second. This gives accuracy to 100 nanoseconds.
The target field f contains the global reference time
UTC (Universal Time Coordination). This corresponds to Greenwich Mean Time, which was used previously.
f must have type P(8)
for the short form, or P(11) DECIMALS 7 for the long form.
In the ABAP Dictionary, you can make references to the data elements TIMESTAMP
und TIMESTAMPL using a DATA ... TYPE ... statement.
You cannot manipulate the time stamp in the same way that you can manipulate ABAP
DATE or TIME types. The system contains other elements that convert the time stamp into date and time (accurate to one second) and output it.
The fractions of a second used in the long form are platform-dependent. The time on some platforms will only be accurate to one millisecond.
DATA:
s_tst TYPE timestamp,
l_tst TYPE timestampl,
tzone
TYPE timezone.
GET TIME STAMP FIELD s_timestamp. "short form
GET
TIME STAMP FIELD l_timestamp. "long form
tzone = 'UTC '.
"time
zone
WRITE: / s_tst TIME ZONE tzone,
/ l_tst TIME ZONE tzone.
The short form might then contain the value 19980204163520, the long form, the value 19980204163520,1234560.
Non-Catchable Exceptions