When you press F4 on any date field the standard calendar opens in order for you to choose a date. When you do not want the user to choose a weekend day or a holiday, you can do it.
Two different type of calendars are defined in SAP, the holiday calendar and the factory calendar.
These calendars are defined in the customizing under :
SPRO -> General settings -> maintain calendar
In this screen, all the default holidays are predefined by country, you can add or delete holiday as you
want. Because a holiday can be different by country, the factory calendar is stored for each plants, in table
T001W, field FABKL.
Here is a small example on how to call the calendar :
CALL FUNCTION ‘F4_DATE’
date_for_first_month = ‘20031208’
holiday_calendar_id = ‘CA’ “<<==– Here is how you point on a holiday calendar*
factory_calendar_id = T001W-FABKL “<<==– … or a factory one
display = ‘ ‘
select_date = select_date
OTHERS = 4.
The result, a red square marks each holidays in above image.