Deadlines based on factory calendar - is The Book wrong?

Stevens, Seth Seth.Stevens at anadarko.com
Mon Oct 2 18:56:32 EDT 2006


I am doing this similar to your first suggestion.  I have a method
called zCalculateDeadlineDate that accepts the number of days and
returns the date based on working days.  I put the return into a
container element and use it as the deadline date.

Look at the function modules DATE_CONVERT_TO_FACTORYDATE and
FACTORYDATE_CONVERT_TO_DATE.  You'll have to first get today's date
based on the factory calendar, then add your days, then convert the new
date based on the factory calendar.

This solution seems to work well for us.

Thanks,
Seth 

-----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: Monday, October 02, 2006 5:43 PM
To: SAP Workflow Users' Group
Subject: Re: Deadlines based on factory calendar - is The Book wrong?

Actually, I think you are missing something!

The problem with the code in The Book is that if you specify a 3-day
deadline on a Friday, it will be triggered on the Monday. (It simply
adds 3 days, and then checks that Monday is a working day).

It should instead be triggered on the Wednesday, because that is when 3
full working days have elapsed.

cheers
Paul



|---------+------------------------------>
|         |           Mike Pokraka       |
|         |           <asap at workflowconne|
|         |           ctions.com>        |
|         |           Sent by:           |
|         |           sap-wug-bounces at mit|
|         |           .edu               |
|         |                              |
|         |                              |
|         |           03/10/2006 08:23   |
|         |           Please respond to  |
|         |           "SAP Workflow      |
|         |           Users' Group"      |
|         |                              |
|---------+------------------------------>
 
>-----------------------------------------------------------------------
---------------------------------------------------|
  |
|
  |       To:       "SAP Workflow Users' Group" <sap-wug at mit.edu>
|
  |       cc:
|
  |       Subject:  Re: Deadlines based on factory calendar - is The
Book wrong?                                             |
 
>-----------------------------------------------------------------------
---------------------------------------------------|




Hi Paul,
Perhaps I misunderstood, but I grasped it differently. What I got was
that factory calendars become less relevant as time goes on. You might
as well specify 15 working days as three weeks / 21 days because an
extra day won't make much difference, as opposed to a 2 day deadline
kicking in on a task created on a Friday afternoon, giving the poor
bloke an hour to do his job.

I've not had to trawl through working days either. The book and the doc
Kjetil sent both refer to the same principle. Specify an offset and the
deadline object gives you the end date in working days from TODAY. Do
not add anything, just plug the object attributes into the expression.
So an instance of a deadline object with a key including an offset of
today+howevermanydaysuntilnextsaturday should have Monday in it's
DEADLINEDATE attribute.

.....or am I missing something?

Cheers,
Mike

Paul.Bakker at osr.treasury.qld.gov.au wrote:
> WUG Experts,
>
> Thank you very much for all your valuable comments on the factory
calendar
> / deadline problem.
>
> I am going to go ahead and code the solution that was suggested :
increment
> one WORKING day at a time, until the deadline offset is reached. I 
> will share the code with you once it's bedded down.
>
> At first I didn't grasp the distinction that Kjetil made between short
and
> long deadlines, but now I get it. A deadline specified in DAYs should 
> be interpreted as working days, whereas a deadline specified in MONTHS

> or YEARS would not be.
>
> thanks again - this group is great!
> Paul
>
>
>
> |---------+---------------------------->
> |         |           "Kjetil Kilhavn" |
> |         |           <KJETILK at statoil.|
> |         |           com>             |
> |         |           Sent by:         |
> |         |           sap-wug-bounces at m|
> |         |           it.edu           |
> |         |                            |
> |         |                            |
> |         |           28/09/2006 18:30 |
> |         |           Please respond to|
> |         |           "SAP Workflow    |
> |         |           Users' Group"    |
> |         |                            |
> |---------+---------------------------->
>
>-----------------------------------------------------------------------
---------------------------------------------------|

>   |
|
>   |       To:       "SAP Workflow Users' Group" <sap-wug at mit.edu>
|
>   |       cc:
|
>   |       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

_______________________________________________
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

-----------------------------------------
*Please note my E-Mail Address has changed.  Please update your
contact list*

Anadarko Confidentiality Notice:  
This electronic transmission and any attached documents or other
writings are intended only for the person or entity to which it is
addressed and may contain information that is privileged,
confidential or otherwise protected from disclosure.  If you have
received this communication in error, please immediately notify
sender by return e-mail and destroy the communication. Any
disclosure, copying, distribution or the taking of any action
concerning the contents of this communication or any attachments by
anyone other than the named recipient is strictly prohibited.





More information about the SAP-WUG mailing list