<DIV> </DIV> <DIV>Please see the attached pdf document i was refering for deadline calculation. Do you all think this is correct ? I was thinking this is wrong as this always gives me next working day instead of calculating total number of days based on factory calendar. </DIV> <DIV> </DIV> <DIV>May be i wrong.. Just for clarification..</DIV> <DIV> </DIV> <DIV> </DIV> <DIV> </DIV> <DIV>Thanks,</DIV> <DIV> </DIV> <DIV>Jammi<BR><BR><B><I>Paul.Bakker@osr.treasury.qld.gov.au</I></B> wrote:</DIV> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Jocelyn,<BR><BR>You are right - and the book is right! I was simply using the ZDeadline<BR>objects the wrong way. Mike P set me straight on that.<BR><BR>Apologies for the confusion. I'll never question The Book again :-)<BR><BR>cheers<BR>Paul<BR><BR><BR><BR><BR>|---------+----------------------------><BR>| | "Dart, Jocelyn" |<BR>| |
<JOCELYN.DART@SAP|<BR>| | .com> |<BR>| | Sent by: |<BR>| | sap-wug-bounces@m|<BR>| | it.edu |<BR>| | |<BR>| | |<BR>| | 05/10/2006 11:20 |<BR>| | Please respond to|<BR>| | "SAP Workflow |<BR>| | Users' Group" |<BR>| | |<BR>|---------+----------------------------><BR>>--------------------------------------------------------------------------------------------------------------------------|<BR>| |<BR>| To: "SAP Workflow Users' Group" <SAP-WUG@MIT.EDU>|<BR>| cc: |<BR>| Subject: RE: Deadlines based on factory calendar - is The Book wrong? |<BR>>--------------------------------------------------------------------------------------------------------------------------|<BR><BR><BR><BR><BR>Hi Folks,<BR>The Book wrong??? !!! Say it isn't so! ;-)<BR><BR>No seriously folks this one definitely works.<BR>There are a couple of different ways of coding it but all should end up<BR>using fm END_TIME_DETERMINE which does count up the working days from<BR>your base
date/time.<BR><BR>Things that sometimes can go wrong on site are:<BR>* You aren't passing a factory calendar id or aren't passing the correct<BR>factory calendar id<BR>* Your factory calendar doesn't exist - or doesn't extend to the dates<BR>you are using - default approach is usually to try again without factory<BR>calendar<BR>* Ditto for the holiday calendar linked to your factory calendar<BR>* Your baseline date/time is wrong - e.g. the date/time passed in is<BR>from the wrong timezone - remember the baseline date/time needs to be<BR>based on the work being done - not the agents doing it<BR><BR>If you want to pass in a specific start date/time rather than use<BR>today's date/time that's fine of course - you would simply need to<BR>extend the solution in the book a little further.<BR><BR>You should not have to write your own code unless you don't want to use<BR>a factory calendar at all - e.g. if you only have a holiday calendar (in<BR>which case you are on your
own...).<BR><BR>And yes if you want to calculate long deadlines based on working days -<BR>60 days is more effective than 2 months.<BR><BR>Oh and if you have to work out an "early" deadline - i.e. number of days<BR>BEFORE a certain date, then use fm START_TIME_DETERMINE. Works a treat.<BR><BR>Regards,<BR>Jocelyn Dart<BR>Senior Consultant<BR>SAP Australia Pty Ltd.<BR>Level 1/168 Walker St.<BR>North Sydney<BR>NSW, 2060<BR>Australia<BR>T +61 412 390 267<BR>M + 61 412 390 267<BR>E jocelyn.dart@sap.com<BR>http://www.sap.com<BR><BR>The information contained in or attached to this electronic transmission<BR>is confidential and may be legally privileged. It is intended only for<BR>the person or entity to which it is addressed. If you are not the<BR>intended recipient, you are hereby notified that any distribution,<BR>copying, review, retransmission, dissemination or other use of this<BR>electronic transmission or the information contained in it is strictly<BR>prohibited. If you
have received this electronic transmission in error,<BR>please immediately contact the sender to arrange for the return of the<BR>original documents.<BR>Electronic transmission cannot be guaranteed to be secure and<BR>accordingly, the sender does not accept liability for any such data<BR>corruption, interception, unauthorized amendment, viruses, delays or the<BR>consequences thereof.<BR>Any views expressed in this electronic transmission are those of the<BR>individual sender, except where the message states otherwise and the<BR>sender is authorized to state them to be the views of SAP AG or any of<BR>its subsidiaries. SAP AG, its subsidiaries, and their directors,<BR>officers and employees make no representation nor accept any liability<BR>for the accuracy or completeness of the views or information contained<BR>herein. Please be aware that the furnishing of any pricing information/<BR>business proposal herein is indicative only, is subject to change and<BR>shall not be
construed as an offer or as constituting a binding<BR>agreement on the part of SAP AG or any of its subsidiaries to enter into<BR>any relationship, unless otherwise expressly stated.<BR><BR><BR>-----Original Message-----<BR>From: sap-wug-bounces@mit.edu [mailto:sap-wug-bounces@mit.edu] On Behalf<BR>Of Mike Pokraka<BR>Sent: Tuesday, 03 October 2006 6:37 PM<BR>To: SAP Workflow Users' Group<BR>Subject: Re: Deadlines based on factory calendar - is The Book wrong?<BR><BR>Got onto a system and grabbed a quick moment to test it:<BR><BR>FM END_TIME_DETERMINE, offset 5 unit TAG (day), fcal 99 (International):<BR>5 days from now is Sunday 8-Oct. The FM correctly spits out Tuesday<BR>10-Oct, which is NOT simply the next working day.<BR>Today -2 days is Sunday 1-Oct, it returns Friday 29-Sep.<BR><BR>The thing it doesn't do is factory time. Run it at 3am and it returns<BR>3am<BR>of the correct day.<BR><BR>Cheers,<BR>Mike<BR><BR><BR>On Tue, October 3, 2006 00:43, Mike Pokraka
wrote:<BR>> Huh? Confused is me. I think it's due to answering wugs late at night<BR>as<BR>> a distraction from the tedium of doing overdue stuff for the taxman.<BR>> I don't have the book handy but I think I've based mine on the book<BR>and<BR>> it works.<BR>> Maybe the book uses a different FM, I use END_TIME_DETERMINE and it<BR>does<BR>> the job for me. I think.<BR>> The nice thing about the FM is it will also work backwards.<BR>><BR>> Cheers,<BR>> Mike<BR>><BR>><BR>> Paul.Bakker@osr.treasury.qld.gov.au wrote:<BR>>> Actually, I think you are missing something!<BR>>><BR>>> The problem with the code in The Book is that if you specify a 3-day<BR>>> deadline on a Friday, it will be triggered on the Monday. (It simply<BR>>> adds 3<BR>>> days, and then checks that Monday is a working day).<BR>>><BR>>> It should instead be triggered on the Wednesday, because that is when<BR>3<BR>>>
full working days have elapsed.<BR>>><BR>>> cheers<BR>>> Paul<BR>>><BR>>><BR>>><BR>>> |---------+------------------------------><BR>>> | | Mike Pokraka |<BR>>> | | <ASAP@WORKFLOWCONNE|<BR>>> | | ctions.com> |<BR>>> | | Sent by: |<BR>>> | | sap-wug-bounces@mit|<BR>>> | | .edu |<BR>>> | | |<BR>>> | | |<BR>>> | | 03/10/2006 08:23 |<BR>>> | | Please respond to |<BR>>> | | "SAP Workflow |<BR>>> | | Users' Group" |<BR>>> | | |<BR>>> |---------+------------------------------><BR>>><BR>>-----------------------------------------------------------------------<BR>---------------------------------------------------|<BR>>> |<BR>>> |<BR>>> | To: "SAP Workflow Users' Group" <SAP-WUG@MIT.EDU><BR>>> |<BR>>> | cc:<BR>>> |<BR>>> | Subject: Re: Deadlines based on factory calendar - is The<BR>>> Book
wrong? |<BR>>><BR>>-----------------------------------------------------------------------<BR>---------------------------------------------------|<BR>>><BR>>><BR>>><BR>>><BR>>> Hi Paul,<BR>>> Perhaps I misunderstood, but I grasped it differently. What I got was<BR>>> that factory calendars become less relevant as time goes on. You<BR>might<BR>>> as well specify 15 working days as three weeks / 21 days because an<BR>>> extra day won't make much difference, as opposed to a 2 day deadline<BR>>> kicking in on a task created on a Friday afternoon, giving the poor<BR>>> bloke an hour to do his job.<BR>>><BR>>> I've not had to trawl through working days either. The book and the<BR>doc<BR>>> Kjetil sent both refer to the same principle. Specify an offset and<BR>the<BR>>> deadline object gives you the end date in working days from TODAY. Do<BR>>> not add anything, just plug the
object attributes into the<BR>expression.<BR>>> So an instance of a deadline object with a key including an offset of<BR>>> today+howevermanydaysuntilnextsaturday should have Monday in it's<BR>>> DEADLINEDATE attribute.<BR>>><BR>>> ....or am I missing something?<BR>>><BR>>> Cheers,<BR>>> Mike<BR>>><BR>>> Paul.Bakker@osr.treasury.qld.gov.au wrote:<BR>>>> WUG Experts,<BR>>>><BR>>>> Thank you very much for all your valuable comments on the factory<BR>>> calendar<BR>>>> / deadline problem.<BR>>>><BR>>>> I am going to go ahead and code the solution that was suggested :<BR>>> increment<BR>>>> one WORKING day at a time, until the deadline offset is reached. I<BR>will<BR>>>> share the code with you once it's bedded down.<BR>>>><BR>>>> At first I didn't grasp the distinction that Kjetil made between<BR>short<BR>>>
and<BR>>>> long deadlines, but now I get it. A deadline specified in DAYs<BR>should<BR>>>> be<BR>>>> interpreted as working days, whereas a deadline specified in MONTHS<BR>or<BR>>>> YEARS would not be.<BR>>>><BR>>>> thanks again - this group is great!<BR>>>> Paul<BR>>>><BR>>>><BR>>>><BR>>>> |---------+----------------------------><BR>>>> | | "Kjetil Kilhavn" |<BR>>>> | | <KJETILK@STATOIL.|<BR>>>> | | com> |<BR>>>> | | Sent by: |<BR>>>> | | sap-wug-bounces@m|<BR>>>> | | it.edu |<BR>>>> | | |<BR>>>> | | |<BR>>>> | | 28/09/2006 18:30 |<BR>>>> | | Please respond to|<BR>>>> | | "SAP Workflow |<BR>>>> | | Users' Group" |<BR>>>> | | |<BR>>>>
|---------+----------------------------><BR>>>><BR>>>><BR>------------------------------------------------------------------------<BR>--------------------------------------------------|<BR>>><BR>>>> |<BR>>> |<BR>>>> | To: "SAP Workflow Users' Group" <SAP-WUG@MIT.EDU><BR>>> |<BR>>>> | cc:<BR>>> |<BR>>>> | Subject: RE: Deadlines based on factory calendar - is The<BR>>>> Book<BR>>> wrong? |<BR>>>><BR>------------------------------------------------------------------------<BR>--------------------------------------------------|<BR>>><BR>>>><BR>>>><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<BR>solution<BR>>>> as the appendix in the book.<BR>>>><BR>>>> However, there is one thing that makes me
wonder about your<BR>>>> 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<BR>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<BR>what<BR>>>> options the standard function modules give you) you will have to<BR>loop<BR>>>> over every date in the range and check if it is a working day or<BR>not.<BR>>>> --<BR>>>> Kjetil Kilhavn, Statoil OFT GBS BAS DEV SAP<BR>>>><BR>>>><BR>>>>> -----Original Message-----<BR>>>>> From: Kjetil Kilhavn<BR>>>>> Sent: 28. september 2006 10:14<BR>>>>> To: 'SAP Workflow Users' Group'<BR>>>>> Subject: RE: Deadlines based on factory calendar - is The
Book<BR>wrong?<BR>>>>><BR>>>>> I think this has been discussed several times before (have<BR>>>>> you searched the archives?) in this group, but I can't recall<BR>>>>> if anyone has had quite the same requirements as you.<BR>>>>><BR>>>>> I have attached a PDF file (can't remember where I got it,<BR>>>>> whether it was in this group or perhaps on ASUG's site) with<BR>>>>> another implementation, and a PowerPoint file with an<BR>>>>> implementation that seems to be exactly what you want.<BR>>>>><BR>>>>> If you find none of these match your needs than please create<BR>>>>> the ultimate solution and share it with the rest of us.<BR>>>>> --<BR>>>>> Kjetil Kilhavn, Statoil OFT GBS BAS DEV SAP<BR>>>>><BR>>>>><BR>>>>>> -----Original Message-----<BR>>>>>> From:
sap-wug-bounces@mit.edu<BR>>>>>> [mailto:sap-wug-bounces@mit.edu] On Behalf Of<BR>>>>>> Paul.Bakker@osr.treasury.qld.gov.au<BR>>>>>> Sent: 28. september 2006 09:13<BR>>>>>> To: sap-wug@mit.edu<BR>>>>>> Subject: Deadlines based on factory calendar - is The Book wrong?<BR>>>>>><BR>>>>>> Hello all,<BR>>>>>><BR>>>>>> We have a requirement to calculate the deadline for a<BR>>>>>> workitem (eg Latest<BR>>>>>> Start) based on the Factory Calendar.<BR>>>>>><BR>>>>>> For example, if the workitem was created on a Thursday and<BR>>>>>> the 'Latest Start' deadline is +3 days, then it should be<BR>>>>>> triggered on the following Tuesday (not Sunday). In other<BR>>>>>> words, it should only take working days into
account.<BR>>>>>><BR>>>>>> Surprisingly, SAP standard does not cater for this scenario.<BR>>>>>> I therefore implemented the solution suggested in the The<BR>>>>>> Book, in Appendix A9. It shows you how to create a custom<BR>>>>>> deadline object based on the factory calendar, and use the<BR>>>>>> expression ZDEADLINE.DATE as the reference date in the step.<BR>>>>>><BR>>>>>> Surprisingly (again), this solution DOES NOT work. Deadlines<BR>>>>>> are triggered without taking weekends into account.<BR>>>>>><BR>>>>>> When I had a closer look at it, I noticed that the Factory<BR>>>>>> Calendar is only being used to determine the Workitem<BR>>>>>> _Creation Date_; it is not being used to calculate the Latest<BR>>>>>> Start Date. The book even seems to concede
this:<BR>>>>>><BR>>>>>> "Note that the reference date gives the date based on<BR>>>>>> the factory calendar, but any offset will simply be added to<BR>>>>>> the reference date as normal".<BR>>>>>><BR>>>>>> If this really is the case, then what is the point of<BR>>>>>> implementing this solution?<BR>>>>>><BR>>>>>> Has anyone gotten it to work? I'm sure it must be me... sigh.<BR>>>>>><BR>>>>>> cheers<BR>>>>>> Paul<BR>>>>>><BR>>>>>><BR>>>>>> **************************************************************<BR>>>>>> **************************************************************<BR>>>>>> **************************<BR>>>>>><BR>>>>>> Only an individual or entity who is intended to be
a<BR>>>>>> recipient of this e-mail may access or use the information<BR>>>>>> contained in this e-mail or any of its attachments. Opinions<BR>>>>>> contained in this e-mail or any of its attachments do not<BR>>>>>> necessarily reflect the opinions of Queensland Treasury.<BR>>>>>><BR>>>>>> The contents of this e-mail and any attachments are<BR>>>>>> confidential and may be legally privileged and the subject of<BR>>>>>> copyright. If you have received this e-mail in error, please<BR>>>>>> notify Queensland Treasury immediately and erase all copies<BR>>>>>> of the e-mail and the attachments. Queensland Treasury uses<BR>>>>>> virus scanning software. However, it is not liable for<BR>>>>>> viruses present in this e-mail or in any attachment.<BR>>>>>><BR>>>>>>
**************************************************************<BR>>>>>> **************************************************************<BR>>>>>> **************************<BR>>>>>><BR>>>>>> _______________________________________________<BR>>>>>> SAP-WUG mailing list<BR>>>>>> SAP-WUG@mit.edu<BR>>>>>> http://mailman.mit.edu/mailman/listinfo/sap-wug<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<BR>of<BR>>> the<BR>>>> information or copying of this message is prohibited. If you are not<BR>>>> 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>>>> SAP-WUG@mit.edu<BR>>>> http://mailman.mit.edu/mailman/listinfo/sap-wug<BR>>>><BR>>>><BR>>>><BR>>>> _______________________________________________<BR>>>> SAP-WUG mailing list<BR>>>> SAP-WUG@mit.edu<BR>>>> http://mailman.mit.edu/mailman/listinfo/sap-wug<BR>>><BR>>> _______________________________________________<BR>>> SAP-WUG mailing list<BR>>> SAP-WUG@mit.edu<BR>>> http://mailman.mit.edu/mailman/listinfo/sap-wug<BR>>><BR>>><BR>>><BR>>> _______________________________________________<BR>>> SAP-WUG mailing list<BR>>> SAP-WUG@mit.edu<BR>>> http://mailman.mit.edu/mailman/listinfo/sap-wug<BR>><BR>>
_______________________________________________<BR>> SAP-WUG mailing list<BR>> SAP-WUG@mit.edu<BR>> http://mailman.mit.edu/mailman/listinfo/sap-wug<BR>><BR><BR><BR>_______________________________________________<BR>SAP-WUG mailing list<BR>SAP-WUG@mit.edu<BR>http://mailman.mit.edu/mailman/listinfo/sap-wug<BR><BR>_______________________________________________<BR>SAP-WUG mailing list<BR>SAP-WUG@mit.edu<BR>http://mailman.mit.edu/mailman/listinfo/sap-wug<BR><BR><BR><BR>_______________________________________________<BR>SAP-WUG mailing list<BR>SAP-WUG@mit.edu<BR>http://mailman.mit.edu/mailman/listinfo/sap-wug<BR></BLOCKQUOTE><BR><p> 
                <hr size=1>Stay in the know. Pulse on the new Yahoo.com. <a href="http://us.rd.yahoo.com/evt=42974/*http://www.yahoo.com/preview"> Check it out.</a>