Flexible Workflow in Sales Documents
One of the most requested requirements in SAP ERP project implementations has been the possibility of having workflows in the Order to Cash processes. Sales Consultants often felt a little bit jealous of the Workflow functionality already built-in purchasing but let me tell you that the time has arrived to be jealous no more! Now we have a way to set-up Business Workflow Scenarios without the problem of creating a complicated workflow development. Let me introduce the Flexible Workflow Functionality available for Sales Documents in SAP S/4HANA any Premise.
Flexible Workflow is part of SAP Business Workflow and will allow you to set up and manage simple workflow scenarios in different lines of business, such as SAP S/4HANA Finance, Procurement, Human Resources, Manufacturing, and now SAP S/4HANA Sales. This functionality for SAP S/4HANA Sales has been available since SAP S/4HANA 1809 on Credit Memo Requests, but now in SAP S/4HANA 1909 is extended to Sales Orders and Quotations.
You will find this Blog Post useful if you are planning to implement this functionality on your SAP S/4HANA 1909 environment, or if you are interested in checking the functionality and the steps to set up a workflow scenario.
There are some pre-requisites that you must check before actually setting up this functionality. If your system comes from a New Implementation using SAP Best Practices, all these pre-requisites should be already on your SAP S/4HANA 1909 environment. Otherwise, if your system comes from an upgrade of a previous SAP S/4HANA release, or a System Conversion, you will have to do some customizing on IMG. I recommend you check with your Basis, SAP Fiori, and even workflow experts on your team for some of these points.
1. User Roles
Flexible Workflow relies on SAP Fiori to be set-up and performed on SAP S/4HANA. Apps like Manage Teams and Responsibilities and My Inbox will be used later on this blog to show you how to set-up and perform a demo scenario.
Most of the apps required are already part of standard roles you can find on your SAP S/4HANA system. The first two roles in the following table have been used to set up this scenario. The latter two were used to perform the scenario in which the Sales Flexible Workflow is used. You can easily add the roles to your user in a Development environment for initial testing, and then define the specific roles and users that will require the apps and permissions that will be used effectively in a Quality and Production environment.
|SAP_BR_BPC_EXPERT||Configuration Expert – Business Process Configuration|
|SAP_BR_BUSINESS_PROCESS_SPEC||Business Process Specialist|
|SAP_BR_INTERNAL_SALES_REP||Internal Sales Representative|
There is only one app that is missing from the roles stated above. This app is called Custom Fields and Logic and is intended for a System Administrator. You can work with your Basis Expert and create a new Z-role through transaction PFCG to include the SAP Fiori Tile Catalog SAP_BASIS_BC_EXT.
2. Approval Reasons
This is the only IMG configuration that is mandatory from the functional point of view. You will have to define and assign Reasons for Approval Requests so the system will trigger a Workflow. If these Reasons are not assigned to a Sales Document, then the workflow will not work. You can create as many reasons as you require, and these reasons can be assigned to different Document Categories (i.e. Sales Order, Quotation and Credit Memo Request)
Follow this IMG path to define your Reasons for Approval Request:
IMG: Sales and Distribution > Sales > Sales Documents > Sales Document Approvals > Define Reasons for Approval Requests
In this example, we have created one default reason for each document category.
Then, these Approval Request Reasons need to be assigned to the Sales Document Categories on the following IMG path:
IMG: Sales and Distribution > Sales > Sales Documents > Sales Document Approvals > Assign Reasons for Approval Requests
For the purpose of this blog, we have created only one Approval Request Reason for each Sales Document Category available. Keep in mind that you can use the same Approval Request Reason for different Sales Document Categories or assign more than one Approval Request Reason to a Sales Document Category.
Later on, these approval reasons will be assigned to a specific document through the Custom Fields and Logic App.
3. Workflow Settings
This one is more of troubleshooting. Be aware that the Flexible Workflow relies on the standard workflow scenarios. You may need help from Basis and SAP Fiori experts to check missing customizing and settings.
These are the standard workflows you should worry about when using the Flexible workflow functionality in Sales for SAP S/4HANA 1909.
|WS02000006||Workflow for Sales Orders|
|WS02000029||Workflow for Credit Memo Requests|
|WS02000447||Workflow for Sales Quotation|
Some customizing settings need to be checked. Again, if you installed Best Practices for the latest SAP S/4HANA release, all these customizing should be already in place.
First, make sure that make the scenario for the specific flexible Workflow is active.
IMG: SAP NetWeaver > Application Server > Business Management > SAP Business Workflow > Flexible Workflow > Scenario Activation
Then, make sure that all the Tasks Names and Decision Options are maintained so they are not filtered on My Inbox App.
IMG: SAP NetWeaver > SAP Gateway Service Enablement > Content > Workflow Settings > Maintain Task Names and Decision Options
It is also useful to notice that service SD_F3014_SALESORDER_WORKFLOW_SRV should be working in SAP Fiori to correctly display the requests on My Inbox App.
4. Business Partners
Users that are going to be used as approvers on the Define Teams and Responsibilities App require to be created both as an employee (Person Number) and a Business Partner. Also, the Business Partner needs to be created linked to the employee, so the correct role is created in its Master Data. This is not as easy as to create a role on the BP Master Data, but a report has to be executed to create the BP from the employee data. Steps described in the blog How to create employee in S/4HANA for Customer Management (Link) should be enough to do this. In the end, the Business Partner should have the correct BP role as in the following image.
Now that we have taken care of the pre-requisites to make the Flexible Workflow in Sales Documents work, we can set up our scenario.
In our test scenario, we want a specific Sales, Credit Memo, and Quotation document types to be relevant for approval and trigger our workflow scenario. We want these approvals to be processed by a First Level or Second Level approver depending on the amount of the document.
I will use the following document types and amounts to trigger the second level of approval.
|Document Type||Description||From L2 Amount (USD)|
|ZORW||Sales Order with Workflow||$2000.00|
|ZQTW||Quotation with Workflow||$2000.00|
|ZCRW||Credit Memo Request with Workflow||$5000.00|
Step 1 – Define Relevancy for Approval
To define the relevancy for Sales Documents you will need to use the Custom Fields and Logic App. Go to the Custom Logic tab, and create a new enhancement implementation.
Then, you will have to select Sales: Sales Document in the Business Context field, Set Approval Request Reasons for Sales Documents on the BAdI Description Field, and enter an Implementation Description and ID before creating the enhancement implementation.
On the following screen, you will need to enter a logic to determine a Reason for Approval. This Reason for Approval will be the factor that triggers the workflow on the sales document. In our scenario, we are defining an approval reason depending on the sales document type.
You can also use any field on salesdocument, saledocumentitem, and salesdocumentpartner structures for this purpose. For example, if you want to trigger the workflow only for documents that are above an amount you can use field salesdocument-totalnetamount on your own logic.
Step 2 – Define Teams and Responsibilities
Here you will define the approvers for your documents. Go to the manage Teams and responsibilities App and create your Team of Approvers.
Go ahead and define a Name and Description for your team. Use type Sales and include all the relevant team members. Remember that team members will have to be created both as employees and business partners as explained in the pre-requisites section.
For each team member, you will require to include their function, this is if they are first level approver, second-level approver, or both. In our Example, Hector will be L1 Approver, and Thomas will be L2 Approver. Other approvers will be both L1 and L2 approvers.
You can define the responsibility for each team of approver according to different characteristics. For example, you can have a team responsible for a Sales Area or a specific customer. You can manage this through the Responsibility Definitions Section.
Step 3 – Manage Sales Documents Workflows
The last step to define the scenario for Flexible Workflow in Sales Documents is to create the Workflow definition through the Manage Sales Document Workflows App.
On this App, you will have to set up the workflow settings for each Document Category Available. Sales Quotation, Sales Orders, and Credit Memo Request are available on SAP S/4HANA 1909. Option Workflow for credit Memo Req. (obsolete) was used on SAP S/4HANA 1809 and is not recommended on SAP S/4HANA 1909.
Select the Document Category and add a new Workflow.
Maintain the Workflow Name, Description, and Validity Period. Remember that after the validity period ends, you will have to copy your previous workflow or set up a new one.
Now add the step sequence. In our example, our first step is to check if the document exceeds the minimum amount for a Second Level Approver. This will be maintained through the step conditions.
Don´t forget to include the exception handling. This is required to restart the workflow in case a rework is requested by the approver.
We followed the same procedure include a second step for the rest of the documents, for which the first Level approval is required.
Rinse and repeat this procedure for each of the remaining Document Categories required in our scenario.
Workflow Process and My Inbox
Now that the workflow is all set up, you will notice that newly created Sales Documents will now have an approval status. This approval status will appear on the SAP Fiori “Manage” collection of Apps for Sales.
You can also display the approval reason at the document header on the Status tab. If you try to change any document that is currently In Approval, you will get an error message to prevent any changes during this process.
The approval request will be displayed through My Inbox App. Here the approver will receive the notification and check basic data from the Sales Document, such Partner Functions, Amount, item details, etc.
The approver can also navigate to the Sales Document if further information is required, and is given the option to Release, Request to Rework, or Reject the Sales Document.
Approval Request can also be displayed on the notification area, so there is no need to navigate and open My Inbox App to approve a request. The approver can take action directly from the SAP Fiori Launchpad.
Once the Sales Document is approved, the Approval Status will change and now modifications will be allowed. Further processing can be performed such as the creation of following documents.
If in any case the requestor or any other user require to change a sales document that is under approval, they can withdraw the Approval Request. Once the modification is done and the document is saved, the Approval Request will be triggered again.
Worth to notice that if you make any changes to the released sales order (i.e. modify items, quantities, or even trigger ATP check), status In Approval will be set again and a new work item would be generated. You may have to take care of “sensible” fields through a custom logic on the Custom Fields and Logic app if you don´t want to have an approval to be triggered.
I hope this blog was useful for you or anyone interested in learning and implementing the Sales Flexible Workflow on your own SAP S/4HANA 1909 system. You will now be able to check all the pre-requisites and set up a new Workflow. For those customers that are not yet on the latest SAP S/4HANA release, it is a great chance to build up a business case and promote an upgrade or even a system conversion on your Landscape.
Special thanks to Jean-Marie Conseil to help me set up the workflow scenario and build this blog post.
Iván Ramírez, SAP S/4HANA RIG