ABAP Development, ABAP Extensibility, SAP Fiori for SAP S/4HANA

SAP Fiori Collaboration With Finance Payment Proposal Workflow

Introduction:

As you already aware regarding the Payment Proposal Workflow in SAP Finance, earlier it was triggered from SAP GUI and the decision whether it should be approved or rejected, this action was performed from SAP GUI itself. However, I came across this solution in S4 with Fiori integration with Payment Proposal Workflow.

In this solution, once the workflow is triggered from SAP GUI, it will be sent to Fiori inbox of the respective Approver. Now from Fiori inbox, approver can review the workflow and accordingly approve or reject the proposal from Fiori itself.

Hence I wanted to share my experience and concept on how this Fiori collaboration with business workflow can be implemented in S4. Hope this blog will be beneficial to everyone.

1. Current Functionality (AS-IS):

Standard workflow WS23200018 creates payment proposal workitem in My Inbox Fiori app with buttons like below. There is no explicit Approve and Reject button. Approvers needed to go to the ‘Open Task’ and approves from there or from SAP GUI. Till now Rejection was not possible from here.

Fig 1: Fiori My Inbox

2. Business Needs & Requirements (TO-BE):

As per the business requirement, need to add ‘Approve’ and ‘Reject’ button explicitly in this workitem and Functionality needs to be implemented like below –

  1. Once the Payment Proposal is created in SAP, a workitem is sent to My Inbox of Approver with Approve & Reject Button. Once this is sent, a notification mail needs to be triggered to Approver’s outlook mail that a workitem is ready for your approval.
  2. Once he Approves, a mail needs to be triggered to initiator and a group mail id that this workitem is approved. For this approval, Payment run is processed in background. Once all process is done, a confirmation mail is sent to initiator that the whole process is completed.
  3. Once he Rejects, a mail needs to be triggered to initiator and a group mail id that this workitem is rejected. Once this is rejected, no payment run will be triggered. Initiator can delete the proposal from F110 and recreate it and send for approval accordingly.

3. Proposed Solution:

  • Standard workflow and sub workflow needs to be copied to Custom workflow and sub workflow. Make required changes in custom ones.
  • Approve and Reject custom buttons will be added for Fiori by setting configuration in SPRO.
  • A Filter BADI needs to be implemented for these two buttons functionality.

4. Implemented Solution Steps:

Flow Chart of Entire Process –

  • Solution Approach: Requirement 1:

Once the Payment Proposal is created in SAP, a workitem is sent to My Inbox of Approver with Approve & Reject Button. Once this is sent, a notification mail needs to be triggered to Approver’s outlook mail that a workitem is ready for your approval.

  • Goto F110 Tcode – we create payment proposal
Fig 2: Proposal Creation – F110 Tcode
  • For this development, we have created custom workflow WS90200005 and subworkflow WS90200006 by coping below standard workflow WS23200018 and subworkflow WS23200017.
  • Once the proposal is created from F110, a workitem will be sent to My Inbox Fiori with Approve and Reject

To add this functionality, Approve and Reject button to a specific workitem ‘Payment Proposal Processing’ of the sub WF WS90200006, we need to do a settings in SPRO with the Corresponding Task No. and Step No.

Fig 3: Proposal Processing Task & Step

Copy this Task no – TS23200014,

Step no – 000053,

Workflow no – WS90200006.

Go to SPRO -> Maintain Task Names and Decision Options -> Follow the below steps

Fig 4: Workflow Task & Step config path in SPRO
Fig 5: Adding Custom Decision Keys in SPRO
  • Save and Activate SPRO.

Now check Fiori Workitem of Approver – Approve and Reject Button is added to workitem.

Fig 6: Custom Buttons are added in Fiori
  • Now once this workitem is triggered, a notification mail needs to be sent to approver that some workitem is ready for your approval.

To cater this, we put a Custom mail step ‘Notification Mail To Approvers’ in sub WF WS90200006 just before the workitem creation step. Approver got the mail in Outlook.

Fig 7: Notification Mail step in Workflow to Approvers
  • Solution Approach: Requirement 2 and 3:
  • Once he Approves, a mail needs to be triggered to initiator and a group mail id that this workitem is approved. For this approval, Payment run is processed in background. Once all process is done, a confirmation mail is sent to initiator that the whole process is completed.
  • Once he Rejects, a mail needs to be triggered to initiator and a group mail id that this workitem is rejected. Once this is rejected, no payment run will be triggered. Initiator can delete the proposal from F110 and recreate it and send for approval accordingly.

To implement the Approval and Rejection Functionality of Fiori, SAP has provided a Filter BADI ‘/IWWRK/BADI_WF_BEFORE_UPD_IB’. As we want to activate the BADI only for Payment Proposal decision purpose, we need to put filter condition which would be same as SPRO setting’s workflow and step number i.e.

Workflow No. – WS90200006 and Step No. – 53.

Fig 8: Filter Values of the BADI Implementation

The entire logic for Approve and Reject buttons functionality is written in the config part in the above mentioned BADI.

  • For Approval and Rejection, custom mail step is created in sub WF as shown below:
Fig 9: Custom Notification Mail step to Initiators

From ‘Payment Proposal Processing’ step, 3 things will be passed to sub WF through binding from Fiori and BADI –

  • Decision Key – ‘A’ for Approve or ‘R’ for Reject
  • Reviewer Name
  • Attachment – if approver puts any comment during approval/rejection and attach any attachment.

After taking decision, in sub WF it will check the Decision in ‘Check Decision’ step. Accordingly, it will send mail with these Attachments and Reviewer Name.

Here one Attachment of comment and Reviewer name is passed to mail for both Approval and Rejection. Outlook mail will be triggered to Initiator’s mail id accordingly.

Fig 10: Payment run carried out for Approval – F110 Tcode
  • Once Payment run is carried out, a Confirmation mail will be sent to a group of mail ids. This mail step will be added in main WF –
Fig 11: Confirmation mail after Payment run carried out

Proposal will be in ‘Confirmed’ status in case of Approval. Outlook mail will be triggered to intended recipient.

  • Similarly For Rejection – Mail will be sent to initiator, Sub and Main WF will not be completed. So Payment run will not happen. Proposal will be reopened again.
Rating: 0 / 5 (0 votes)