Ansicht
Dokumentation
ABENCHAR_DATE_TIME_FIELDS_NUMLIKE - CHAR DATE TIME FIELDS NUMLIKE
RFUMSV00 - Advance Return for Tax on Sales/Purchases CPI1466 during BackupThis documentation is copyright by SAP AG.
Numeric Access to Date Fields and Time Fields
Numeric access to date fields and time fields exploits the fact that the conversion of the types d and t to numeric values produces an integer number of days or seconds. This applies particularly when using date fields and time fields in numeric calculations, where they are converted to the corresponding calculation type. This enables differences to be calculated or values to be added or subtracted from date fields or time fields. All other arithmetic operations are generally not useful here. To avoid unexpected results from such calculations, the validity of the content of the date or time fields must be ensured.
Example
The following calculations provide the current day of the year as well as the hour, minutes, and seconds of the current time. The date and time are provided by a time stamp.
Example
The following calculation provides the day of the week for a date field date containing any valid date. 1 means Monday, 2 means Tuesday, and so on.
day = ( 5 + date MOD 7 ) MOD 7 + 1.
Example
The following calculations provides the last day of the previous month.
DATA date TYPE d.
date = sy-datlo.
date+6(2) = '01'.
date = date - 1.
BAL_S_LOG - Application Log: Log header data RFUMSV00 - Advance Return for Tax on Sales/Purchases
This documentation is copyright by SAP AG.
Length: 1653 Date: 20240424 Time: 100034 sap01-206 ( 29 ms )