2009 Apr 08 11:33 AM
hi
i want to find out no of days for give date according to factory colander ..
e.g.
my date is 01.01.2009 ;
in month 01 may some holidays like sundays
removing all the holidays i want to find no of days ..
2009 Apr 08 11:39 AM
2009 Apr 08 11:35 AM
Hi,
use the FM: HOLIDAY_GET..
This will give you all the holidays according to the factory calender..
Regards
Shiva
2009 Apr 08 11:40 AM
hi shiva
thanq for u fast reply ...
as i mentioned i want no of working days after removing holidays according to factory calendar Is there any function module available ?
ysr
2009 Apr 08 11:43 AM
Finally [search>>>|https://forums.sdn.sap.com/search.jspa?q=working%20days%20factory%20calendar&dateRange=last90days&searchID=24626890&rankBy=10001&start=0]
2009 Apr 08 11:48 AM
hi j@y,
i will give only date 01.01.2008.
is there any FM to find no of working days according to Factory calendar ..
without writing any code straight forward .. like i will give date FM has to give no working days for
particular date.
ysr
2009 Apr 08 11:54 AM
2009 Apr 08 12:14 PM
Hi YSR,
I think there is no such FM. You have to make some simple calculations like getting the starting date and ending date of the month of the date which you will enter as follows.
*Get no. of days using date
CALL FUNCTION 'HR_E_NUM_OF_DAYS_OF_MONTH'
EXPORTING
p_fecha = p_date
IMPORTING
number_of_days = l_f_number_of_days.
*Get start date
l_f_start+6(2) = '01'. "This is always same - starting day
l_f_start+4(2) = p_date+4(2). "Get month from given date
l_f_start+0(2) = p_date+4(2). "Get year from given date
*Get end date
l_f_end+6(2) = l_f_number_of_days. "This is always same - starting day
l_f_end+4(2) = p_date+4(2). "Get month from given date
l_f_end+0(2) = p_date+4(2). "Get year from given date
And you give the startdate and end date along with the Factory calendar ID to the FM RKE_SELECT_FACTDAYS_FOR_PERIOD to get the no. of working days in a date range.
Best Regards,
Sasidhar Reddy Matli.
2009 Apr 08 12:16 PM
2009 Apr 08 12:16 PM
hi,
not sure
check this out.
DATE_CONVERT_TO_FACTORYDATE Calendar function: Returns factory calendar date
FACTORYDATE_CONVERT_TO_DATE Calendar function: Returns date for a factory ca
LAST_FACTORYDATE_GET Calendar function: Return last factory date for
or u can do one thing
use HOLIDAY_GET , then u will get no. of holidays.
then use ISHMED_GET_DAYS_PER_MONTH to get total days for the month .
then do calculation .
2009 Apr 08 11:39 AM
2009 Apr 08 11:41 AM
Hello YSR,
You can use the FM RKE_SELECT_FACTDAYS_FOR_PERIOD to get the no. of working days in a date range.
To get the no. of working days for a months, you give the starting and ending date of the month. You need to pass Factory ID also.
Use the FM HR_E_NUM_OF_DAYS_OF_MONTH to get the no. of days. Just type a date in the input. you will get the no.of days of the month. Using this you can get the end date to pass to the FM RKE_SELECT_FACTDAYS_FOR_PERIOD.
Best Regards,
Sasidhar Reddy Matli.
Edited by: Sasidhar Reddy Matli on Apr 8, 2009 4:12 PM
2009 Apr 08 11:43 AM
Try FM WDKAL_DATE_ADD_FKDAYS
This gives no of working days in a date range...
2009 Apr 08 12:14 PM
Hi
You can try the following fm's
GET_DATE_FROM_CALID
CYCP_GET_CALENDAR
CY_GET_CALENDAR
DATE_CONVERT_TO_FACTORYDATE
FACTORYDATE_CONVERT_TO_DATE
LAST_FACTORYDATE_GET
Thanks
Satish
2011 Mar 05 4:40 PM