Ansicht
Dokumentation

ABENCL_ABAP_TSTMP - CL ABAP TSTMP

ABENCL_ABAP_TSTMP - CL ABAP TSTMP

Addresses (Business Address Services)   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.
SAP E-Book

System Class for Time Stamps in Packed Numbers

The class CL_ABAP_TSTMP is used to calculate and convert time stamps in packed numbers. Important methods include:

  • The method ADD or SUBTRACTSECS adds or subtracts seconds from time stamps.
  • The method TD_SUBTRACT calculates the difference between two time stamps.
  • The method MOVE converts the long form of time stamps to the short form and vice versa, avoiding unwanted rounding effects.
  • The method NORMALIZE normalizes time stamps. Invalid time stamps are converted into valid time stamps.
  • The methods UTCLONG2TSTMP, UTCLONG2TSTMP_SHORT, and TSTMP2UTCLONG convert the content of time stamp fields to representation in packed numbers and vice versa.

Note

Conversions between time stamp fields and packed numbers are necessary if time stamp fields are used in new programs, but existing repositories or interfaces need to be accessed at the same time.

Example

Creation of a one hour earlier time stamp by subtracting 3600 seconds.

Example

Conversion of a time stamp field to time stamps in packed numbers. In formatting using string templates, the formatting option TIMESTAMP must be specified for the packed numbers to define a representation as time stamps.






SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   General Material Data  
This documentation is copyright by SAP AG.

Length: 1750 Date: 20240426 Time: 092607     sap01-206 ( 37 ms )