Working day for a Holiday Calendar
Hi, experts.
I'm looking for a FM that returns me the next working day based on a Holiday Calendar (SCAL).
It should have the same functionality as Factory Calendar FM FIMA_DAY_CONVERT_TO_WORKINGDAY.
Can you help me out?
Thanks in advance,
Flavia
Use this function module & make sure you pass the plant details, as factory calendar mostly depeneds on the Plant.
Below is just an example to get the plant depending on Requisition & pass it to the function module.
Createdate --> will be the current date.
SELECT SINGLE t~fabkl
INTO lv_fabkl
FROM ( t001w AS t
INNER JOIN eban AS e ON ewerks = twerks )
WHERE banfn = reqnumber.
CALL FUNCTION 'FKK_ADD_WORKINGDAY'
EXPORTING
i_date = createdate
i_days = days
I_CALENDAR1 = lv_fabkl
I_CALENDAR2 =
IMPORTING
E_DATE = workingday.
E_RETURN =
Similar Messages
-
Get Nexr working day for the given calendar id
Hello,
My requirenment is I have a date.If that date falls on friday then I have to get the next working day date i.e.Monday for the given Calender iDDATA:wk_dat TYPE scal-indicator.
PARAMETERS:pa_dat TYPE sy-datum.
CALL FUNCTION 'DATE_COMPUTE_DAY'
EXPORTING
date = pa_dat
IMPORTING
day = wk_dat.
CHECK wk_dat = 5.
pa_dat = pa_dat + 3.
WRITE pa_dat.
here if u want to get the next working day
Use FM DATE_CHECK_WORKINGDAY after the check statement.
add the date until u find a working day. -
Adding working day as a holiday in calendar without affecting stock orders
It was very recently decided by the SA government that this coming Wednesday, 18th May, will be a Public Holiday (PH) due to national elections.
Itu2019s just been highlighted by the business now that this day is currently still set as a Production day in the calendar.
As such, could you please advise what needs to be done to urgently set this day to be a non-working day?
Also, whatu2019s of greater concern is that there are already Stock Orders sitting in system timed for picking & delivery on the 18th, and the Service Levels will be calculated on a working day for the 18th.
How can these orders be u201Crecalculatedu201D for the 19th so as not to impact negatively on the warehouseu2019s Service Levels, given that the warehouse will not actually be working on the 18th?Use this function module & make sure you pass the plant details, as factory calendar mostly depeneds on the Plant.
Below is just an example to get the plant depending on Requisition & pass it to the function module.
Createdate --> will be the current date.
SELECT SINGLE t~fabkl
INTO lv_fabkl
FROM ( t001w AS t
INNER JOIN eban AS e ON ewerks = twerks )
WHERE banfn = reqnumber.
CALL FUNCTION 'FKK_ADD_WORKINGDAY'
EXPORTING
i_date = createdate
i_days = days
I_CALENDAR1 = lv_fabkl
I_CALENDAR2 =
IMPORTING
E_DATE = workingday.
E_RETURN = -
Need working days for a particular month and year
Hi,
I need the number of working days for a particular month and year.Saturdays and Sundays are holidays.
Regards,
VigneshTry this:
SQL> var yr NUMBER;
SQL> exec :yr := 2010;
PL/SQL procedure successfully completed.
SQL> with t as (select :yr yr from dual)
2 SELECT TO_CHAR(dat,'MON-RR'),COUNT(*) FROM
3 (select TO_DATE('01-JAN-'||yr) + lv dat FROM
4 (select level - 1 lv,yr from t
5 connect by level <= TO_DATE('31-DEC-'||yr) - TO_DATE('01-JAN-'||yr) + 1))
6 WHERE TO_CHAR(Dat,'DY') NOT IN ('SAT','SUN')
7 GROUP BY TO_CHAR(dat,'MON-RR');
TO_CHAR(DAT, COUNT(*)
APR-10 22
AUG-10 22
DEC-10 23
FEB-10 20
JAN-10 21
JUL-10 22
JUN-10 22
MAR-10 23
MAY-10 21
NOV-10 22
OCT-10 21
TO_CHAR(DAT, COUNT(*)
SEP-10 22
12 rows selected.
SQL> Edited by: AP on Jul 27, 2010 7:54 AM -
Need working days for all months in a given year
Hi,
I need no of working days for all the months in a given year.
(i.e year is the input and the query should return 12 columns(jan-dec). Saturday and Sunday are holidays)
Regards,
VigneshMaybe you can use this:
break on month skip 1
set linesize 200
set pagesize 2000
column month format a20
column week format a4
with req as (select '&Required_Year_YYYY' as yr from dual)
,offset as (select case when to_char(trunc(to_date(yr,'YYYY'),'YYYY'),'IW') in ('52','53') then 1 else 0 end as offset from req)
select lpad( Month, 20-(20-length(month))/2 ) month,
'('||week||')' as week, "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"
from (
select to_char(dt,'fmMonth YYYY') month,
case when to_char(dt, 'mm') = '12' and to_char(dt,'iw') = '01' and offset = 0 then '53'
when to_char(dt, 'mm') = '12' and to_char(dt,'iw') = '01' and offset = 1 then '54'
when to_char(dt, 'mm') = '01' and to_char(dt,'iw') in ('52','53') then '1'
else to_char(to_number(to_char(dt,'iw'))+offset) end as week,
max(decode(to_char(dt,'d'),'1',lpad(to_char(dt,'fmdd'),2))) "Su",
max(decode(to_char(dt,'d'),'2',lpad(to_char(dt,'fmdd'),2))) "Mo",
max(decode(to_char(dt,'d'),'3',lpad(to_char(dt,'fmdd'),2))) "Tu",
max(decode(to_char(dt,'d'),'4',lpad(to_char(dt,'fmdd'),2))) "We",
max(decode(to_char(dt,'d'),'5',lpad(to_char(dt,'fmdd'),2))) "Th",
max(decode(to_char(dt,'d'),'6',lpad(to_char(dt,'fmdd'),2))) "Fr",
max(decode(to_char(dt,'d'),'7',lpad(to_char(dt,'fmdd'),2))) "Sa"
from ( select trunc(to_date(req.yr,'YYYY'),'y')-1+rownum dt
from all_objects, req
where rownum <= add_months(trunc(to_date(req.yr,'YYYY'),'y'),12) - trunc(to_date(req.yr,'YYYY'),'y') )
,offset
group by to_char(dt,'fmMonth YYYY'), case when to_char(dt, 'mm') = '12' and to_char(dt,'iw') = '01' and offset = 0 then '53'
when to_char(dt, 'mm') = '12' and to_char(dt,'iw') = '01' and offset = 1 then '54'
when to_char(dt, 'mm') = '01' and to_char(dt,'iw') in ('52','53') then '1'
else to_char(to_number(to_char(dt,'iw'))+offset) end
) x
order by to_date( month, 'Month YYYY' ), to_number(x.week)
/ L. -
i can't get icloud to sync my ipad notepad to my mac. it works fine for email and calendar?I have clicked the notepad setting on my iPad to ON.
On the iPad tap Settings > iCloud. Switch Calendars off then back on then reset the iPad.
Hold the On/Off Sleep/Wake button and the Home button down at the same time for at least ten seconds, until the Apple logo appears.
On the iMac, open System Preferences > iCloud. Deselect the box next to Calendars then reselect that box then restart your iMac. -
Pass working day to get factory calendar date
Hello Experts,
I wish to get the factory calendar date, specific to a factory calendar, based on a working day.
Basically, if i pass say 4, then i want to get the date for the 4th working day based on a specific factory calendar.
Can someone throw some light on possible function module that i can use?
ThanksI want to pass sy-datum to get factory date and then check if this factory date is the 4th busiess day for that month based on a specific calendar.
Or if i can pass in 4th bus day for a month (just pass 4) based on a specific factory calendar (just pass calendar id), then i would want the factory date, which i want to compare against sy-datum in my subsequent logic.
I am trying to trigger a data load stating if factory date for this month = 4th business day, then run load, else dont. And this in BW.
I dont have the FM that you mentioned above, in BW and is available only in R/3 -
Check working day for user according to factory calander
Hi ,
i wan to check" for given user whether date entered is first working day of week for the user or not based on factory calendar of the country of the company of the user".
How can this be done if any of you have any idea?
your help will be highly appriciated.Hi,
DATA:
L_SCAL_WEEK LIKE SCAL-WEEK,
L_DATE_LOW LIKE SY-DATUM,
L_DATE_HIGH LIKE SY-DATUM.
*--- Find start date for current week
Find current week
CALL FUNCTION 'DATE_GET_WEEK'
EXPORTING
DATE = SY-DATUM
IMPORTING
WEEK = L_SCAL_WEEK
EXCEPTIONS
DATE_INVALID = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
Start date current week
CALL FUNCTION 'WEEK_GET_FIRST_DAY'
EXPORTING
WEEK = L_SCAL_WEEK
IMPORTING
DATE = L_DATE_LOW
EXCEPTIONS
WEEK_INVALID = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
WRITE : / L_DATE_LOW. " first working day of current week -
Half working day before a holiday
Hi All,
I have a scenario wherein client wants employees to work half day before every public holiday ( holiday class 1 ).
I am trying to create a variant of Normal ( 5days X 8hrs ) WS by following rule.
Rule No Holiday Class Holiday Class ( Next Day ) Day Variant
AA 01 XXXXXXXXXX _X__________ XXXXX__ C
Above rule is good to replace WS with variant (reduced hour) if holiday is falling between Tuesday to Thursday.
What i am unable to implement is when Holiday falls on Monday and I want WS to reflect half day on Friday.
Appreciate if anyone can share his/her expertise in implementing this scenario.
Thanks
AbhayHi Abhayadeep,
We will have to use a workaround to achieve this.
If your public holiday is falling on Monday, then create a dummy public holiday for Saturday with public holiday class 9. Ensure that you keep the day type blank for public holiday class 9 in your day type selection rule.
Then in your variant condition, write the below condition:
Rule No Holiday Class Holiday Class ( Next Day ) Day Variant
AA 01 XXXXXXXXXX _X__________ XXXXX__ C
AA 02 XXXXXXXXXX ___________X _____X__ C
Please do generate your WSR after making the above changes. I hope this will resolve your issue.
Regards,
Vivek -
Has anyone got the Calendar feature for 'Show Holidays calendar' to work ?
I have tried most things but cannot get this to work for the UK ! I am under the impression it looks at your regional settings and then adds the holidays for that region. My region is set correctly so I assume it just doesnt work for UK.
Any advice welcome.Yes thats correct & it should showup if already checked.
When I checked the https://p15-calendars.icloud.com/holiday/FR_fr.ics
also https://p15-calendars.icloud.com/holiday/UK_uk.ics ofcourse it could be any page from
p 0- to p 20- but nothing happens from the UK one but the FR it auto downloads does not instal into
Calendar it will ask you for permision first.
I have many calendars too Europe, Asia etc:
This is what info of active Holiday Cal looks like. -
HR-TM: Two Holiday Calendars That Have Different Non-working Days?
Dear All,
Please help me on the predicament below:
I need to create two holiday calendars.
Holiday Calendar 1 will have Saturday and Sunday as non-working days.
Holiday Calendar 2 will have Friday and Saturday as non-working days.
And both holiday calendars are used in the same country.
Then, there is one holiday which is assigned to both holiday calendars such as New Year Day.
How can I configure so that
1) if New Year Day falls on the first non-working day of each week of each holiday calendar, the holiday will be moved to the previous day?
2) if New Year Day falls on the second non-working day of each week of each holiday calendar, the holiday will be moved to the following day?
Should I create two lines of data for New Year Day so that each of them assigned to different holiday calendar?
Or I can just use one New Year Day in both holiday calendars?
Thanks.I've got my answer.
First calendar, i use fixed date and floating date for the public holiday based on the real situation.
Second calendar, i use floating date for all the public holiday, then set the date every year once. -
FM for Holiday & Next Working day
HI All,
Please suggest any single FM, which can give the current day is Holiday or not. If, Yes, the what is the next working day for a Facorty calender ID.
Both validation should be happend in a single FM.
Thanks & Regards,
Prabhakar.
Moderator message: FAQ, please search for previous discussions of this topic.
Edited by: Thomas Zloch on Apr 18, 2011 6:13 PMhi ,
Pls check this FM
CALL FUNCTION 'BKK_CHECK_HOLIDAY'
EXPORTING
i_date = wf_cntdt
i_calendar1 = 'B1'
IMPORTING
e_x_no_workingday = wf_holi.
*get actual working days upto report date.
it_act_work_days-dat_from = w_date-low.
it_act_work_days-dat_to = w_date-high.
APPEND it_act_work_days.
*calculate actual working days.
CALL FUNCTION 'WFCS_FCAL_WDAYS_GET_S'
EXPORTING
pi_time_interval = it_act_work_days
pi_fcalid = 'B1'
IMPORTING
pe_wdays = wf_actdays.
regards
Deepak.
Edited by: Deepak Dhamat on Apr 18, 2011 12:31 PM -
Is it possible to modify the Calendar object to only show working days?
Is there a way to configure the Calendar selection, duration calculations, and notification dates in the system to only include working days (i.e. holidays and weekends are not counted and not available for selection)? This is particlular for Purchasing and Sourcing Modules.
Thank you.This can be changed through registry:
https://msdn.microsoft.com/en-us/library/ff800821%28v=ws.10%29.aspx
You can do the change through group policy preferences, or some other method you prefer (ConfigMgr compliance settings for example). -
Team Calendar non-working days
Hi Gurus,
Is there a way we can configure the team calendar to show non-working days for the employee (public holidays, days off in part-time/shift work-schedules) in green for example?
I haven't seen any configuration options for this, but I would expect it to show them somehow!? Will we need to do custom development for this?
Many thanks,
Russell.Hi Russell,
You can check this<a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/2f/d7844205625551e10000000a1550b0/frameset.htm">SAP Help</a> for additional info on the Team Calendar iView..
~Suresh
Russell,
I didn't think the "10 points offer" was open to all.. ideally, it should be to Duxton only.. You could probably open a customer message in OSS & seek SAP's clarification on Team Calendar
Message was edited by: Suresh Datti -
Hi,
We have a project called as capita for whom our employees are sheeting on their office, and their holiday calendar and our holiday calendar is different some of our employee who are in capita they applied leave on 10th sep which was a holiday in Mastek but it was a working day for capita .
Neither we can make a new holiday calendar for capita nor can we frame a new absence type, because by doing this there are some possibility of violating our hr policy.
So kindly suggest us the best possibility.
We are patch level 58Hello sir,
When entering absences the counts the planned working time which is included between begin and end of the absence. On off-days or public holidays the sum of working hours always is zero.
From a business point of view it does not make much sense to record an absence for an employee on a day on which he/she does not have to work.
Unfortunately you cannot override this. If you need to record an absence on a day off you will have to create a substitution record so that day is now a working day.
The following information might be helpful:
After a change in a holiday calendar the work schedules have to be regenerated. The warning message you described on the first page comes out of a check against the work schedule. In IMG you can find Personal Time Management -> Work Schedules -> Work Schedule Rules and Work Schedules -> Generate Work Schedules Manually Here the work schedules have to be generated after any change in the holiday calendar.
Maybe you are looking for
-
I just got a new macbook and im trying to transfer the music off my i-phone onto the i-tunes on my computer. Help??
-
Hi all I'm new to J2EE and am having a promlem deploying a webservice, I am using netbeans 5.5 with J2EE 5 and java Aplication server 9.0. I have added the web service to a bean Container when i deploy I get the following error Deploying application
-
Putting .avi files onto DVD
I'm not sure if this is the correct forum for this question (and I can't seem to find any other threads about it), but I have a bunch of TV Shows in .avi format on my computer. I'd like to be able to place them on a DVD where I can simply watch them
-
Change Tracker implementation in portal
Hi, while implementing change tracker in Portal , one important point to be notted is to assign the below mention UME action to the roles created. Otherwise you will get MDM authorization error. UME Action are as follows: tcmdmchangetrackersecurity-
-
Load sharing/balancing between 2 Service Providers
Hi, I have a scenario where I have the following and this is repeated at different sites globally. CE1-----------PE1_SP1---MPLS cloud | CE1---standby--PE2_SP1---MPLS cloud CE2-----------PE1_SP2----MPLS Cloud | CE2---standby--PE2_SP2---MPLS Cloud 2 di