<div>Very true. I hadn't thought of this really, but I think Kjetil is also right to point out the relevance of short versus long deadlines. If you did&nbsp;make the deadlines take each &quot;off day&quot; into account then&nbsp;when you're&nbsp;deciding how long you need the deadline you'd need to think about weeks as multiples of 5 days (assuming simple calendar). And really if you're going to have a deadline over 10 days shirely you start talking in weeks or months and then the adjustment to a working day is a nicety but not that important anyway.
</div>
<div>&nbsp;</div>
<div>However I appreciate that in other scenarios true FC calculations are important.</div>
<div>&nbsp;</div>
<div>My 2p (soon to be 2c again!)</div>
<div>Mark<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 9/28/06, <b class="gmail_sendername">Soady, Phil</b> &lt;<a href="mailto:phil.soady@sap.com">phil.soady@sap.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi&nbsp;&nbsp;Kjetil,<br>I think you have hit the nail on the head and this is why Paul<br>correctly believes the sample solutions are&nbsp;&nbsp;wrong (don't address his
<br>issue).<br><br>The sample solutions only convert a calculated date into a working day.<br>They do not calculate an offset of x working days from now.<br><br>The only way to do this is to call the calendar test x times for each
<br>day<br>from now until the number of days tested as positive as as work days<br>equals the desired offset.<br><br>The sample solutions simply correct a date to next factory calendar<br>date.<br>That's my quick interpretation of the code at least.
<br><br>I have also seen this logic mistake around factory calendar in other<br>custom code stretches.<br><br>ie incorrect.<br>today (t) + offset (n) = y.<br>corrected date (df) = factory_cal( y).<br>df is now = to y or higher to reach first working after y.
<br><br>However this is flawed, since Y is not (n) working days more than (t).<br>A loop to call the calendar check (n) times is required.<br><br>Cheers<br>Phil.<br><br><br>Phil Soady<br>Solution Architect<br>Netweaver Consulting
<br>SAP Australia<br>M&nbsp;&nbsp;+61 412 213 079<br>F&nbsp;&nbsp;+61 2 9957 7263<br>mailto:<a href="mailto:phil.soady@sap.com">phil.soady@sap.com</a><br><br><br>-----Original Message-----<br>From: <a href="mailto:sap-wug-bounces@mit.edu">sap-wug-bounces@mit.edu
</a> [mailto:<a href="mailto:sap-wug-bounces@mit.edu">sap-wug-bounces@mit.edu</a>] On Behalf<br>Of Kjetil Kilhavn<br>Sent: Thursday, 28 September 2006 6:31 PM<br>To: SAP Workflow Users' Group<br>Subject: RE: Deadlines based on factory calendar - is The Book wrong?
<br><br>Hmmmm... I looked a little more at the code in the presentation<br>(embedded text file), and it looks like it is exactly the same solution<br>as the appendix in the book.<br><br>However, there is one thing that makes me wonder about your requirement.
<br>You say that not only should the deadline be a working day, but only<br>working days should be taken into account. It may make some sense for<br>very short deadlines, e.g. a two-day deadline, but should a 15-day<br>deadline be a three-week deadline? In the worst case (I don't know what
<br>options the standard function modules give you) you will have to loop<br>over every date in the range and check if it is a working day or not.<br>--<br>Kjetil Kilhavn, Statoil OFT GBS BAS DEV SAP<br><br><br>&gt; -----Original Message-----
<br>&gt; From: Kjetil Kilhavn<br>&gt; Sent: 28. september 2006 10:14<br>&gt; To: 'SAP Workflow Users' Group'<br>&gt; Subject: RE: Deadlines based on factory calendar - is The Book wrong?<br>&gt;<br>&gt; I think this has been discussed several times before (have
<br>&gt; you searched the archives?) in this group, but I can't recall<br>&gt; if anyone has had quite the same requirements as you.<br>&gt;<br>&gt; I have attached a PDF file (can't remember where I got it,<br>&gt; whether it was in this group or perhaps on ASUG's site) with
<br>&gt; another implementation, and a PowerPoint file with an<br>&gt; implementation that seems to be exactly what you want.<br>&gt;<br>&gt; If you find none of these match your needs than please create<br>&gt; the ultimate solution and share it with the rest of us.
<br>&gt; --<br>&gt; Kjetil Kilhavn, Statoil OFT GBS BAS DEV SAP<br>&gt;<br>&gt;<br>&gt; &gt; -----Original Message-----<br>&gt; &gt; From: <a href="mailto:sap-wug-bounces@mit.edu">sap-wug-bounces@mit.edu</a><br>&gt; &gt; [mailto:
<a href="mailto:sap-wug-bounces@mit.edu">sap-wug-bounces@mit.edu</a>] On Behalf Of<br>&gt; &gt; <a href="mailto:Paul.Bakker@osr.treasury.qld.gov.au">Paul.Bakker@osr.treasury.qld.gov.au</a><br>&gt; &gt; Sent: 28. september 2006 09:13
<br>&gt; &gt; To: <a href="mailto:sap-wug@mit.edu">sap-wug@mit.edu</a><br>&gt; &gt; Subject: Deadlines based on factory calendar - is The Book wrong?<br>&gt; &gt;<br>&gt; &gt; Hello all,<br>&gt; &gt;<br>&gt; &gt; We have a requirement to calculate the deadline for a
<br>&gt; &gt; workitem (eg Latest<br>&gt; &gt; Start) based on the Factory Calendar.<br>&gt; &gt;<br>&gt; &gt; For example, if the workitem was created on a Thursday and<br>&gt; &gt; the 'Latest Start' deadline is +3 days, then it should be
<br>&gt; &gt; triggered on the following Tuesday (not Sunday). In other<br>&gt; &gt; words, it should only take working days into account.<br>&gt; &gt;<br>&gt; &gt; Surprisingly, SAP standard does not cater for this scenario.
<br>&gt; &gt; I therefore implemented the solution suggested in the The<br>&gt; &gt; Book, in Appendix A9. It shows you how to create a custom<br>&gt; &gt; deadline object based on the factory calendar, and use the<br>&gt; &gt; expression 
ZDEADLINE.DATE as the reference date in the step.<br>&gt; &gt;<br>&gt; &gt; Surprisingly (again), this solution DOES NOT work. Deadlines<br>&gt; &gt; are triggered without taking weekends into account.<br>&gt; &gt;<br>&gt; &gt; When I had a closer look at it, I noticed that the Factory
<br>&gt; &gt; Calendar is only being used to determine the Workitem<br>&gt; &gt; _Creation Date_; it is not being used to calculate the Latest<br>&gt; &gt; Start Date. The book even seems to concede this:<br>&gt; &gt;<br>
&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;Note that the reference date gives the date based on<br>&gt; &gt; the factory calendar, but any offset will simply be added to<br>&gt; &gt; the reference date as normal&quot;.<br>&gt; &gt;<br>&gt; &gt; If this really is the case, then what is the point of
<br>&gt; &gt; implementing this solution?<br>&gt; &gt;<br>&gt; &gt; Has anyone gotten it to work? I'm sure it must be me... sigh.<br>&gt; &gt;<br>&gt; &gt; cheers<br>&gt; &gt; Paul<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; **************************************************************
<br>&gt; &gt; **************************************************************<br>&gt; &gt; **************************<br>&gt; &gt;<br>&gt; &gt; Only an individual or entity who is intended to be a<br>&gt; &gt; recipient of this e-mail may access or use the information
<br>&gt; &gt; contained in this e-mail or any of its attachments.&nbsp;&nbsp;Opinions<br>&gt; &gt; contained in this e-mail or any of its attachments do not<br>&gt; &gt; necessarily reflect the opinions of Queensland Treasury.<br>&gt; &gt;
<br>&gt; &gt; The contents of this e-mail and any attachments are<br>&gt; &gt; confidential and may be legally privileged and the subject of<br>&gt; &gt; copyright.&nbsp;&nbsp;If you have received this e-mail in error, please<br>&gt; &gt; notify Queensland Treasury immediately and erase all copies
<br>&gt; &gt; of the e-mail and the attachments.&nbsp;&nbsp;Queensland Treasury uses<br>&gt; &gt; virus scanning software.&nbsp;&nbsp;However, it is not liable for<br>&gt; &gt; viruses present in this e-mail or in any attachment.<br>&gt; &gt;
<br>&gt; &gt; **************************************************************<br>&gt; &gt; **************************************************************<br>&gt; &gt; **************************<br>&gt; &gt;<br>&gt; &gt; _______________________________________________
<br>&gt; &gt; SAP-WUG mailing list<br>&gt; &gt; <a href="mailto:SAP-WUG@mit.edu">SAP-WUG@mit.edu</a><br>&gt; &gt; <a href="http://mailman.mit.edu/mailman/listinfo/sap-wug">http://mailman.mit.edu/mailman/listinfo/sap-wug</a>
<br>&gt; &gt;<br><br><br>-------------------------------------------------------------------<br>The information contained in this message may be CONFIDENTIAL and is<br>intended for the addressee only. Any unauthorised use, dissemination of
<br>the<br>information or copying of this message is prohibited. If you are not the<br>addressee, please notify the sender immediately by return e-mail and<br>delete<br>this message.<br>Thank you.<br><br>_______________________________________________
<br>SAP-WUG mailing list<br><a href="mailto:SAP-WUG@mit.edu">SAP-WUG@mit.edu</a><br><a href="http://mailman.mit.edu/mailman/listinfo/sap-wug">http://mailman.mit.edu/mailman/listinfo/sap-wug</a><br><br>_______________________________________________
<br>SAP-WUG mailing list<br><a href="mailto:SAP-WUG@mit.edu">SAP-WUG@mit.edu</a><br><a href="http://mailman.mit.edu/mailman/listinfo/sap-wug">http://mailman.mit.edu/mailman/listinfo/sap-wug</a><br></blockquote></div><br>