Ansicht
Dokumentation
ABENCHAR_DATE_TIME_FIELDS_ACCESS - CHAR DATE TIME FIELDS ACCESS
ROGBILLS - Synchronize billing plans ABAP Short ReferenceThis documentation is copyright by SAP AG.
Access to Date Fields and Time Fields
Only in a few operand positions is it important that date fields and time fields contain a local date in the format "yyyymmdd" or a local time in the format "hhmmss":
- When using date fields and time fields as source fields or target fields of a lossless assignment.
- In conversions of a local date and a local time to time stamps using
- CONVERT INTO UTCLONG and back using CONVERT UTCLONG.
- CONVERT INTO TIME STAMP and back using CONVERT TIME STAMP.
- In output formatting using string templates or the statement WRITE $[TO$]
In all other operand positions, the handling of date fields and time fields is largely determined by the conversion rules and comparison rules for these data types.
- The conversion rules are designed in such a way that data objects of the types d and t behave like character-like objects in character-like operand positions and numerically in numeric operand positions. In the latter case, the content of a date field is converted to the number of days since 01.01.0001 and the content of a time field is converted to the number of seconds since midnight.
- The comparison rules are designed so that a later date or later time is greater than an earlier date or earlier time.
Direct assignments or comparisons between the data types d and t do not make sense and are therefore forbidden. The following sections show examples of how to access date fields and time fields effectively.
Notes
- The function modules of the function pool SCAL provide some additional information about character-like date specifications, for example the day of the week or the calendar week for a given date.
- Special date functions and time functions can be used in the CDS DDL of the ABAP CDS to process dates and times stored in database tables.
Example
Conversion of a time stamp to date and time fields and their type-friendly formatting as string templates.
BAL Application Log Documentation ROGBILLS - Synchronize billing plans
This documentation is copyright by SAP AG.
Length: 3894 Date: 20240329 Time: 151956 sap01-206 ( 57 ms )