<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.E-mailStijl18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=NL link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Hi Amit,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>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. <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Transaction SWETYPV.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Good luck,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Steven Maes<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=3 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>Van:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Amit Moghe
[mailto:amitpmoghe@rediffmail.com] <br>
<b><span style='font-weight:bold'>Verzonden:</span></b> donderdag 2 juni 2005
13:07<br>
<b><span style='font-weight:bold'>Aan:</span></b> sap-wug@mit.edu<br>
<b><span style='font-weight:bold'>Onderwerp:</span></b> Cancelling the previous
workitem</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>Hi
Kjetil,<br>
<br>
Do you want me to call this function module before the triggering&nbsp; 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 &amp; 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>
&nbsp; Thanks a lot for the help. It works perfectly...&nbsp; <br>
<br>
Regards,<br>
Amit<br>
<br>
--------<br>
&nbsp; Hi Amit,<br>
<br>
&nbsp; You can built a parallel processing in Your workflow, which ends,&nbsp; <br>
&nbsp; if one of the both branches is completed. One branch includes Your <br>
&nbsp; current workflow and the other consits of a Wait Step , which waits <br>
&nbsp; for the event 'CHANGED' of BUS2012.<br>
<br>
<br>
&nbsp; Best regards<br>
&nbsp; Michael Ludwig<br>
&nbsp; rku.it GmbH<br>
<br>
&nbsp; &nbsp; -----Ursprüngliche Nachricht-----<br>
&nbsp; &nbsp; Von: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at
mit.edu] Im Auftrag von Amit Moghe<br>
&nbsp; &nbsp; Gesendet: Donnerstag, 2. Juni 2005 08:34<br>
&nbsp; &nbsp; An: sap-wug at mit.edu<br>
&nbsp; &nbsp; Cc: amitpmoghe at rediffmail.com<br>
&nbsp; &nbsp; Betreff: Cancelling the previous workitem<br>
&nbsp; &nbsp; <br>
&nbsp; &nbsp; <br>
<br>
&nbsp; &nbsp; Hi Workflow Gurus,<br>
&nbsp; &nbsp; <br>
&nbsp; &nbsp; I am new to workflow and need some help.<br>
&nbsp; &nbsp; <br>
&nbsp; &nbsp; 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>
&nbsp; &nbsp; <br>
&nbsp; &nbsp; 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>
&nbsp; &nbsp; <br>
&nbsp; &nbsp; Thanks in advance.<br>
&nbsp; &nbsp; <br>
&nbsp; &nbsp; Regards,<br>
&nbsp; &nbsp; Amit<br>
<br>
&nbsp; <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
<br>
<a href="http://clients.rediff.com/signature/track_sig.asp" target="_blank"><span
style='text-decoration:none'><img border=0 width=578 height=38 id="_x0000_i1025"
src="http://ads.rediff.com/RealMedia/ads/adstream_nx.cgi/www.rediffmail.com/inbox.htm@Bottom"></span></a><o:p></o:p></span></font></p>

</div>

</body>

</html>