<HTML>
<HEAD>
<TITLE>Re: AW: WAPI SAP_WAPI_WORKITEM_COMPLETE</TITLE>
</HEAD>
<BODY>
<FONT FACE="Times New Roman"><SPAN STYLE='font-size:14.0px'>Hi Klaus,<BR>
<BR>
As per my previous posting, this FM does &#8216;respect&#8217; the synchronous <BR>
processing chain of subsequent steps in my WF. Hence why I am using <BR>
SAP_WAPI_WORKITEM_COMPLETE.<BR>
<BR>
I have logged an OSS with SAP.<BR>
</SPAN><FONT COLOR="#00007F"><FONT SIZE="2"><SPAN STYLE='font-size:12.0px'><B><BR>
</B></SPAN></FONT><B><SPAN STYLE='font-size:14.0px'>Alon Raskin<BR>
e: </SPAN></B></FONT><B><SPAN STYLE='font-size:14.0px'><FONT COLOR="#0000FF"><U>araskin@3i-consulting.com</U></FONT><FONT COLOR="#00007F"> <BR>
</FONT></SPAN></B><SPAN STYLE='font-size:14.0px'><BR>
<BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="95%"><B>From: </B>Markus Klein &lt;Klein@abs-team.de&gt;<BR>
<B>Reply-To: </B>SAP Workflow Users' Group &lt;sap-wug@mit.edu&gt;<BR>
<B>Date: </B>Thu, 11 Oct 2007 16:46:31 +0200<BR>
<B>To: </B>SAP Workflow Users' Group &lt;sap-wug@mit.edu&gt;<BR>
<B>Conversation: </B>WAPI SAP_WAPI_WORKITEM_COMPLETE<BR>
<B>Subject: </B>AW: WAPI SAP_WAPI_WORKITEM_COMPLETE<BR>
<BR>
</SPAN></FONT><SPAN STYLE='font-size:14.0px'><FONT COLOR="#0000FF"><FONT FACE="Arial">Hello Alon,<BR>
</FONT></FONT><FONT FACE="Times New Roman"> <BR>
</FONT><FONT COLOR="#0000FF"><FONT FACE="Arial">to complete a decision step, please use FM &quot;SAP_WAPI_DECISION_COMPLETE&quot;.<BR>
</FONT></FONT><FONT FACE="Times New Roman"> <BR>
</FONT><FONT COLOR="#0000FF"><FONT FACE="Arial">regards,<BR>
Markus<BR>
</FONT></FONT><FONT FACE="Times New Roman"> <BR>
</FONT></SPAN><FONT FACE="Times New Roman"><FONT COLOR="#808080"><FONT SIZE="1"><SPAN STYLE='font-size:10.0px'><B>____________________________________<BR>
</B></SPAN></FONT></FONT><SPAN STYLE='font-size:14.0px'><BR>
</SPAN><FONT COLOR="#808080"><FONT SIZE="1"><SPAN STYLE='font-size:10.0px'><B>Markus Klein<BR>
</B><I>SAP Senior Consultant<BR>
</I><BR>
<B>ABS Team GmbH<BR>
</B>Muehlenweg 65<BR>
37120 Bovenden<BR>
</SPAN></FONT></FONT><SPAN STYLE='font-size:14.0px'><BR>
</SPAN><FONT COLOR="#808080"><FONT SIZE="1"><SPAN STYLE='font-size:10.0px'>Tel +49 551 820 33 0<BR>
Mobil +49 151 126 23 047<BR>
Email klein@abs-team.de<BR>
</SPAN></FONT></FONT><SPAN STYLE='font-size:14.0px'><BR>
</SPAN><FONT COLOR="#808080"><FONT SIZE="1"><SPAN STYLE='font-size:10.0px'><B>www.abs-team.de<BR>
</B></SPAN></FONT></FONT><SPAN STYLE='font-size:14.0px'><BR>
</SPAN><FONT COLOR="#808080"><FONT SIZE="0"><SPAN STYLE='font-size:9.0px'>Gesch&auml;ftsf&uuml;hrer: Dr. Andreas Rupprecht - HRB G&ouml;ttingen 1535<BR>
</SPAN></FONT></FONT><SPAN STYLE='font-size:14.0px'><BR>
</SPAN><FONT COLOR="#808080"><FONT SIZE="1"><SPAN STYLE='font-size:10.0px'>Diese e-mail kann Betriebs- oder Gesch&auml;ftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese e-mail irrt&uuml;mlich erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts, eine Vervielf&auml;ltigung oder Weitergabe der e-mail ausdr&uuml;cklich untersagt. Bitte benachrichtigen Sie uns und vernichten Sie die empfangene e-mail Vielen Dank.<BR>
</SPAN></FONT></FONT><SPAN STYLE='font-size:14.0px'><BR>
</SPAN><FONT COLOR="#808080"><FONT SIZE="1"><SPAN STYLE='font-size:10.0px'>This e-mail may contain trade secrets or privileged, undisclosed or otherwise confidential information. If you have received this e-mail in error, you are hereby notified that any review, copying or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal. Thank you for your cooperation.<BR>
</SPAN></FONT></FONT><SPAN STYLE='font-size:14.0px'><BR>
&nbsp;<BR>
<BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="100%"></SPAN></FONT><SPAN STYLE='font-size:14.0px'><FONT FACE="Tahoma"><B>Von:</B> sap-wug-bounces@mit.edu [<a href="mailto:sap-wug-bounces@mit.edu]">mailto:sap-wug-bounces@mit.edu]</a> <B>Im Auftrag von </B>Alon Raskin<BR>
<B>Gesendet:</B> Mittwoch, 10. Oktober 2007 20:31<BR>
<B>An:</B> SAP Workflow Users' Group<BR>
<B>Betreff:</B> RE: WAPI SAP_WAPI_WORKITEM_COMPLETE<BR>
</FONT><FONT FACE="Times New Roman"><BR>
</FONT><FONT FACE="Arial">Hi Kirshnan,<BR>
</FONT><FONT FACE="Times New Roman"> <BR>
</FONT><FONT FACE="Arial">Thanks but this is precisely what I am doing but this is not the problem.<BR>
The problem is the synchronous processing chain that needs to occur AFTER the completion of the decision task.<BR>
<BR>
Regards,<BR>
</FONT><FONT FACE="Times New Roman"> <BR>
</FONT><FONT FACE="Arial"><B>Alon Raskin<BR>
e: araskin@3i-consulting.com <a href="mailto:araskin@3i-consulting.com">&lt;mailto:araskin@3i-consulting.com&gt;</a> <BR>
p: +1 207 523 3489 <BR>
c</B></FONT></SPAN><FONT FACE="Arial"><B><FONT SIZE="4"><SPAN STYLE='font-size:16.0px'>: </SPAN></FONT><SPAN STYLE='font-size:14.0px'>+1 207 409 4983<BR>
f: &nbsp;+1 806 403 4983<BR>
</SPAN></B></FONT><SPAN STYLE='font-size:14.0px'><FONT FACE="Times New Roman"><BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="100%"></FONT><FONT FACE="Tahoma"><B>From:</B> sap-wug-bounces@mit.edu on behalf of krishna mohan<BR>
<B>Sent:</B> Wed 10/10/2007 09:10<BR>
<B>To:</B> SAP Workflow Users' Group<BR>
<B>Subject:</B> RE: WAPI SAP_WAPI_WORKITEM_COMPLETE<BR>
</FONT><FONT FACE="Times New Roman"><BR>
<BR>
<BR>
Hi Alon,<BR>
<BR>
If i understood you requirement correctly, you are<BR>
trying to complete the decision task programmatically.<BR>
<BR>
Though you are using SAP_WAPI_WORKITEM_COMPLETE,<BR>
before completing the workitem you should update the<BR>
container elemets _RESULT , _WI_RESULT with correct<BR>
values ( either 0001, 0002 &nbsp;etc based on the decsion)<BR>
using SAP_WAPI_WRITE_CONTAINER. Are you doing this?<BR>
<BR>
Recently i did the same , meaning as a requirement one<BR>
of my report program supposed to behave as if user has<BR>
taken the decision , i could it do it with out any<BR>
problem.<BR>
<BR>
This is how to be done:<BR>
1. Update the container _RESULT , _WI_RESULT with<BR>
correct values<BR>
2. Find the current agents of the workitem, and<BR>
reserve it with any one of them, use<BR>
SAP_WAPI_RESERVE_WORKITEM<BR>
3. Now, complete the workitem with the agent as one<BR>
who reserved the workitem.SAP_WAPI_WORKITEM_COMPLETE<BR>
<BR>
<BR>
Thanks and Regards<BR>
Krishna Mohan<BR>
SAP Workflow Consultant<BR>
<BR>
<BR>
--- Alon Raskin &lt;araskin@3i-consulting.com&gt; wrote:<BR>
<BR>
&gt; It's a custom workflow which I put together for this<BR>
&gt; test. It's a simple<BR>
&gt; decision task followed up by a simple dialog step<BR>
&gt; (which does not popup<BR>
&gt; any screens). What I want to achieve is to complete<BR>
&gt; the task<BR>
&gt; programmatically and then have the subsequent step<BR>
&gt; executed under the<BR>
&gt; agent's user ID. This is what happens when I execute<BR>
&gt; the decision task<BR>
&gt; from the Inbox and I am trying to get the WAPI's to<BR>
&gt; play nice too. I<BR>
&gt; have logged an OSS.<BR>
&gt;<BR>
&gt; <BR>
&gt;<BR>
&gt; Alon Raskin<BR>
&gt;<BR>
&gt; e: araskin@3i-consulting.com<BR>
&gt; <a href="mailto:araskin@3i-consulting.com">&lt;mailto:araskin@3i-consulting.com&gt;</a><BR>
&gt;<BR>
&gt; p: +1 207 523 3489<BR>
&gt;<BR>
&gt; c: +1 207 409 4983<BR>
&gt;<BR>
&gt; f: &nbsp;+1 806 403-4983<BR>
&gt;<BR>
&gt; <BR>
&gt;<BR>
&gt; The easiest way to integrate SAP with any mobile<BR>
&gt; device<BR>
&gt;<BR>
&gt; <a href="http://www.themobileworkplace.com">http://www.themobileworkplace.com</a> <a href="http://www.themobileworkplace.com/">&lt;http://www.themobileworkplace.com/&gt;</a> <BR>
&gt; <a href="http://www.themobileworkplace.com/">&lt;http://www.themobileworkplace.com/&gt;</a><BR>
&gt;<BR>
&gt; ________________________________<BR>
&gt;<BR>
&gt; From: sap-wug-bounces@mit.edu<BR>
&gt; [<a href="mailto:sap-wug-bounces@mit.edu]">mailto:sap-wug-bounces@mit.edu]</a> On Behalf<BR>
&gt; Of Richard V Marut<BR>
&gt; Sent: Tuesday, October 09, 2007 10:36 PM<BR>
&gt; To: 'SAP Workflow Users' Group'<BR>
&gt; Subject: RE: WAPI SAP_WAPI_WORKITEM_COMPLETE<BR>
&gt;<BR>
&gt; <BR>
&gt;<BR>
&gt; Alon,<BR>
&gt;<BR>
&gt; <BR>
&gt;<BR>
&gt; What exactly is the step that you are using to<BR>
&gt; complete work item doing?<BR>
&gt; I recall having the same problem when the step had<BR>
&gt; some functionality<BR>
&gt; involved with it. My process used a web front-end by<BR>
&gt; user to process the<BR>
&gt; work items. I ended up making &nbsp;the work item a dummy<BR>
&gt; step just to be<BR>
&gt; able to assign the item to a user and to provide the<BR>
&gt; ability to reserve,<BR>
&gt; replace, cancel and complete the work item under<BR>
&gt; that user id. I no<BR>
&gt; longer received that error once I did that.<BR>
&gt;<BR>
&gt; <BR>
&gt;<BR>
&gt; Richard...<BR>
&gt;<BR>
&gt; <BR>
&gt;<BR>
&gt; <BR>
&gt;<BR>
&gt; From: sap-wug-bounces@mit.edu<BR>
&gt; [<a href="mailto:sap-wug-bounces@mit.edu]">mailto:sap-wug-bounces@mit.edu]</a> On Behalf<BR>
&gt; Of Alon Raskin<BR>
&gt; Sent: Tuesday, October 09, 2007 6:43 PM<BR>
&gt; To: SAP Workflow Users' Group<BR>
&gt; Subject: RE: WAPI SAP_WAPI_WORKITEM_COMPLETE<BR>
&gt;<BR>
&gt; <BR>
&gt;<BR>
&gt; Thanks Ravi,<BR>
&gt;<BR>
&gt; <BR>
&gt;<BR>
&gt; I am not sure your analysis is right. The Workflow<BR>
&gt; works fine if you<BR>
&gt; execute the work item from the inbox. It only errors<BR>
&gt; if you call the<BR>
&gt; WAPI SAP_WAPI_WORKITEM_COMPLETE &nbsp;&nbsp;with the<BR>
&gt; do_callback_in_background =<BR>
&gt; space.<BR>
&gt;<BR>
&gt; <BR>
&gt;<BR>
&gt; Regards,<BR>
&gt;<BR>
&gt; <BR>
&gt;<BR>
&gt; Alon Raskin<BR>
&gt;<BR>
&gt; e: araskin@3i-consulting.com<BR>
&gt; <a href="mailto:araskin@3i-consulting.com">&lt;mailto:araskin@3i-consulting.com&gt;</a><BR>
&gt;<BR>
&gt; p: +1 207 523 3489<BR>
&gt;<BR>
&gt; c: +1 207 409 4983<BR>
&gt;<BR>
&gt; f: &nbsp;+1 806 403-4983<BR>
&gt;<BR>
&gt; <BR>
&gt;<BR>
&gt; The easiest way to integrate SAP with any mobile<BR>
&gt; device<BR>
&gt;<BR>
&gt; <a href="http://www.themobileworkplace.com">http://www.themobileworkplace.com</a> <a href="http://www.themobileworkplace.com/">&lt;http://www.themobileworkplace.com/&gt;</a> <BR>
&gt; <a href="http://www.themobileworkplace.com/">&lt;http://www.themobileworkplace.com/&gt;</a><BR>
&gt;<BR>
&gt; ________________________________<BR>
&gt;<BR>
&gt; From: sap-wug-bounces@mit.edu<BR>
&gt; [<a href="mailto:sap-wug-bounces@mit.edu]">mailto:sap-wug-bounces@mit.edu]</a> On Behalf<BR>
&gt; Of Ravi Dixit<BR>
&gt; Sent: Tuesday, October 09, 2007 7:36 PM<BR>
&gt; To: sap-wug@mit.edu<BR>
&gt; Subject: Re: WAPI SAP_WAPI_WORKITEM_COMPLETE<BR>
&gt;<BR>
&gt; <BR>
&gt;<BR>
&gt; HI Alon<BR>
&gt;<BR>
&gt;<BR>
&gt; Most likely it seems to be a problem with the<BR>
&gt; definition of the next<BR>
&gt; step. Check the outcome of the current step and<BR>
&gt; mandatory parameters for<BR>
&gt; the next. Also, you can user Error Analysis<BR>
&gt; (Ctrl+F11) to dig further.<BR>
&gt;<BR>
&gt; Cheers<BR>
&gt;<BR>
&gt; Ravi<BR>
&gt;<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Message: 4<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Date: Tue, 9 Oct 2007 09:54:14 -0400<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;From: &quot;Alon Raskin&quot; &lt; araskin@3i-consulting.com<BR>
&gt; <a href="mailto:araskin@3i-consulting.com">&lt;mailto:araskin@3i-consulting.com&gt;</a> &gt;<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Subject: WAPI SAP_WAPI_WORKITEM_COMPLETE<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;To: &quot;SAP Workflow Users' Group&quot; &lt;sap-wug@mit.edu&gt;<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Message-ID:<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<BR>
&gt;<BR>
CEF21C1C5BF2FA42A42CEC87B91BBCDE02764316@ms07.mse2.exchange.ms<BR>
&gt;<BR>
<a href="mailto:CEF21C1C5BF2FA42A42CEC87B91BBCDE02764316@ms07.mse2.exchange.ms">&lt;mailto:CEF21C1C5BF2FA42A42CEC87B91BBCDE02764316@ms07.mse2.exchange.ms&gt;</a><BR>
&gt; &gt;<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I am just wondering if anyone has seen this issue<BR>
&gt; before:<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I am calling Function Module &nbsp;&nbsp;to complete a work<BR>
&gt; item. The FM<BR>
&gt; has a parameter &nbsp;do_callback_in_background . I am<BR>
&gt; setting this to SPACE<BR>
&gt; because I want the subsequent work item to be<BR>
&gt; executed under the same<BR>
&gt; User ID. However when I do this the workflow errors<BR>
&gt; with the following<BR>
&gt; error Error when defining successor for node<BR>
&gt; 0000000004<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Does do anyone know a way around this issue or<BR>
&gt; whether this is a<BR>
&gt; likely candidate for an OSS message?<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Alon Raskin<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e: araskin@3i-consulting.com &lt;mailto:<BR>
&gt; araskin@3i-consulting.com<BR>
&gt; <a href="mailto:araskin@3i-consulting.com">&lt;mailto:araskin@3i-consulting.com&gt;</a> &gt;<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-------------- next part --------------<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A non-text attachment was scrubbed...<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name: not available<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type: application/ms-tnef<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Size: 4248 bytes<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Desc: not available<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Url :<BR>
&gt;<BR>
<a href="http://mailman.mit.edu/pipermail/sap-wug/attachments/20071009/ca5ae318/a">http://mailman.mit.edu/pipermail/sap-wug/attachments/20071009/ca5ae318/a</a><BR>
&gt; ttachment.bin<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;------------------------------<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_______________________________________________<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SAP-WUG mailing list<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SAP-WUG@mit.edu<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://mailman.mit.edu/mailman/listinfo/sap-wug">http://mailman.mit.edu/mailman/listinfo/sap-wug</a><BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End of SAP-WUG Digest, Vol 35, Issue 16<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;***************************************<BR>
&gt;<BR>
&gt;<BR>
=== message truncated ===&gt;<BR>
_______________________________________________<BR>
&gt; SAP-WUG mailing list<BR>
&gt; SAP-WUG@mit.edu<BR>
&gt; <a href="http://mailman.mit.edu/mailman/listinfo/sap-wug">http://mailman.mit.edu/mailman/listinfo/sap-wug</a><BR>
&gt;<BR>
<BR>
<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
____________________________________________________________________________________<BR>
Pinpoint customers who are looking for what you sell.<BR>
<a href="http://searchmarketing.yahoo.com/">http://searchmarketing.yahoo.com/</a><BR>
_______________________________________________<BR>
SAP-WUG mailing list<BR>
SAP-WUG@mit.edu<BR>
<a href="http://mailman.mit.edu/mailman/listinfo/sap-wug">http://mailman.mit.edu/mailman/listinfo/sap-wug</a><BR>
<BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="95%">_______________________________________________<BR>
SAP-WUG mailing list<BR>
SAP-WUG@mit.edu<BR>
<a href="http://mailman.mit.edu/mailman/listinfo/sap-wug">http://mailman.mit.edu/mailman/listinfo/sap-wug</a><BR>
</FONT></SPAN>
</BODY>
</HTML>