SAP Function HOLIDAY_CHECK_AND_GET_INFO - Calendar function: Public holiday check with information

Parameter Reference Type Length Default Optional Text
DATE SCAL-DATE D 8 Date to be checked
HOLIDAY_CALENDAR_ID SCAL-HCALID C 2 Public holiday calendar ID
WITH_HOLIDAY_ATTRIBUTES SCAL-INDICATOR C 1 SPACE X Flag whether attributes are to be returned

Parameter Reference Type Length Text
HOLIDAY_FOUND SCAL-INDICATOR C 1 Flag whether the specified date is a public holiday

Parameter Reference Length Optional Text
HOLIDAY_ATTRIBUTES THOL 18 X Attributes of the found public holidays

Exception Text
CALENDAR_BUFFER_NOT_LOADABLE Public holiday calendar could not be buffered
DATE_AFTER_RANGE Date later than public holiday calendar defined
DATE_BEFORE_RANGE Date earlier than public holiday calendar defined
DATE_INVALID Invalid date format
HOLIDAY_CALENDAR_ID_MISSING Public holiday calendar was transferred with SPACE
HOLIDAY_CALENDAR_NOT_FOUND Holiday calendar is not in buffer


INCLUDE 'DOCU_HAS_TO_BE_ELABORATED' OBJECT DOKU ID TX
The function module checks whether the date passed is a holiday.If so, the holiday attributes can be returned, if desired.As several holidays can occur on one date, the attributes are passedin a table.
Example call:
DATA: DATUM LIKE SCAL-DATE,
KALENDER LIKE SCAL-FCALID,
MIT_ATTRIBUTE LIKE SCAL-INDICATOR,
FEIERTAGKZ LIKE SCAL-INDICATOR.
DATA: BEGIN OF FEIERTAGE OCCURS 5.
INCLUDE STRUCTURE THOL.
DATA: END OF FEIERTAGE.
CALL FUNCTION 'HOLIDAY_CHECK_AND_GET_INFO'
EXPORTING DATE = DATUM
HOLIDAY_CALENDAR_ID = KALENDER
IMPORTING HOLIDAY_FOUND = FEIERTAGKZ
TABLES HOLIDAY_ATTRIBUTES = FEIERTAGE
EXCEPTIONS HOLIDAY_CALENDAR_ID_MISSING = 1
DATE_AFTER_RANGE = 2
DATE_BEFORE_RANGE = 3
DATE_INVALID = 4
HOLIDAY_CALENDAR_NOT_FOUND = 5.
All exceptions are raised with RAISE.Possible values are:
' ' date is not a holiday
'X' date is a holiday
Date must be between 01.01.1991 and 31.12.2098.
The flag determines whether the holiday attributes are to be passed
if the specified date is a holiday.
Possible input values are:
' ' attributes not delivered (default)
'X' attributes deliveredThe table contains the holiday aAttributes, if the specified date is aholiday. The attributes must be passed in a table because severalholidays can fall on a date.