This website is not affiliated with, sponsored by, or approved by SAP AG.

0032 - Modifying The F4 Standard Calendar

Moderators: Snowy, thx4allthefish, Rich, ilya

0032 - Modifying The F4 Standard Calendar

Postby Rich » Sat Mar 28, 2009 8:41 am

Modifying the F4 standard calendar.

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. I tried to create the Dany's day in ISP but I'm stuck on a small access problem... stupid security !

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 :

Code: Select all
CALL FUNCTION 'F4_DATE'
   EXPORTING
      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 = ' '
   IMPORTING
      select_date = select_date
   EXCEPTIONS
      OTHERS = 4.


Here is an example of the result, a red square marks each holiday.

Image

(Courtesy Dany Charbonneau)
Regards

Rich

Image
Abap KC:http://www.richard-harper.me.uk/Kb
SFMDR:http://www.se37.com
Rich
 
Posts: 7112
Joined: Thu Oct 31, 2002 4:47 pm
Location: Liverpool

Return to ABAPers

Who is online

Users browsing this forum: No registered users and 2 guests





loading...


This website is not affiliated with, sponsored by, or approved by SAP AG.