Search code examples
workflowabapsap-fiori

Task Forwarding in Workflow sap


I have forwarded travel expense approval task from one manager to another manager in sap fiori. Can anyone tell me how to get the current approver?

Thanks


Solution

  • Are you able to use ABAP? Then this might solve your issue. You need to enhance ABAP logic for this certain scenario in fiori.

    1. determine your workflow, workitem id (wi_id)
    2. determine current agent via

       CALL FUNCTION 'RH_USERS_OF_WI_READ' "Get Current Agents (Users) for Work Item
        EXPORTING
          wi_id =                     " swwuserwi-wi_id
        TABLES
          user_tab =                  " swhactor
        EXCEPTIONS
          NOTHING_FOUND = 1           "
           . "  RH_USERS_OF_WI_READ
      
    3. use HROBJID of swhactor to determine personnel number or central person

    4. read name of HROBJID e.g. via infotype table PA0001 (e.g. field ENAME)