<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2627" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=099450413-02062005><FONT face=Arial
color=#0000ff size=2>That is true. It will not change the existing workitem. But
your initial message did not mention anything about sending approvals back to
the first level ;-)</FONT></SPAN></DIV>
<DIV><SPAN class=099450413-02062005><FONT face=Arial color=#0000ff
size=2>Although, now that I read it again, I do see that you specifically wrote
that the first workflow should be terminated. You did not write that the
requirement is that there should not be two active workflows. I just read that
between the lines :-)</FONT></SPAN></DIV>
<DIV><SPAN class=099450413-02062005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=099450413-02062005><FONT face=Arial color=#0000ff size=2>So
Michael's solution is the best one. You should perhaps check that the event is
only triggered when there are significant changes, to avoid bothering the
managers with unnecessary repeated approvals.</FONT></SPAN></DIV>
<DIV align=left><FONT face=Arial size=2>-- </FONT></DIV>
<DIV align=left><FONT face=Arial size=2>Kjetil Kilhavn, Statoil KTJ IT
BKS</FONT></DIV>
<DIV> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> sap-wug-bounces@mit.edu
[mailto:sap-wug-bounces@mit.edu] <B>On Behalf Of </B>Amit Moghe<BR><B>Sent:</B>
2. juni 2005 14:23<BR><B>To:</B> sap-wug@mit.edu<BR><B>Subject:</B> Cancelling
the previous workitem<BR></FONT><BR></DIV>
<DIV></DIV>
<P>Hi Steven,<BR><BR>Thanks for your inputs. But if I implement the check
function module, that will only prevent a new workitem from being generated and
not restart the existing workitem (i.e. if an approval workflow is lying with
second approver, it will not go back to first approver again). Please correct me
if I am missing something.<BR><BR>But anyways, thanks a lot for the
clarifications...<BR><BR>Regards,<BR>Amit<BR>--------------------<BR>Hi
Amit,<BR><BR><BR><BR>You can do this in the event linkage. This is where you
link the event to a workflow. Here you can enter a check function to decide if
you would like to start the WF or not. <BR><BR>Transaction
SWETYPV.<BR><BR><BR><BR>Good luck,<BR><BR><BR><BR>Steven
Maes<BR><BR><BR><BR> _____ <BR><BR>Van: Amit Moghe
[mailto:amitpmoghe at rediffmail.com] <BR>Verzonden: donderdag 2 juni 2005
13:07<BR>Aan: sap-wug at mit.edu<BR>Onderwerp: Cancelling the previous
workitem<BR><BR><BR><BR>Hi Kjetil,<BR><BR>Do you want me to call this function
module before the triggering event is published? <BR><BR>If yes, then, I
am afraid whether I can do that since the event is published by the standard
program. Also for a moment even if I have control over publishing the event, how
can I restart the same workitem?<BR><BR>If no, then, will you please a bit more
elaborate?<BR><BR>I would definitely like to trigger as few workflows as
possible since that would reduce my work :))<BR><BR>Thanks &
Regards,<BR>Amit<BR><BR><BR>-------------------<BR>It's a bit late I guess, but
I would recommend using a check function instead. Then you prevent starting the
second instance by looking for existing workflows related to your purchase order
(function SAP_WAPI_WORKITEMS_TO_OBJECT). <BR><BR>The fewer workflows started,
the better - unless your salary depends on the number of started
workflows.<BR>-- <BR>Kjetil Kilhavn, Statoil KTJ IT
BKS<BR><BR><BR><BR>________________________________<BR><BR>From: sap-wug-bounces
at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of Amit Moghe<BR>Sent:
2. juni 2005 10:32<BR>To: sap-wug at mit.edu<BR>Subject: AW: Cancelling the
previous workitem<BR><BR><BR><BR>Hi Michael,<BR><BR> Thanks a lot for the
help. It works perfectly...
<BR><BR>Regards,<BR>Amit<BR><BR>--------<BR> Hi Amit,<BR><BR> You
can built a parallel processing in Your workflow, which ends, <BR>
if one of the both branches is completed. One branch includes Your <BR>
current workflow and the other consits of a Wait Step , which waits <BR>
for the event 'CHANGED' of BUS2012.<BR><BR><BR> Best regards<BR>
Michael Ludwig<BR> rku.it GmbH<BR><BR> -----Ursprüngliche
Nachricht-----<BR> Von: sap-wug-bounces at mit.edu
[mailto:sap-wug-bounces at mit.edu] Im Auftrag von Amit Moghe<BR>
Gesendet: Donnerstag, 2. Juni 2005 08:34<BR> An: sap-wug at
mit.edu<BR> Cc: amitpmoghe at rediffmail.com<BR>
Betreff: Cancelling the previous workitem<BR> <BR>
<BR><BR> Hi Workflow Gurus,<BR> <BR> I am
new to workflow and need some help.<BR> <BR> I have a
workflow for which I am using 'CHANGED' event of the business object BUS2012
(Purchase Order) as the triggering event. When a user changes a particular PO,
this workflow starts. But before it is completed if there is another change to
the same PO, then, one more workitem is started.<BR> <BR>
My requirement is that if there is change to the PO, then, it should
delete the previous workitem and start a new workitem. Can you please advise me
as to how this can be achieved?<BR> <BR> Thanks in
advance.<BR> <BR> Regards,<BR>
Amit</P><p></p><p><font size=1>-------------------------------------------------------------------<br>The information contained in this message may be CONFIDENTIAL and is<br>intended for the addressee only. Any unauthorised use, dissemination of 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 delete<br>this message.<br>Thank you.</font size></BODY></HTML>