SAP Function WEEK_GET_FIRST_DAY - Calendar function: Return first day for a week

Parameter Reference Type Length Default Optional Text
WEEK SCAL-WEEK N 6 Week for which the date is to be determined

Parameter Reference Type Length Text
DATE SCAL-DATE D 8 Date of the first day of the week

Exception Text
WEEK_INVALID Week was incorrectly specified


INCLUDE 'DOCU_HAS_TO_BE_ELABORATED' OBJECT DOKU ID TX
The function module calculates the first day of a week
Example call:
DATA: DATUM LIKE SCAL-DATE,
WOCHE LIKE SCAL-WEEK.
CALL FUNCTION 'WEEK_GET_FIRST_DAY'
EXPORTING WEEK = WOCHE
IMPORTING DATE = DATUM
EXCEPTIONS WEEK_INVALID = 1.
All exceptions are raised with RAISE.The week must be passed in format YYYYWW. The year YYYY must be between1901 and 2098; the week WW must be less than 54.