<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style>@font-face {
        font-family: Calibri;
}
@font-face {
        font-family: Tahoma;
}
@page WordSection1 {margin: 70.85pt 70.85pt 2.0cm 70.85pt; }
P.MsoNormal {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt
}
LI.MsoNormal {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt
}
DIV.MsoNormal {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
TT {
        FONT-FAMILY: "Courier New"
}
P.MsoAcetate {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Tahoma","sans-serif"; FONT-SIZE: 8pt
}
LI.MsoAcetate {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Tahoma","sans-serif"; FONT-SIZE: 8pt
}
DIV.MsoAcetate {
        MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Tahoma","sans-serif"; FONT-SIZE: 8pt
}
SPAN.EmailStyle19 {
        FONT-FAMILY: "Calibri","sans-serif"; COLOR: #1f497d
}
SPAN.BalloonTextChar {
        FONT-FAMILY: "Tahoma","sans-serif"
}
.MsoChpDefault {
        FONT-SIZE: 10pt
}
</style><style id="owaParaStyle">P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</style>
</head>
<body lang="DE" link="blue" vlink="purple" fPStyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<p>Hi Karsten,</p>
<p>Follow the below steps that would help.</p>
<p>&nbsp;</p>
<p>Right now the issue is becuase of triggering the Create event twice for the same document.</p>
<p>&nbsp;</p>
<p>Create a function module which is to read the entries from SWWIHEAD table with workflow template number , Task number (Task Number you can say the User decision or the first step in the workflow) and the document number (Workflow Instance). If the entry
 does already exists the workflow should not trigger for the second time.</p>
<p>&nbsp;</p>
<p>Assing this function module as Check Fucntion module in event linkage table (SWETYPV) which can stop the reciver fucntion module to trigger the workflow for the second time.</p>
<p>&nbsp;</p>
<p>Thanks,</p>
<p>Prakash S.</p>
<div style="FONT-FAMILY: Times New Roman; COLOR: #000000; FONT-SIZE: 16px">
<hr tabindex="-1">
<div style="DIRECTION: ltr" id="divRpF152752"><font color="#000000" size="2" face="Tahoma"><b>From:</b> sap-wug-bounces@mit.edu [sap-wug-bounces@mit.edu] on behalf of Ernst, Karsten [Karsten.Ernst@fhp-ww.com]<br>
<b>Sent:</b> Tuesday, October 01, 2013 1:22 PM<br>
<b>To:</b> SAP Workflow Users' Group<br>
<b>Subject:</b> RE: [RMX:WL] Re: Check Function Module - how to stop duplicate WF trigger<br>
</font><br>
</div>
<div></div>
<div>
<div class="WordSection1">
<p class="MsoNormal"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">Hi Sheldon,</span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">thanks for the hint with the note and especially the SWEC.</span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span>&nbsp;</p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">Currently we only have set the flag for CREATE in the respective object.</span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span><img id="Picture_x0020_1" src="cid:image001.png@01CEBE8A.FEA05DD0" width="1232" height="252" enterTime="1380640721980" showedTooltip="0"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span>&nbsp;</p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">Nevertheless the system issues the event after a change to the PO as well.</span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">What we do is the following.</span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">After the&nbsp; creation of a purchase requisition of a certain scenario we call a function module which transfers the purch.requistion into a PO
 using FM 'BAPI_PO_CREATE1'. </span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">For some cases we need to do some adjustments to the just created PO and we do this after the document is available on the database using FM
 'BAPI_PO_CHANGE'. Unfortunately the adjustment we need to do is not possible to be set in the initial CREATE step.</span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">And it looks like the 'BAPI_PO_CHANGE' is causing the system to create another BUS2012.RELEASESTEPCREATED event. In my opinion this should not
 happen according to the setup in SWEC .</span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span>&nbsp;</p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">Any ideas??</span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span>&nbsp;</p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">Best regards</span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US">Karsten</span></p>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt" lang="EN-US"></span>&nbsp;</p>
<p class="MsoNormal"><span lang="EN-US"></span>&nbsp;</p>
<div>
<div style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<p class="MsoNormal"><b><span style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt" lang="EN-US">From:</span></b><span style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt" lang="EN-US"> sap-wug-bounces@mit.edu [mailto:sap-wug-bounces@mit.edu]
<b>On Behalf Of </b>Sheldon Oxenberg<br>
<b>Sent:</b> Monday, September 30, 2013 4:56 PM<br>
<b>To:</b> SAP Workflow Users' Group<br>
<b>Subject:</b> [RMX:WL] Re: Check Function Module - how to stop duplicate WF trigger</span></p>
</div>
</div>
<p class="MsoNormal">&nbsp;</p>
<p><span style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">Hi Karsten,</span><br>
<br>
<span style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">I believe many of us have encountered this before. &nbsp;You may need to remove config in Transaction SWEC.</span><br>
<span style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt">Please review SAP Note 797775, and you can search the internet, for example, &quot;SAP bus2012 releasestepcreated event&quot;<br>
<br>
Regards,<br>
Sheldon Oxenberg<br>
CSC</span><br>
<br>
<br>
<img id="_x0000_i1025" alt="Inactive hide details for &quot;Ernst, Karsten&quot; ---09/30/2013 10:35:51 AM---Hi everybody, I have quite a strange but interesting que" src="cid:image002.gif@01CEBE8A.FEA05DD0" width="16" height="16"><span style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: #424282; FONT-SIZE: 10pt">&quot;Ernst,
 Karsten&quot; ---09/30/2013 10:35:51 AM---Hi everybody, I have quite a strange but interesting question I think to the experts in the group.</span><br>
<br>
<span style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: #5f5f5f; FONT-SIZE: 7.5pt">From:
</span><span style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 7.5pt">&quot;Ernst, Karsten&quot; &lt;<a href="mailto:Karsten.Ernst@fhp-ww.com" target="_blank">Karsten.Ernst@fhp-ww.com</a>&gt;</span><br>
<span style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: #5f5f5f; FONT-SIZE: 7.5pt">To:
</span><span style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 7.5pt">&quot;<a href="mailto:sap-wug@mit.edu" target="_blank">sap-wug@mit.edu</a>&quot; &lt;<a href="mailto:sap-wug@mit.edu" target="_blank">sap-wug@mit.edu</a>&gt;</span><br>
<span style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: #5f5f5f; FONT-SIZE: 7.5pt">Date:
</span><span style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 7.5pt">09/30/2013 10:35 AM</span><br>
<span style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: #5f5f5f; FONT-SIZE: 7.5pt">Subject:
</span><span style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 7.5pt">Check Function Module - how to stop duplicate WF trigger</span><br>
<span style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: #5f5f5f; FONT-SIZE: 7.5pt">Sent by:
</span><span style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 7.5pt"><a href="mailto:sap-wug-bounces@mit.edu" target="_blank">sap-wug-bounces@mit.edu</a></span></p>
<div class="MsoNormal">
<hr style="COLOR: #8091a5" align="left" size="2" width="100%" noshade="">
</div>
<p class="MsoNormal"><br>
<br>
<br>
<span style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 10pt">Hi everybody,</span><br>
<span style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 10pt">&nbsp;</span><br>
<span style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 10pt">I have quite a strange but interesting question I think to the experts in the group.</span><br>
<span style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 10pt">Due to the pre-processing setup the PO event BUS2012.RELEASESTEPCREATED is issues twice for the same object (same PO) within seconds.</span><br>
<span style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 10pt">We see no chance to prevent the double triggering of the event and this should not be the discussion here.</span><br>
<span style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 10pt">What I am looking for is your help on how to implement a Check Function Module to be integrated in the Event Type Linkage.</span><br>
<span style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 10pt">I would like to determine if there is already an active WF instance available for the current PO number (should be the object key of the event) and if this is the case the event should raise
 an exception and should not trigger the WF to start.</span><br>
<span style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 10pt">If possible it might be could to check the WF Number / Receiver Type (WS9…) as well.</span><br>
<span style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 10pt">&nbsp;</span><br>
<span style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 10pt">As I have limited knowledge on how to implement this and especially on how to check for the active 1<sup>st</sup>&nbsp;instance of the workflow for the current object, any hint or code snippet is
 highly appreciated.</span><br>
<span style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 10pt">&nbsp;</span><br>
<span style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 10pt">Best regards</span><br>
<span style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 10pt">Karsten</span><br>
<span style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 10pt">&nbsp;</span><br>
<span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: gray">Karsten Ernst</span><br>
<span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: gray; FONT-SIZE: 7.5pt">&nbsp;</span><br>
<b><span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: gray; FONT-SIZE: 7.5pt">Freudenberg Home and Cleaning Solutions GmbH
</span></b><br>
<span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: gray; FONT-SIZE: 7.5pt">Supply Chain Management Systems and Processes</span><br>
<span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: gray; FONT-SIZE: 7.5pt">&nbsp;</span><br>
<span style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: gray; FONT-SIZE: 7.5pt">Mail: &nbsp; &nbsp;
</span><a href="mailto:Karsten.Ernst@fhp-ww.com" target="_blank"><span style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 7.5pt">Karsten.Ernst@fhp-ww.com</span></a><br>
<span style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 10pt">&nbsp;</span> </p>
<p>&nbsp;</p>
<div class="MsoNormal">
<hr align="left" size="2" width="100%">
</div>
<p class="MsoNormal"><span style="FONT-FAMILY: 'Arial','sans-serif'; COLOR: gray; FONT-SIZE: 7.5pt">Freudenberg Home and Cleaning Solutions GmbH<br>
Im Technologiepark 19, D-69469 Weinheim<br>
<br>
Geschäftsführer: Dr. Klaus Peter Meier, Arndt Miersch, Frank Reuther<br>
Sitz der Gesellschaft: Weinheim, Amtsgericht Mannheim HRB 431930</span><tt><span style="FONT-SIZE: 10pt">_______________________________________________</span></tt><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"><br>
<tt>SAP-WUG mailing list</tt><br>
<tt><a href="mailto:SAP-WUG@mit.edu" target="_blank">SAP-WUG@mit.edu</a></tt><br>
<tt><a href="http://mailman.mit.edu/mailman/listinfo/sap-wug" target="_blank">http://mailman.mit.edu/mailman/listinfo/sap-wug</a></tt></span></p>
</div>
<br>
<hr>
<font color="gray" size="1" face="Arial">Freudenberg Home and Cleaning Solutions GmbH<br>
Im Technologiepark 19, D-69469 Weinheim<br>
<br>
Geschäftsführer: Dr. Klaus Peter Meier, Arndt Miersch, Frank Reuther<br>
Sitz der Gesellschaft: Weinheim, Amtsgericht Mannheim HRB 431930<br>
</font></div>
</div>
</div>
</body>
</html>