As of SAP S/4HANA Cloud 1902 email notifications concerning approval results can be sent to the workflow initiator however with SAP S/4HANA Cloud 2111 release the Purchase Order workflow supports Configurable Email Notifications at the end of the workflow providing the possibility to choose an outcome of when an email will be sent, an associated email template and a recipient rule or delivery to fixed users.
Business Use Case
There are conditions where the workflow initiator may not always be the document creator.
For example, a document creator or other Purchaser has made some amends during the approval flow for the document and the approval workflow has been restarted. In this case the workflow initiator of the restarted workflow is a person who has changed the document and may not always be the document creator.
On such occasions the result of approval could be missed from the document creator.
By using this one can select an outcome of when an email will be sent, email template, recipient rule or fixed users. In addition to the pre-delivered recipient rules a customer can define a Custom Responsibility Management (RM) Rule which will be also exposed in the list of supported recipients and among approver lists. So, customers should provide a custom name to a rule self-explaining that it is for email recipients.
With this blog I will outline the steps to achieve this routing to a document creator (Purchase Order creator in this case) regardless of who the workflow initiator is.
Add a new responsibility management rule.
Add the following parameters:
PO object ID
Navigate to the below app
Extend the Parent Context ID WS00800238 - Workflow for Purchase Order
Use the Data Source: \__LEADING_OBJECT\_PURCHASEORDERITEM\_PURCHASEORDER-PURCHASEORDER
Navigate to the custom logic app
Implement BAdI RSM_BADI_RESPONSIBILITY_RULE
"THIS IS A SAMPLE IMPLEMENTATION. PLEASE USE YOUR OWN LOGIC TO DETERMINE AGENTS AND PASS TO 'AGENTS'
AGENTS = VALUE #( ( ls_purchaseorder-CREATEDBYUSER ) ).
NOTE: This code is just an example and is not intended to be use in productive scenarios.
Ensure filter is applied to the BaDI using static_rule_filter = YY1_PO_CREATOR
Note: this BaDI cannot be tested in situ in the app as users are determined at runtime.
Navigate to the workflow configuration apps and setup the required rules consuming the new responsibility management rule added in the previous steps.
Select the workflow notifications section.
Select the newly available “PO Creator” from the dialog box.
Continue with the usual flexible workflow setup and activate the rule.
Validate the approval email notifications are dispatched to the PO creator as below.
The standard email notification template is utilised as per below.
Note: please ensure the email setup has been followed as per best practice scope item 1LQ
So, in summary by utilising a custom responsibility management rule and harnessing the released SAP S/4HANA Cloud enabled BAdi we can communicate the workflow status to purchase order creators in this scenario but also across a number of business documents where applicable.
What are your ideas and business needs to utilise custom responsibility management scenarios?