Deadlines and SAP Calendar

Dart, Jocelyn jocelyn.dart at sap.com
Tue Dec 18 18:54:51 EST 2001


Hi Arpad,=20
You need to instantiate your deadline object in a prior step e.g.=20
using SYSTEM.GENERICINSTANTIATE.  This sets up the factory calendar,=20
offset and time unit to be used, and the resulting object instance is=20
assigned to a workflow container element.=20
 
You then assign the attributes of your container element object =
instance
to the deadline date/time.=20
If the date and time are coded as virtual attributes, then they=20
will be called when used.  So when the work item is created, the=20
date and time attributes will be calculated.  Giving you  a
date/time calculated based on current work item creation time, i.e.
system date/time at the time the attributes are calculated is=20
work item creation time.=20
Regards,
Jocelyn
 
 
-----Original Message-----
From: Vincze =C1rp=E1d [mailto:Arpad.Vincze at itelligence.hu]
Sent: Wednesday, 19 December 2001 5:38 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Deadlines and SAP Calendar
 
 
Hi Jocelyn and Ravi,
 
  I understand you partly, so I try to interpret your solution.
  The latest start or latest end deadline is an expression, which refer =
to a
container variable.
  This container variable can be set by an OO method xxxx. That is =
clear.
 
  One question is remained (for me), when will be this xxxx method =
executed?
 
 
 My imagination is the following:
 
 The previous work item - before the deadline controlled one - has to =
set
this virtual container "reference" variable.
 The previous work item last step is (at the case of the normal or
successful execution) the call of this xxxx method.
 
 Am I right or there is a simpler or nicer solution?
 
 Regards:
               Arpad
 
 
-----Original Message-----
From: Ravi Shankar [mailto:ravisap at yahoo.com]
Sent: Tuesday, December 18, 2001 5:21 PM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Deadlines and SAP Calendar
 
 
Vincze,
    The simplest way to do is to define a container varibale in the WF
container to hold the deadline date. Then have a contianer operation (
which is better than a background method - for performance reasons) to
set the container element defined. You can use the code to calculate
the actual date in the virtual attribute( use it as virtual attribute
for whaatever main object that is there in the workflow ). Then use the
container variable as an expression to be used the deadline dates (
either latest start or latest end - whatever you need is ).
 
Let me know if you have any questions.
 
Regards
Ravi
 
 
 
--- Vincze_Arpad <Arpad.Vincze at itelligence.hu> wrote:
> Hi all,
>
> I apology myself, but for me the deadline control by factory calendar
> is an
> old problem, which is not solved yet in our productive system.
>
> I understand that one can compute the real deadline date which takes
> into
> account the given country factory calendar.
> In my interpretation this is the simpler part of problem.
>
> My question is how the modified deadline is realized?
>
> 7     My principal solution is the following:
>
> I use the "normal" SAP deadline mechanism, which starts an escalation
> workflow at case of the missed deadline.
> The standard SAP deadline does not take into account the factory
> calendar so
> the sub escalation workflow will be started
>  even on weekend or a national day.
> Here (in the sub escalation workflow) we can compute the new country
> dependent deadline date.
> After the new deadline date determination there is a check: Is this
> date is
> reached?
> If the deadline is not reached there is a wait workflow loop.
> This wait loop can be controlled by another work item having one-day
> deadline.
> At the case of missed deadline a message or work item or an  e-mail
> can be
> sent .
>
>
> My questions are the following:
> 7     This principal solution is the real solution or I am on wrong
> way?!
> 7     If it is the solution it seams to be a bit complicated and uses
> a
> lot of resource.
> 7     The "optimal solution" would be, to execute your function or
>             OO method at the work item creation time which modifies
> the
> deadlines,
>              like the standard latest end and etc...
>
>
> So I ask you to write how this problem is solved by you?
>
> Regards
>
>                                         Arpad
>
>
> Vincze Arpad
> itelligence Hungary Kft.
> H-1138 Budapest, Vaci zt 141
> Tel.:   (+36 1) 452 3822
> Fax:    (+36 1) 452 3839
> arpad.vincze at itelligence.hu
>
>
>
>
> -----Original Message-----
>> From: J. Felipe Uribe Duque [mailto:FelipeUribe at netscape.net]
> Sent: Thursday, December 13, 2001 11:49 PM
> To: SAP-WUG at MITVMA.MIT.EDU
> Subject: Re: Deadlines and SAP Calendar
>
>
> Hi Alon,
>
> I appreciate your help, I'll implement this method.
>
> I'll let you know how it works in our factory.
>
> Thanks a lot.
>
> Felipe Uribe.
>
>
> "Raskin, Alon (Soliance)" <ARaskin at cps-satx.com> wrote:
>
> >There is an object called FACTORYCAL. You could always sub-type it
> and
> >implement the method below. Both would work. I guess its just
> semantics.
> >(which in OO programming is important).
> >
> >Regards,
> >
> >
> >Alon Raskin
> >Workflow Advisor - Soliance
> >(xtn. 3183)
> >
> >-----Original Message-----
> >From: McKenney, Bill [mailto:Bill.McKenney at anheuser-busch.com]
> >Sent: December 13 2001 4:19
> >To: SAP-WUG at MITVMA.MIT.EDU
> >Subject: Re: Deadlines and SAP Calendar
> >
> >Hi Felipe,
> >I wrote a method in the business object and coded it as follows:
> ZOFFSET
> >is
> >set to 3 days in the container, just so we could change the number
> of
> >business
> >days by simply changing the container value.
> >
> >
> >
> >BEGIN_METHOD ZCALCDEADLINE CHANGING CONTAINER.
> >
> > DATA: FACTORYCALENDARID LIKE SCAL-FCALID,
> >       DATE_FROM LIKE SCAL-DATE,
> >       FACTORYDATE LIKE SCAL-FACDATE,
> >       CORRECTION LIKE SCAL-INDICATOR,
> >       DEADLINE LIKE SCAL-DATE,
> >       OFFSET TYPE I.
> >
> > SWC_GET_ELEMENT CONTAINER 'ZFactoryCalendarID' FACTORYCALENDARID.
> > SWC_GET_ELEMENT CONTAINER 'ZDate_from' DATE_FROM.
> > SWC_GET_ELEMENT CONTAINER 'Zcorrection' CORRECTION.
> > SWC_GET_ELEMENT CONTAINER 'ZOffset' OFFSET.
> >
> > IF CORRECTION IS INITIAL.
> >   CORRECTION =3D '+'.
> > ENDIF.
> >
> > CALL FUNCTION 'DATE_CONVERT_TO_FACTORYDATE'
> >       EXPORTING
> >          CORRECT_OPTION        =3D CORRECTION
> >          DATE                  =3D DATE_FROM
> >          FACTORY_CALENDAR_ID   =3D FACTORYCALENDARID
> >       IMPORTING
> >*         DATE           =3D
> >          FACTORYDATE           =3D FACTORYDATE
> >*         WORKINGDAY_INDICATOR  =3D
> >       EXCEPTIONS
> >          CALENDAR_BUFFER_NOT_LOADABLE =3D 1
> >          CORRECT_OPTION_INVALID       =3D 2
> >          DATE_AFTER_RANGE             =3D 3
> >          DATE_BEFORE_RANGE            =3D 4
> >          DATE_INVALID                 =3D 5
> >          FACTORY_CALENDAR_NOT_FOUND   =3D 6
> >          OTHERS                       =3D 7.
> >
> > IF NOT OFFSET IS INITIAL.
> >   FACTORYDATE =3D FACTORYDATE + OFFSET.
> > ENDIF.
> >
> >*  Convert the factory date into a normal calendar date
> > CALL FUNCTION 'FACTORYDATE_CONVERT_TO_DATE'
> >       EXPORTING
> >          FACTORYDATE          =3D FACTORYDATE
> >          FACTORY_CALENDAR_ID  =3D FACTORYCALENDARID
> >       IMPORTING
> >          DATE                 =3D DEADLINE
> >       EXCEPTIONS
> >          CALENDAR_BUFFER_NOT_LOADABLE =3D 1
> >          FACTORYDATE_AFTER_RANGE      =3D 2
> >          FACTORYDATE_BEFORE_RANGE     =3D 3
> >          FACTORYDATE_INVALID          =3D 4
> >          FACTORY_CALENDAR_ID_MISSING  =3D 5
> >          FACTORY_CALENDAR_NOT_FOUND   =3D 6
> >          OTHERS                       =3D 7.
> >
> > if sy-sysid =3D 'BBD'.
> >   DEADLINE =3D DATE_FROM.
> > endif.
> >
> >* Set the deadline parameter to date calculated
> > SWC_SET_ELEMENT CONTAINER 'ZDeadline' DEADLINE.
> >
> >END_METHOD.
> >
> >
> >The container elements were:
> >
> >ZOFFSET         3
> >ZCORRECTION             +
> >ZDATE_FROM              &REQREQ.CREATEDATE&
> >ZFACTORYCALENDARID              US
> >
> >
> >
> >This resulted in a deadline date of 3 workdays.
> >
> >Hopes this helps.
> >
> >Bill McKenney
> >B2B Team
> >PPR - 1CC-10 [mailto:bill.mckenney at anheuser-busch.com]
> >> * (314)589-7917         * (314)589-7787
> >>
> >
> >
> >-----Original Message-----
>
=3D=3D=3D message truncated =3D=3D=3D
 
 
__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com
 


More information about the SAP-WUG mailing list