Deadlines based on factory calendar - is The Book wrong?

Mark Pyc mark.pyc at gmail.com
Thu Sep 28 05:27:54 EDT 2006


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 make
the deadlines take each "off day" into account then when you're 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.

However I appreciate that in other scenarios true FC calculations are
important.

My 2p (soon to be 2c again!)
Mark


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


More information about the SAP-WUG mailing list