how to get holidays info on SQ02 -
I would like to find if that day is a holiday or working, I tried with the FM HOLIDAY_CHECK_AND_GET_INFO with this code:
but I do not find anything, I was expecting to Sunday the flag X (and other days..)
please help me
thanks in advance
CALL FUNCTION 'HOLIDAY_CHECK_AND_GET_INFO'
DATE = ZBLD_RDT_CON_RDA-DATUM
HOLIDAY_CALENDAR_ID = FABKL
WITH_HOLIDAY_ATTRIBUTES = ' '
HOLIDAY_FOUND = HOLID
* HOLIDAY_ATTRIBUTES =
CALENDAR_BUFFER_NOT_LOADABLE = 1
DATE_AFTER_RANGE = 2
DATE_BEFORE_RANGE = 3
DATE_INVALID = 4
HOLIDAY_CALENDAR_ID_MISSING = 5
HOLIDAY_CALENDAR_NOT_FOUND = 6
OTHERS = 7
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
That fm returns thr first working day before or after the date in input, so if you use + it'll return the first working day after the inpu date:
- If the input date is holiday, the output date will be different from the input one and the WORKINGDAY_INDICATOR will be set to + (in according to the input value of correct_option )
- If the input date is a working day, the output date will be the same of the input one, so the WORKINGDAY_INDICATOR will be set to space
You check only WORKINGDAY_INDICATOR, so it can be ok to say if it's + is holiday and if it's blank is working day