10-18-2005 5:33 PM
Hi All,
i am using the following two functional modules to find holidays and sundays , as such according to my calender id i have to calculate overtime on sunday and public holiday
RH_GET_DATE_DAYNAME
HOLIDAY_CHECK_AND_GET_INFO
Is there a single FM which does both these 2 things?
Regards,
Azee
10-18-2005 5:53 PM
Hi,
Did you try using DAY_ATTRIBUTES_GET fm?
I think that will give you all the info you need in day_attributes table for a given date. Just send both your factory_calendar (or leave it as space) and your holiday_calendar to it..
And pass date_from and date_to as the same date that you want to deterime..
Hope this helps..
Sri
10-18-2005 6:13 PM
Hi azee,
i think you can use 'DAY_ATTRIBUTES_GET' and check this table...CASDAYATTR
data : CHECKDATE LIKE SY-DATUM.
DATA: BEGIN OF I_DAY_ATTRIB OCCURS 10.
INCLUDE STRUCTURE CASDAYATTR.
DATA: END OF I_DAY_ATTRIB.
CALL FUNCTION 'DAY_ATTRIBUTES_GET'
EXPORTING
FACTORY_CALENDAR = '01'
DATE_FROM = CHECKDATE
DATE_TO = CHECKDATE
LANGUAGE = 'E'
TABLES
DAY_ATTRIBUTES = I_DAY_ATTRIB
EXCEPTIONS
FACTORY_CALENDAR_NOT_FOUND = 1
HOLIDAY_CALENDAR_NOT_FOUND = 2
DATE_HAS_INVALID_FORMAT = 3
DATE_INCONSISTENCY = 4
OTHERS = 5.
http://www.sapassist.com/code/d.asp?d=3218&a=s
hope this helps you..
reward points for helpfull answers and close the thread if your question is solved.
regards,
venu.