<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>Hi Ramkey</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks for the update. So how can I accomplish the scenario where the Sales order needs to be locked throughout the Workflow and when it is approved it needs to remove the Delevery block and if rejected upload some Rejection reason. For this what type of locking I should have to use. I wish to do this using Background task.<BR><BR>Thanks<BR><BR>Arghadip Kar<BR><BR>SAP Workflow Expert<BR><BR>IBM INDIA<BR><BR>--- On <B>Sat, 10/24/09, sap-wug-request@mit.edu <I>&lt;sap-wug-request@mit.edu&gt;</I></B> wrote:<BR></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid"><BR>From: sap-wug-request@mit.edu &lt;sap-wug-request@mit.edu&gt;<BR>Subject: SAP-WUG Digest, Vol 59, Issue 58<BR>To: sap-wug@mit.edu<BR>Date: Saturday, October 24, 2009, 9:34 PM<BR><BR>
<DIV class=plainMail>Send SAP-WUG mailing list submissions to<BR>&nbsp;&nbsp;&nbsp; <A href="http://us.mc503.mail.yahoo.com/mc/compose?to=sap-wug@mit.edu" ymailto="mailto:sap-wug@mit.edu">sap-wug@mit.edu</A><BR><BR>To subscribe or unsubscribe via the World Wide Web, visit<BR>&nbsp;&nbsp;&nbsp; <A href="http://mailman.mit.edu/mailman/listinfo/sap-wug" target=_blank>http://mailman.mit.edu/mailman/listinfo/sap-wug</A><BR>or, via email, send a message with subject or body 'help' to<BR>&nbsp;&nbsp;&nbsp; <A href="http://us.mc503.mail.yahoo.com/mc/compose?to=sap-wug-request@mit.edu" ymailto="mailto:sap-wug-request@mit.edu">sap-wug-request@mit.edu</A><BR><BR>You can reach the person managing the list at<BR>&nbsp;&nbsp;&nbsp; <A href="http://us.mc503.mail.yahoo.com/mc/compose?to=sap-wug-owner@mit.edu" ymailto="mailto:sap-wug-owner@mit.edu">sap-wug-owner@mit.edu</A><BR><BR>When replying, please edit your Subject line so it is more specific<BR>than "Re: Contents
 of SAP-WUG digest..."<BR><BR><BR>Today's Topics:<BR><BR>&nbsp;&nbsp;&nbsp;1. Background task executing but not executing method properly<BR>&nbsp; &nbsp; &nbsp; (arghadip kar)<BR>&nbsp;&nbsp;&nbsp;2. Re: Background task executing but not executing method<BR>&nbsp; &nbsp; &nbsp; properly (Ramki Maley)<BR><BR><BR>----------------------------------------------------------------------<BR><BR>Message: 1<BR>Date: Fri, 23 Oct 2009 11:43:05 -0700 (PDT)<BR>From: arghadip kar &lt;<A href="http://us.mc503.mail.yahoo.com/mc/compose?to=arghadipkar@yahoo.com" ymailto="mailto:arghadipkar@yahoo.com">arghadipkar@yahoo.com</A>&gt;<BR>Subject: Background task executing but not executing method properly<BR>To: <A href="http://us.mc503.mail.yahoo.com/mc/compose?to=sap-wug@mit.edu" ymailto="mailto:sap-wug@mit.edu">sap-wug@mit.edu</A><BR>Message-ID: &lt;<A href="http://us.mc503.mail.yahoo.com/mc/compose?to=462912.61313.qm@web50304.mail.re2.yahoo.com"
 ymailto="mailto:462912.61313.qm@web50304.mail.re2.yahoo.com">462912.61313.qm@web50304.mail.re2.yahoo.com</A>&gt;<BR>Content-Type: text/plain; charset="us-ascii"<BR><BR>Hi<BR>I am facing a strange issue. I have created a custom method of a BO which has been delegated to standard BO BUS2032. This method actually locks the Sales Order. When I execute this method from Business Object it executes perfectly. When I try to execute this methd from a background task it gets completed but the sales order is not locked. I am using Function Module ENQUEUE_EVVBAKE to lock the entry. This does not work when I execute in background. I have also check WF-BATCH and it has all the authorization SAP_ALL. Another thing that I have done I have added a flag which should return X if the Function module returns sy-subrc = 0. This flag also gets set though the document is not locked. When I lock this transaction code manually and execute the background task this flag is not
 set. This is clear there is no issue with binding. Can anyone throw some lights on this. It seems that the WF-BATCH is not able to execute this method. I have checked SWU3 and it<BR>is properly configured. Thanks a lot in advance.<BR><BR>Thanks<BR><BR>Arghadip Kar<BR><BR>SAP Workflow Expert<BR><BR>IBM INDIA<BR><BR><BR>&nbsp; &nbsp; &nbsp; <BR>-------------- next part --------------<BR>An HTML attachment was scrubbed...<BR>URL: <A href="http://mailman.mit.edu/pipermail/sap-wug/attachments/20091023/6c3d1813/attachment-0001.htm" target=_blank>http://mailman.mit.edu/pipermail/sap-wug/attachments/20091023/6c3d1813/attachment-0001.htm</A><BR><BR>------------------------------<BR><BR>Message: 2<BR>Date: Fri, 23 Oct 2009 17:23:17 -0400<BR>From: Ramki Maley &lt;<A href="http://us.mc503.mail.yahoo.com/mc/compose?to=rmaley@erpworkflow.com" ymailto="mailto:rmaley@erpworkflow.com">rmaley@erpworkflow.com</A>&gt;<BR>Subject: Re: Background task executing but not
 executing method<BR>&nbsp;&nbsp;&nbsp; properly<BR>To: "SAP Workflow Users' Group" &lt;<A href="http://us.mc503.mail.yahoo.com/mc/compose?to=sap-wug@mit.edu" ymailto="mailto:sap-wug@mit.edu">sap-wug@mit.edu</A>&gt;<BR>Message-ID: &lt;<A href="http://us.mc503.mail.yahoo.com/mc/compose?to=4AE21EC5.4090805@erpworkflow.com" ymailto="mailto:4AE21EC5.4090805@erpworkflow.com">4AE21EC5.4090805@erpworkflow.com</A>&gt;<BR>Content-Type: text/plain; charset=ISO-8859-1; format=flowed<BR><BR>Arghadip, what you are experiencing is normal enqueue behavior. You <BR>cannot expect a lock to be active once the background task is complete.<BR>Locks (that are not linked to a database update) are released implicitly <BR>when the SAP transaction ends, in your case the completion of the BG <BR>Step. When you are testing the method from SWO1 in dialog mode, the lock <BR>would be released when you exit SWO1.<BR><BR>Cheers,<BR>Ramki.<BR><BR>arghadip kar wrote:<BR>&gt; Hi<BR>&gt; I
 am facing a strange issue. I have created a custom method of a BO <BR>&gt; which has been delegated to standard BO BUS2032. This method actually <BR>&gt; locks the Sales Order. When I execute this method from Business Object <BR>&gt; it executes perfectly. When I try to execute this methd from a <BR>&gt; background task it gets completed but the sales order is not locked. I <BR>&gt; am using Function Module ENQUEUE_EVVBAKE to lock the entry. This does <BR>&gt; not work when I execute in background. I have also check WF-BATCH and it <BR>&gt; has all the authorization SAP_ALL. Another thing that I have done I have <BR>&gt; added a flag which should return X if the Function module returns <BR>&gt; sy-subrc = 0. This flag also gets set though the document is not locked. <BR>&gt; When I lock this transaction code manually and execute the background <BR>&gt; task this flag is not set. This is clear there is no issue with binding. <BR>&gt; Can anyone throw
 some lights on this. It seems that the WF-BATCH is not <BR>&gt; able to execute this method. I have checked SWU3 and it is properly <BR>&gt; configured. Thanks a lot in advance.<BR>&gt; <BR>&gt; Thanks<BR>&gt; <BR>&gt; Arghadip Kar<BR>&gt; <BR>&gt; SAP Workflow Expert<BR>&gt; <BR>&gt; IBM INDIA<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; ------------------------------------------------------------------------<BR>&gt; <BR>&gt; _______________________________________________<BR>&gt; SAP-WUG mailing list<BR>&gt; <A href="http://us.mc503.mail.yahoo.com/mc/compose?to=SAP-WUG@mit.edu" ymailto="mailto:SAP-WUG@mit.edu">SAP-WUG@mit.edu</A><BR>&gt; <A href="http://mailman.mit.edu/mailman/listinfo/sap-wug" target=_blank>http://mailman.mit.edu/mailman/listinfo/sap-wug</A><BR><BR><BR>------------------------------<BR><BR>_______________________________________________<BR>SAP-WUG mailing list<BR><A href="http://us.mc503.mail.yahoo.com/mc/compose?to=SAP-WUG@mit.edu"
 ymailto="mailto:SAP-WUG@mit.edu">SAP-WUG@mit.edu</A><BR><A href="http://mailman.mit.edu/mailman/listinfo/sap-wug" target=_blank>http://mailman.mit.edu/mailman/listinfo/sap-wug</A><BR><BR><BR>End of SAP-WUG Digest, Vol 59, Issue 58<BR>***************************************<BR></DIV></BLOCKQUOTE></td></tr></table><br>