07-18-2006 1:12 PM
Hi,
I need a FM that determines how many working days it has a month, based on a factory calendar.
Thanks,
Diego
07-18-2006 1:14 PM
07-18-2006 1:14 PM
07-18-2006 1:15 PM
07-18-2006 1:16 PM
07-18-2006 1:16 PM
check:
<b>K_ABC_WORKDAYS_FOR_PERIODS_GET
HR_E_GET_SI_DAYS_TO_WORK
WLB3_GET_NUMBER_OF_WORKDAYS</b>
rgds,
TM
07-18-2006 1:17 PM
Hi Anitha,
1. DATE_CHECK_WORKINGDAY
This is one useful FM
2. Try this code (just copy paste)
IT DOES EXACTLY WHAT U REQUIRE.
REPORT abc.
data : num type i.
parameters : frdate type sy-datum default '20051216'.
parameters : todate type sy-datum default '20051221'.
perform getinfo using frdate todate changing num.
break-point.
&----
*& Form getinfo
&----
text
----
FORM getinfo USING fromdate todate CHANGING numofdays type i.
DATA : d TYPE sy-datum.
d = fromdate - 1.
DO.
d = d + 1.
IF d > todate.
EXIT.
endif.
CALL FUNCTION 'DATE_CHECK_WORKINGDAY'
EXPORTING
date = d
factory_calendar_id = '01'
message_type = 'I'
EXCEPTIONS
date_after_range = 1
date_before_range = 2
date_invalid = 3
date_no_workingday = 4
factory_calendar_not_found = 5
message_type_invalid = 6
OTHERS = 7.
IF sy-subrc = 0.
numofdays = numofdays + 1.
write 😕 d.
ENDIF.
ENDDO.
ENDFORM. "getinfo
I hope it helps.
Regards,
Amit M.
07-18-2006 1:18 PM
hi
u can use WDKAL_DATE_ADD_FKDAYS .
otherwise u can use Holiday_get .by this u will get the no. of holidays and then subtract there days from month.
u will find no. of working days.
Naveen
07-18-2006 1:19 PM
Use this Function module WDKAL_DATE_ADD_FKDAYS.
other is holiday_get.
Then minus holidays.
Regards
Abhishek
07-18-2006 1:20 PM
hi,
Use FM <b>WDKAL_DATE_ADD_FKDAYS</b>
DATA: c_date LIKE sy-datlo,
c_fkday LIKE mdcal-fkday.
CALL FUNCTION 'WDKAL_DATE_ADD_FKDAYS'
EXPORTING
i_date = sy-datum
i_fkday = 2
i_fabkl = '01'
IMPORTING
e_date = c_date
e_fkday = c_fkday
EXCEPTIONS
error = 1
OTHERS = 2.
Message was edited by: Santosh Kumar P
07-18-2006 1:23 PM
Hi,
WDKAL_DATE_ADD_FKDAYS . This is the one best suited for your requirement.
Regs,
Venkat Ramanan
07-18-2006 1:23 PM
Hi Diego,
There is the Function Module WDKAL_DATE_ADD_FKDAYS which will help you definitely.
Ankur Garg.
07-18-2006 1:24 PM
Hi Diego,
Use this Fm.
NUMBER_OF_DAYS_PER_MONTH_GET
To Get No of days in month.
And then
HOLIDAY_GET
to calculate Holidays in that particular month.
And Subtract it from total no of days.
Regards
-
Sachin Dhingra
07-18-2006 1:25 PM
Thanks all for your replies.
What i need is a FM that for a given month (f.e. 01.2006) and a factory calendar (f.e. AR) it returns me the quantity of working days.
Thanks a lot.
Regards,
Diego