<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri" size="2"><span style="font-size:11pt;">
<div>Hi Lalitha,</div>
<div>&nbsp;</div>
<div>We faced something similar with the purchase requisition workflow. We wanted the approver name to show in Item Changes but instead it was showing WF-BATCH. We solved this by using a custom method for the update task, in place of the standard BO method.
We set sy-uname to the approver from the user decision task.</div>
<div>&nbsp;</div>
<div style="padding-left:36pt;"><font face="Courier New">method RELEASE_REQ.</font></div>
<div style="padding-left:36pt;"><font face="Courier New">&nbsp;</font></div>
<div style="padding-left:36pt;"><font face="Courier New">&nbsp; DATA: agent_user LIKE sy-uname,</font></div>
<div style="padding-left:36pt;"><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return LIKE LINE OF et_return.</font></div>
<div style="padding-left:36pt;"><font face="Courier New">&nbsp;</font></div>
<div style="padding-left:36pt;"><font face="Courier New">&nbsp;</font></div>
<div style="padding-left:36pt;"><font face="Courier New">&nbsp; sy-uname = i_agent&#43;2.&nbsp;&nbsp; </font></div>
<div style="padding-left:36pt;">&nbsp;</div>
<div style="padding-left:36pt;">&nbsp;</div>
<div style="padding-left:36pt;"><font face="Courier New">&nbsp; CALL FUNCTION 'BAPI_REQUISITION_RELEASE_GEN'</font></div>
<div style="padding-left:36pt;"><font face="Courier New">&nbsp;&nbsp;&nbsp; EXPORTING</font></div>
<div style="padding-left:36pt;"><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; number&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = i_banfn</font></div>
<div style="padding-left:36pt;"><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rel_code&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = i_relcode</font></div>
<div style="padding-left:36pt;"><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; no_commit_work&nbsp;&nbsp;&nbsp; = ' '</font></div>
<div style="padding-left:36pt;"><font face="Courier New">&nbsp;&nbsp;&nbsp; IMPORTING</font></div>
<div style="padding-left:36pt;"><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rel_status_new&nbsp;&nbsp;&nbsp; = e_new_rel_stat</font></div>
<div style="padding-left:36pt;"><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rel_indicator_new = e_new_rel_indicator</font></div>
<div style="padding-left:36pt;"><font face="Courier New">&nbsp;&nbsp;&nbsp; TABLES</font></div>
<div style="padding-left:36pt;"><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = et_return.</font></div>
<div style="padding-left:36pt;"><font face="Courier New"> ....</font></div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>So for your situation, it sounds like you need to either extend BUS2089 and redefine the Approve method, or create a task based on a custom class method (Jocelyn Dart has done some excellent blogs on SCN that explain how to use OO classes to do this).
</div>
<div>&nbsp;</div>
<div>In your custom method assign the approver&#8217;s userid to sy-uname and call BAPI_TRIP_APPROVE&nbsp; similarly as shown in my code example. (This also lets you possibly do some additional error processing with the return table.) </div>
<div>&nbsp;</div>
<div>Now create a task using your new method and use that in your workflow as a background method, instead of foreground.</div>
<div>&nbsp;</div>
<div>Hope that helps!</div>
<div>&nbsp;</div>
<div>Margaret</div>
<div>&nbsp;</div>
<div>-----Original Message-----<br>

From: sap-wug-bounces@mit.edu [<a href="mailto:sap-wug-bounces@mit.edu">mailto:sap-wug-bounces@mit.edu</a>] On Behalf Of Lalitha Sankaran<br>

Sent: Tuesday, January 07, 2014 10:39 AM<br>

To: SAP Workflow Users' Group<br>

Subject: Re: Travel Approval using FIORI</div>
<div>&nbsp;</div>
<div>Hi Shai,</div>
<div>&nbsp;</div>
<div>Thank you for the response. Even if I create a custom decision task, it is still going to be calling the method Process from BO DECISION, I will not be able to add the update code here.</div>
<div>We do have a container element to store the ID of the actual approver, but that is not reflected in the trip history. Can't think of any other way to accomplish this.Is there anyway We can intervene in the User Decision task ?</div>
<div>&nbsp;</div>
<div>Thank you</div>
<div>Lalitha</div>
<div>&nbsp;</div>
<div>On 1/7/14, Shai Eyal &lt;<a href="mailto:shaieyalis@gmail.com">shaieyalis@gmail.com</a>&gt; wrote:</div>
<div>&gt; Hi Lalitha,</div>
<div>&gt; It does not work because &quot;Advance with Dialog&quot; feature is not </div>
<div>&gt; supported in non-SAP session like Fiori or UWL or alike. You need to </div>
<div>&gt; find a workaround like forcing actual username even though its </div>
<div>&gt; background or storing the the actual username in some other field or </div>
<div>&gt; embedding the status update in the decision step by creation a custom decision step.</div>
<div>&gt;</div>
<div>&gt;</div>
<div>&gt;</div>
<div>&gt; *Regards,Shai Eyal*</div>
<div>&gt;</div>
<div>&gt; *SAP Logistics senior consultantSAP Workflow &amp; BPM specialist*</div>
<div>&gt;</div>
<div>&gt; *http://www.linkedin.com/in/shaieyal</div>
<div>&gt; &lt;<a href="http://www.linkedin.com/in/shaieyal">http://www.linkedin.com/in/shaieyal</a>&gt;Mobile: 972-52-5816633*</div>
<div>&gt; *Skype: Shai.Eyal*</div>
<div>&gt;</div>
<div>&gt;</div>
<div>&gt;</div>
<div>&gt; On Mon, Jan 6, 2014 at 7:28 PM, &lt;<a href="mailto:sap-wug-request@mit.edu">sap-wug-request@mit.edu</a>&gt; wrote:</div>
<div>&gt;</div>
<div>&gt;&gt; Send SAP-WUG mailing list submissions to</div>
<div>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="mailto:sap-wug@mit.edu">sap-wug@mit.edu</a></div>
<div>&gt;&gt;</div>
<div>&gt;&gt; To subscribe or unsubscribe via the World Wide Web, visit</div>
<div>&gt;&gt;&nbsp;&nbsp;&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></div>
<div>&gt;&gt; or, via email, send a message with subject or body 'help' to</div>
<div>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="mailto:sap-wug-request@mit.edu">sap-wug-request@mit.edu</a></div>
<div>&gt;&gt;</div>
<div>&gt;&gt; You can reach the person managing the list at</div>
<div>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="mailto:sap-wug-owner@mit.edu">sap-wug-owner@mit.edu</a></div>
<div>&gt;&gt;</div>
<div>&gt;&gt; When replying, please edit your Subject line so it is more specific </div>
<div>&gt;&gt; than &quot;Re: Contents of SAP-WUG digest...&quot;</div>
<div>&gt;&gt;</div>
<div>&gt;&gt;</div>
<div>&gt;&gt; Today's Topics:</div>
<div>&gt;&gt;</div>
<div>&gt;&gt;&nbsp;&nbsp;&nbsp; 1. Travel Approval using FIORI (Lalitha Sankaran)</div>
<div>&gt;&gt;</div>
<div>&gt;&gt;</div>
<div>&gt;&gt; ---------------------------------------------------------------------</div>
<div>&gt;&gt; -</div>
<div>&gt;&gt;</div>
<div>&gt;&gt; Message: 1</div>
<div>&gt;&gt; Date: Mon, 6 Jan 2014 10:59:58 -0500</div>
<div>&gt;&gt; From: Lalitha Sankaran &lt;lalisan@gmail.com&gt;</div>
<div>&gt;&gt; Subject: Travel Approval using FIORI</div>
<div>&gt;&gt; To: &quot;SAP Workflow Users' Group&quot; &lt;sap-wug@MIT.EDU&gt;</div>
<div>&gt;&gt; Message-ID:</div>
<div>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;</div>
<div>&gt;&gt; CA&#43;H26G-A9T-Jr5o&#43;x5t2KhFMLf1FwgtBeYXQXiVaWy5cxCiQyQ@mail.gmail.com&gt;</div>
<div>&gt;&gt; Content-Type: text/plain; charset=ISO-8859-1</div>
<div>&gt;&gt;</div>
<div>&gt;&gt; Hi All,</div>
<div>&gt;&gt;</div>
<div>&gt;&gt; We are doing a prototype to check if we can integrate FIORI App with </div>
<div>&gt;&gt; the existing T&amp;E approval workflow.</div>
<div>&gt;&gt;</div>
<div>&gt;&gt; Currently we have the approval as a 2 step process - Step 1 - </div>
<div>&gt;&gt; Approval task&nbsp; - which is a user decision task Step 2 - Set trip to </div>
<div>&gt;&gt; Approved - Based on the user decision, this step changes the status </div>
<div>&gt;&gt; of the trip, this is done in the foreground , so as to retain the </div>
<div>&gt;&gt; approver name in the trip history.If we make this a BG task, the </div>
<div>&gt;&gt; approval in the trip history ends up being WFBATCH.</div>
<div>&gt;&gt; This step uses the std method BUS2089.Approve</div>
<div>&gt;&gt;</div>
<div>&gt;&gt; This is working fine for Non-FIORI approvals, but for FIORI, the </div>
<div>&gt;&gt; second task is not getting executed automatically , but is waiting </div>
<div>&gt;&gt; for the approver to execute it. The approver is the same for step 1 </div>
<div>&gt;&gt; and step 2. So it usually gets executed automatically. Not sure what </div>
<div>&gt;&gt; is preventing this.&nbsp; And need to get this resolved to implement FIORI.</div>
<div>&gt;&gt;</div>
<div>&gt;&gt; Any inputs or suggestions please.</div>
<div>&gt;&gt;</div>
<div>&gt;&gt; Thank you</div>
<div>&gt;&gt; Lalitha</div>
<div>&gt;&gt;</div>
<div>&gt;&gt;</div>
<div>&gt;&gt; ------------------------------</div>
<div>&gt;&gt;</div>
<div>&gt;&gt; _______________________________________________</div>
<div>&gt;&gt; SAP-WUG mailing list</div>
<div>&gt;&gt; <a href="mailto:SAP-WUG@mit.edu">SAP-WUG@mit.edu</a></div>
<div>&gt;&gt; <a href="http://mailman.mit.edu/mailman/listinfo/sap-wug">http://mailman.mit.edu/mailman/listinfo/sap-wug</a></div>
<div>&gt;&gt;</div>
<div>&gt;&gt;</div>
<div>&gt;&gt; End of SAP-WUG Digest, Vol 110, Issue 5</div>
<div>&gt;&gt; ***************************************</div>
<div>&gt;&gt;</div>
<div>&gt;</div>
<div>_______________________________________________</div>
<div>SAP-WUG mailing list</div>
<div><a href="mailto:SAP-WUG@mit.edu">SAP-WUG@mit.edu</a></div>
<div><a href="http://mailman.mit.edu/mailman/listinfo/sap-wug">http://mailman.mit.edu/mailman/listinfo/sap-wug</a></div>
<div>&nbsp;</div>
</span></font>
</body>
</html>