Configuring CUP SLA to exclude weekends
Hi,
Please advise if you know of where I can configure the CUP Service Level report to exclude weekends and public holidays (i.e. non-working days). Currently calls breach SLA sometimes on a non-working day.
We are on GRC 5.3 SP13
Thanks,
Pumza
I am pretty certain it can not read a holiday calendar, I dont think it is possible to ignore the weekends either.
Regrads,
Chinmaya
Similar Messages
-
How to exclude weekends/holidays from BPEL Wait activity?
I can configure the duration of a Wait activity using duration expressions, or specifying some time in the future. However, I have a use case where the Wait should only consider weekdays which are not holidays. Something akin to tying the Wait activity to a business calendar. Don't really need the sophistication of a business calendar, but at least would like to be able to only include weekdays and not weekends. I read somewhere that BPEL uses Quartz to implement the Wait activity.
http://enterpriseglue.com/index.php?option=com_content&task=view&id=37&Itemid=44
However, I can't find a way to configure the Wait for anything other than standard durations. Seems like Quartz does support the notion of business calendars. Here is a sample.
http://www.quartz-scheduler.org/docs/cookbook/FifthWorkingDayTrigger.html
If anybody has found a way to exclude weekends from the Wait activity in BPEL, or has some idea how it might be done, please share.Hi Harrie:
Not sure I understand what you did. Suppose, for example, that I am setting the Wait duration to P5D. But I want to wait 5 business days instead of 5 calendar days. Do you first calculate what the end-time would be and then set the Wait expiration instead of the duration? In other words, waiting UNTIL a particular time, instead of waiting FOR a specified duration? Is this how you are doing it?
Tks. -
Add hours to a date excluding weekends.
Hi
I have to write a function to calculate the SLA Due Date by adding hours to the startDate of a ticket. But it should add HRS by excluding weekend Hours.
SLA Would be in HRS... For example, if Ticket was opened on Friday 4PM and SLA is 24 hours, the SLADUEDate should be Monday 4PM Not Saturday 4PM.
Moreover if the SLA is 12 hours, The SLADueDate should be 4AM Monday.
I do not have a date table to accomplish this So i am thinking how to tackle this.
Can anyone help me out with the logic for the function.
Thanks
Rajiv
RajivIf creating a calendar table is an option, this is simple:
DECLARE @calendar TABLE (date date, isWeekend bit, isHoliday bit)
INSERT INTO @calendar (date, isWeekend, isHoliday)
VALUES
('2014-09-21',1,0),('2014-09-22',0,0),('2014-09-23',0,0),('2014-09-24',0,0),('2014-09-25',0,0),('2014-09-26',0,0),('2014-09-27',1,0),
('2014-09-28',1,0),('2014-09-29',0,0),('2014-09-30',0,0),('2014-10-01',0,0),('2014-10-02',0,0),('2014-10-03',0,0),('2014-10-04',1,0)
DECLARE @tickets TABLE (ticketID INT IDENTITY, ticketstartDateTime DATETIME)
INSERT INTO @tickets (ticketstartDateTime)
VALUES
('2014-09-23 18:22:33'),('2014-09-24 13:11:54'),('2014-09-25 16:33:14'),('2014-09-26 11:22:33')
SELECT t.*, CONVERT(DATETIME,CONVERT(VARCHAR,c.date,101) + ' ' + CONVERT(varchar,ticketstartDateTime,108)) AS SLADateTime
FROM @tickets t
INNER JOIN @calendar c
ON c.date = (SELECT MIN(date)
FROM @calendar
WHERE date > t.ticketstartDateTime
AND isWeekend = 0
AND isHoliday = 0
If not, try:
DECLARE @tickets TABLE (ticketID INT IDENTITY, ticketstartDateTime DATETIME)
INSERT INTO @tickets (ticketstartDateTime)
VALUES
('2014-09-23 18:22:33'),('2014-09-24 13:11:54'),('2014-09-25 16:33:14'),('2014-09-26 11:22:33')
;WITH rCTE AS (
SELECT DATEADD(DAY,10,GETDATE()) AS date, 10 AS mod
UNION ALL
SELECT DATEADD(DAY,-1,r.date) AS date, mod-1 as mod
FROM rCTE r
WHERE mod > -30
), pCal AS (
SELECT r.*, CASE WHEN h.date IS NOT NULL THEN 1 ELSE 0 END AS isHoliday, CASE WHEN DATEPART(WEEKDAY,r.date) IN (7,1) THEN 1 ELSE 0 END AS isWeekend
FROM rCTE r
LEFT OUTER JOIN (SELECT * FROM holidays(YEAR(GETDATE()))) h
ON r.date = h.date
SELECT t.*, CONVERT(DATETIME,CONVERT(VARCHAR,c.date,101) + ' ' + CONVERT(varchar,ticketstartDateTime,108)) AS SLADateTime
FROM @tickets t
INNER JOIN pCal c
ON c.date = (SELECT MIN(date)
FROM pCal
WHERE date > t.ticketstartDateTime
AND isWeekend = 0
AND isHoliday = 0
Note that Holidays() is a function capable of returning holiday dates for your area. -
How to configure CUPS in Solaris 10 X86 and SPARC
Dears,
I need help in configuring CUPS for Solaris 10 X86 as well as on SPARC.
What i did?
Downloaded the CUPS 1.5.0
read the readme.txt
read the INSTALL.txt
Pre-req installation requires :-
CFLAGS= -i /some/directory \
CPPFLAGS = -i /some/directory \
CXXFLAGS = -I /some/directory \
DSOFLAGS = -L /some/directgry \
LDFLAGS = -L /some/directory \
./configure --
It errors out with
checking for gawk ... no
checking for mawk... no
checking for nawk ...nawk
chekcing for gcc ... no
checking for cc ... no
checking for cl.exe no
Configure error: no acceptable C compiler found in $PATH
see 'config.log' for more details
I installed all the missing dependencies from www.sunfreeware.com and I have the same problem.
I also tried to install the software packages from the operating system dvd... like for
ls -lrt gcc
gcc "SUNWgcc", "SUNWgccS", "SUNWgccruntime"
ls -lrt cc
cc "SUNWgccruntime", "SUNWlccom", "SUNWcctpx", "SUNWccisgn" , "SUNWccinv", "SUNWccfwctrl", " SUNWccfw", "SUNWccccrr", "SUNWccccr", "SUNWccccfg", "SUNWislcc",
"SUNWaccu", "SUNWaccr", "IPLTccons", " SUWgccs", "SUNWgcc", "SUNWmccom", "SUNWmcc", "SUNWusbccids", "SUNWusbccid"
ls -lrt gawk
no results
ls -lrt mawk
no results
ls -lrt cl.exe
no results
Is there any way should i follow apart from the above?
Rgds,
MkyCheck pkginfo -l for each package.
export the PATH variable where the packages are installed, like /usr/local/bin and etc. -
Add working days to a date excluding weekends and holidays
Hi there,
I need to write a function that will take a specified date and number of days to add as input parameters, and return the working day based on the number of days to add parameter, excluding weekends and any holidays held in a holiday table.
Here is my function so far -
CREATE OR REPLACE FUNCTION f_add_work_days(pd_date IN DATE
,pn_add_days IN PLS_INTEGER) RETURN DATE IS
pd_in_date DATE := pd_date;
ld_next_holiday DATE;
ln_days_left PLS_INTEGER := pn_add_days;
CURSOR cu_holiday(pn_date IN ge740.holdte%TYPE) IS
SELECT pck_utility.f_dtcnv(g.holdte)
FROM ge740 g
WHERE g.holdte >= pn_date
AND g.maint <> 'D'
ORDER BY g.holdte ASC;
BEGIN
OPEN cu_holiday(pck_utility.f_dtcnv(pd_in_date));
FETCH cu_holiday
INTO ld_next_holiday;
CLOSE cu_holiday;
LOOP
IF ln_days_left = 0 THEN
EXIT;
END IF;
pd_in_date := pd_in_date + 1;
IF pd_in_date > ld_next_holiday THEN
OPEN cu_holiday(pck_utility.f_dtcnv(pd_in_date));
FETCH cu_holiday
INTO ld_next_holiday;
CLOSE cu_holiday;
END IF;
CASE
WHEN TO_CHAR(pd_in_date
,'fmDAY') = 'SATURDAY' THEN
pd_in_date := pd_in_date + 2;
ln_days_left := ln_days_left - 1;
WHEN TO_CHAR(pd_in_date
,'fmDAY') = 'SUNDAY' THEN
pd_in_date := pd_in_date + 1;
ln_days_left := ln_days_left - 1;
WHEN pd_in_date = ld_next_holiday THEN
pd_in_date := pd_in_date + 1;
ln_days_left := ln_days_left - 1;
ELSE
ln_days_left := ln_days_left - 1;
END CASE;
END LOOP;
RETURN(pd_in_date);
END f_add_work_days;
I think there is something wrong/missing in the logic as I can't get it to cater for say a double bank holiday(25/26th Dec - if the input parameters are 24/12/2007 and 2, which should return the 28th but returns the 26th!!).
I'm relatively new to PL/SQL and Oracle, so any help, advice, ideas would be greatly appreciated!
thanks in advancesmth like
SQL> with holidays as (select to_date('10.06.2007','dd.mm.yyyy') h_dt from dual),
2 par as (select to_date('08.06.2007','dd.mm.yyyy') dt, 2 add_days from dual)
3 --
4 select min(dt) needed_date
5 from (select p.*,
6 h.*,
7 mod(to_char(dt, 'j'), 7),
8 sum(decode(mod(to_char(dt, 'j'), 7), 5, 0, 6, 0, 1)+--get rid of sat and sun
9 nvl2(h_dt, -1, 0)--check if the day is holiday
10 ) over(order by dt) s
11 from (select dt + level dt, add_days
12 from par
13 connect by level <= 100) p,
14 holidays h
15 where h_dt(+) = dt
16 order by 1)
17 where add_days = s
18 /
NEEDED_DATE
13.06.2007
SQL> ?
Message was edited by:
Volder
PS What Oracle version are you on? -
Fucntion to Calculate business days (exclude weekends & holidays) between two days
Hello,
I need to be able to calculate business days between two dates excluding weekends and holidays. I do have a date dimension and also flags which denote weekday, holiday. Would really appreciate help in building a udf for the business days calculation.
Thanks,Hi, Please take a look and tweak accordingly. Best of luck.
--Assuming data dimension table something like the following
--tblDateDim (DT date primary key,
flagHoliday bit,
flagWeekday bit
CREATE FUNCTION fnBusinessDays (
@StartDate DATE,
@EndDate DATE
RETURNS INT
AS
BEGIN
DECLARE @Days INT ;
SELECT @Days = count(*)
FROM tblDateDim --// date dimension
WHERE
( DT BETWEEN @StartDate AND @EndDate) --// dt is date column in the table.
AND --// also flags which denote weekday, holiday
flagHoliday = 0 --// flagHoliday= 1--Holiday;= 0 --workingday/businessday
AND
flagWeekday = 1 --// FlagWeekday = 1--businessday ; =0 --weekend (Saturday and Sunday)
RETURN (@Days)
END
GO -
ABAP HR- calculation of workind days (excluding weekend) for an employee
Hi,
I need to get number of working days between two dates excluding weekends for an employee. Please let me know below questions in this regard:
1. I have to use Factory calender or holiday calender for this purpose?
2. Will FM RKE_SELECT_FACTDAYS_FOR_PERIOD solve this purpose ?
Regards,
AleriaHi Aleria,
Use the FM DAY_ATTRIBUTES_GET in this FM pass the holiday and factory calendar of the employee along with the period. In the output structure if free day is set then it is SAT/SUN and if holiday is set then it is Public holiday marked in the calendar.
Regards
Bala -
Exclude weekends when substracting between two date values
Hi All,
I created a variable to get the value between 2 date values.
v_lag_days := TRUNC (l_header_rec.request_date) - TRUNC (SYSDATE);
if l_header_rec.request_date = sysdate i.e. 17-Feb-12 then it is fine, I will get the value as '0' which is correct.
But if l_header_rec.request_date = '20-Feb-12' (for example), it will give me as '3', but I should get the value as '1' excluding weekends.
When ever with in the 2 date values if it contains weekends, it should exclude those weekend days and should give me the value in the variable.
If you are not able to get my point clearly, please let me know.
Could anyone please let me know the logic for my scenario. Please help me out that would be really appreciated.
Thanks in advance,
Satya.Hi Satya.
This is the same example, without including the final day.
WITH aux1 AS
SELECT
CASE WHEN TO_NUMBER(TO_CHAR(TO_DATE(:date1,'YYYYMMDD')+(LEVEL-1),'D')) >= 6
THEN 0
ELSE 1
END inc
FROM dual
CONNECT BY LEVEL <= (TO_DATE(:date2,'YYYYMMDD') - TO_DATE(:date1,'YYYYMMDD'))
SELECT SIGN(:date2 - :date1)*SUM(inc) num_of_days FROM aux1;
-- ':date2 = 20120217'
-- ':date1 = 20120210'
NUM_OF_DAYS
5
-- ':date2 = 20120220'
-- ':date1 = 20120217'
NUM_OF_DAYS
1
-- ':date2 = 20120217'
-- ':date1 = 20120217'
NUM_OF_DAYS
0Hope this helps.
Best Regards
Edited by: sKr on 17-feb-2012 9:04 Improved for date2 = date1 -
Calculating days excluding weekends
Msy you please show me how to calculate the number of days in between 2 dates excluding weekends.
Hi!
Check out these FM-s:
K_ABC_WORKDAYS_FOR_PERIODS_GET
WEEK_GET_NR_OF_WORKDAYS
WLB3_GET_NUMBER_OF_WORKDAYS
There are some calendar relevant FM-s also. If there's set a production calendar in your SAP, you can check it also.
SE37 transaction, and search for CALENDAR fm.
Regards
Tamá -
Function module in SRM for adding number to date excluding weekends
Hi Experts,
Please help to get the standard FM in SRM for adding number to date and getting next date excluding weekends.
Thanks in Advance.
Thanks,
SahilThis kind of custom FM can be created easily.
But if you want to use standard FM then "DATE_CONVERT_TO_FACTORYDATE" FM is good but you need a factory calendar id which has all working days and weekend days specified (also public holidays if required). Then call this FM in loop for a count of days and it will give working day after "entered date + number of days"
So if calendar has only weekdays and weekends specified, it will add number of days in specified date excluding weekends.
Thanks,
Murtuza -
Time between dates excluding Weekends and Holidays
I am fairly new to Power Pivot and I am having trouble with this formula. I need my Cycle Time Days column to capture the days between CreatedDataTime and ClosedDateTime excluding Weekends and Holidays. I have a tab that has the holidays but
I can't get the formula correctly? Jill
CreatdDateTime ClosedDateTime Cycle Time Days
12/1/2014 12/10/2014first of all you need a separate time table which holds all possible dates for your model
there should be no gaps, it should contain full years and a column of datatype DateTime as unique key
once you have this in place add a calculated column to this table as
=IF(INT(FORMAT([Date], "w")) >= 6, "Weekend", "Workday")
then go back to your original table and add the following calculation for your [Cycle Time Days]-column:
=COUNTROWS(
FILTER(
'Dates',
Dates[Date] >= DateRanges[DateFrom]
&& Dates[Date] <= DateRanges[DateTo]
&& 'Dates'[IsWeekend] = "Workday"
Holidays are a bit more tricky but you can follow the same pattern but you need to get the holidays from somewhere
hth,
-gerhard
Gerhard Brueckl
blogging @ http://blog.gbrueckl.at
working @ http://www.pmOne.com -
DATEADD excluding weekends and holidays
select getdate(),dateadd(day,15,Getdate())
THis gets me today and 15 days from now. However I need 15 business days. I need to exclude weekends and holidays in here so that is looks like this.
where fulldate between getdate() and dateadd(day,15,Getdate())
I have a dim table for dates and have an isholiday = 0 or 1. I just can't figure out how to include this in the DATEADD expression.Hi,
try this link
http://www.sqlservercentral.com/Forums/Topic1247790-391-1.aspx
Hope will help you,
Questo post è fornito "così com'è". Non conferisce garanzie o diritti di alcun tipo. Ricorda di usare la funzione "segna come risposta" per i post che ti hanno aiutato a risolvere il problema e "deseleziona
come risposta" quando le risposte segnate non sono effettivamente utili. Questo è particolarmente utile per altri utenti che leggono il thread, alla ricerca di soluzioni a problemi similari. ENG: This posting is provided "AS IS"
with no warranties, and confers no rights. Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. Please Vote This As
Helpful if it helps to solve your issue. This can be beneficial to other community members reading the thread. -
Working day formula that excludes weekends and holidays in WEBI
Hi Guys,
Can we calculate a working day formula that excludes weekends and holidays in WEBI OR in Universe?
The universe I am working on is using stored procedures, so there are no joins or modelling done. Although there is a workday stored proc that I can bring in the universe.
I am just thinking if there is no modelling or joins done in the universe how will this help me in webi?
Your suggestions will be very helpful.
Thanks,
JitanOne more suggestion I need from you -
I have a Work_Calendar_VW that has the following columns -
Calendar_Date - 5/1/2014
Calendar_Year - 2014
Calendar_Month - 5
Calendar_Day - 1
Work_Day - 1
Day_Type - WD (Work Day) For Weekends this will be displayed as WE
The columns have all dates for current year in SQL Server.
I am going to pull this into the universe and create 2 derived tables to calculate MTD Day counts.
Derived Table 1 - Calculate Yest Work Day... this will remove all the weekends and holidays and give me the last working day. This includes couple of case statments to check each day if it's a working day or weekend.
For Work Day the above code will be 1 and for weekend 0
Derived Table 2 - This will give me the count of working days in current month using the above view and Derived table 1 Below is the code -
SELECT COUNT(*)
FROM Work_Calendar_VW
WHERE [Work_Day] = 1 AND
(Calendar_Date BETWEEN CAST(CONVERT(VARCHAR(25),MONTH(LastWoringkday()),101) + '/01/'
+ CONVERT(VARCHAR(25),YEAR(LastWoringkday()),101) AS DATE)
AND LastWoringkday()).
I cannot do joins because this universe has been built using stored proc and would like to implement this in BO universe.
let me know if this is the right approach.
Thanks,
Jitan -
Query - Invoices posted yesterday excluding weekends. Drill arrows missing.
Hi All,
I have a working query that returns all AR Invoices posted Yesterday excluding weekends.
There are however no drill down yellow arrows in the result for DocNum. Is there a way I can restructure my query so the drill own arrows appear?
declare @dt_today datetime,
@dt_yesterday datetime
select @dt_today = DATEADD(dd, DATEDIFF(dd,0,GETDATE()), 0)
select @dt_yesterday = case DATEPART(DW,@dt_today)
when 2 then DATEADD(dd, -3, @dt_today)
when 1 then DATEADD(dd, -2, @dt_today)
else DATEADD(dd, -1, @dt_today) end
SELECT T0.[DocNum] As 'Invoice number', T0.[DocDate] As 'Posting Date',
T0.[DocTotal] As 'Invoice Total', T0.[GrosProfit] As 'Gross Profit',
((T0.[GrosProfit] / (T0.[DocTotal] - T0.[GrosProfit]))*100) As 'Profit %',
T1.[CardCode], T1.[CardName], T0.[NumAtCard] As 'Customer PO#', T2.[GroupName],
T1.[Phone1], T1.[CntctPrsn]
FROM OINV T0 INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode INNER JOIN OCRG
T2 ON T1.GroupCode = T2.GroupCode WHERE T0.[DocDate] = @dt_yesterdayHi,
Try this way:
SELECT T0.DocNum As 'Invoice number', T0.DocDate As 'Posting Date',
T0.DocTotal As 'Invoice Total', T0.GrosProfit As 'Gross Profit',
((T0.GrosProfit / (T0.DocTotal - T0.GrosProfit))*100) As 'Profit %',
T1.CardCode, T1.CardName, T0.NumAtCard As 'Customer PO#', T2.GroupName,
T1.Phone1, T1.CntctPrsn
FROM OINV T0 INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode INNER JOIN OCRG
T2 ON T1.GroupCode = T2.GroupCode
WHERE DATEDIFF(DD, T0.DocDate, GetDate()) = 1 OR (DATEDIFF(DD, T0.DocDate, GetDate()) = 3 AND DATEPART(dw,GetDate()) in (1,2))
If still no arrow, add For Browse.
Thanks,
Gordon -
Configure IP SLA to generate syslog messages
Hi,
I want to use IP SLA to perform simple up/down monitoring of an IP host and to generate a syslog alert if the host goes down.
I have a 2650XM router running 12.4(23) IP Voice IOS.
My basic IP SLA config is hown below:
ip sla monitor 10
type echo protocol ipIcmpEcho 10.55.1.1
timeout 1000
frequency 10
ip sla monitor schedule 10 life forever start-time now
Based upon the output of the show ip sla monitor statistics command the up/down status of the host is being tracked ok.
GWYDAT01#sho ip sla monitor statistics
Round trip time (RTT) Index 10
Latest RTT: NoConnection/Busy/Timeout
Latest operation start time: 09:23:19.426 BST Thu May 20 2010
Latest operation return code: Timeout
Number of successes: 24!
logging buffered 4096 debugging
logging console informational
Number of failures: 4
Operation time to live: Forever
I cannot seem to get the system to generate syslog alerts however. I have added the ip sla monitor logging traps command but nothing seems to be generated.
logging buffered 4096 debugging
logging console informational
Please can you advise what I need to do to get syslog traps logged to the console and internal buffer.
ThanksHello Hitesh:
My name is Rogelio; I am a technician located in Argentina. I am experiencing quite the same problem mentioned in this thread.
Actually, I just see the trap sent ONCE (more preciselly, when the IP SLA object starts and times out in reaching the objective). ¿Is this the expected behavior?
I want the trap be sent (either SNMP or SYSLOG style) EVERY TIME the IP SLA object times out with the target. ¿ is it possible? The following is my basic configuration:
ip sla 2
icmp-echo 141.167.85.153
threshold 1500
frequency 15
ip sla schedule 2 life forever start-time now
ip sla reaction-configuration 2 react timeout threshold-type immediate action-type trapOnly
logging trap debugging
logging source-interface Loopback0
logging 141.167.121.222
snmp-server enable traps syslog
snmp-server enable traps ipsla
snmp-server host 141.167.121.222 mycommunity syslog ipsla
Your help will be greatly appreciated
regards, rogelio
Maybe you are looking for
-
IPod is not recognized by one computer
I got the iPod classic only about a month ago, and I got all the songs onto it fine, but the first time I went to charge it, something weird happened and it's not recognized in iTunes or on my computer. I plugged it into another computer, and it char
-
hi , can somebody give me sample code for using PCH logical database. and the events used in it
-
How can I get purchased apps from a different country store
Hi When I created my Apple ID I was in italy and obviously I used an Italian store. After few years I moved to Australia and I changed the country store for the apps store. After I backup reset and restore my iphone I lost most of the application. Is
-
Metadata warning -- and I don't know what to do? :(
Hello, I recently moved my Lightroom from a pc to a mac. Right after I started getting a pop up that says: "the metadata for this photo has been changed by another application. Should lightroom import setting from disk or overwrite settings with tho
-
Hi, I am trying to get a script executed in a second xterm window. Using the following command: xterm -e npg & where npg is a bash script. However the window flashes on the screen and disappears within moments. The script does not seem to run. If i t