Travel Approval using FIORI

Hilsbos, Margaret A Margaret.Hilsbos at dayzim.com
Tue Jan 7 15:04:03 EST 2014


Hi Lalitha,

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.

      method RELEASE_REQ.

        DATA: agent_user LIKE sy-uname,
              return LIKE LINE OF et_return.


        sy-uname = i_agent+2.


        CALL FUNCTION 'BAPI_REQUISITION_RELEASE_GEN'
          EXPORTING
            number            = i_banfn
            rel_code          = i_relcode
            no_commit_work    = ' '
          IMPORTING
            rel_status_new    = e_new_rel_stat
            rel_indicator_new = e_new_rel_indicator
          TABLES
            return            = et_return.
       ....


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).

In your custom method assign the approver's userid to sy-uname and call BAPI_TRIP_APPROVE  similarly as shown in my code example. (This also lets you possibly do some additional error processing with the return table.)

Now create a task using your new method and use that in your workflow as a background method, instead of foreground.

Hope that helps!

Margaret

-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of Lalitha Sankaran
Sent: Tuesday, January 07, 2014 10:39 AM
To: SAP Workflow Users' Group
Subject: Re: Travel Approval using FIORI

Hi Shai,

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.
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 ?

Thank you
Lalitha

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20140107/e01f059a/attachment-0001.htm


More information about the SAP-WUG mailing list