‎2014 May 16 3:47 PM
Hi experts,
Is there any function module that shows all working hours like FUNCTION 'CATS_GET_TARGET_HOURS' but that has also holiday like alv on transaction PT03.
Thanks in advance
‎2014 May 16 3:57 PM
Hello!
There is fm RKE_SELECT_FACTDAYS_FOR_PERIOD - it shows all working days in period. It could be useful.
‎2014 May 16 4:02 PM
" you can function module/method this code where sollz is the number of hours in the day available to work based on an employees working time
make sure you check the holiday calendar for each workdate that is not a holiday
select single schkz into (wa_schkz) from pa0007
where pernr = pernr
and begda <= workdate
and endda >= workdate.
if sy-subrc = 0.
select single * from t551a into wa_t551a
where motpr = '08' "UK grouping
and zmodn = wa_schkz.
call function 'DAY_IN_WEEK'
exporting
datum = workdate
importing
wotnr = wotnr.
case wotnr.
when 1.
select single sollz from t550a into req_hours
where motpr = '08'
and tprog = wa_t551a-tprg1.
when 2.
select single sollz from t550a into req_hours
where motpr = '08'
and tprog = wa_t551a-tprg2.
when 3.
select single sollz from t550a into req_hours
where motpr = '08'
and tprog = wa_t551a-tprg3.
when 4.
select single sollz from t550a into req_hours
where motpr = '08'
and tprog = wa_t551a-tprg4.
etc
‎2014 May 16 6:36 PM
Hi
The below FM's might help you.
RKE_SELECT_FACTDAYS_FOR_PERIOD - Detects all working days in a time frame in accordance with factory calendar
OIJP_CHECK_HOLIDAY - IS-OIL TSW : Determines if a given date is a holiday or not
Thanks,
Sreeram