Flexible Workflow in SAP S/4HANA Sales Scenarios - ERP Q&A (2023)

Introduction

This blog post enhances the previous post on flexible workflow in Sales Documents with information relevant for SAP S/4HANA 2020 release.

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.

SAP Fiori Application Developer Certification Preparation Guide

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 and SAP S/4HANA Billing. This functionality for SAP S/4HANA Sales has been available since SAP S/4HANA 1809 on Credit Memo Requests and for Sales Orders and Quotations in SAP S/4HANA 1909. In SAP S/4HANA 2020 it is now extended to Preliminary Billing Documents – a new concept recently introduced in Sales & Billing processes.

You will find this Blog Post useful if you are planning to implement the workflow functionality on your SAP S/4HANA 1909 or SAP S/4HANA 2020 environments, or if you are interested in checking the functionality and the steps to set up a workflow scenario.

The pre-requisites and the process described below for Sales Documents Workflow are also valid for Preliminary Billing Documents.

Pre-requisites

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 or SAP S/4HANA 2020 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.

RoleDescription
SAP_BR_BPC_EXPERTConfiguration Expert – Business Process Configuration
SAP_BR_BUSINESS_PROCESS_SPECBusiness Process Specialist
SAP_BR_INTERNAL_SALES_REPInternal Sales Representative
SAP_BR_SALES_MANAGERSales Manager

If you want to use workflows for Preliminary billing documents, please use the role

RoleDescription
SAP_SD_BC_BIL_MYINBOXSales-Billing Inbox

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.

Flexible Workflow in SAP S/4HANA Sales Scenarios - ERP Q&A (1)

Change Roles

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.

Flexible Workflow in SAP S/4HANA Sales Scenarios - ERP Q&A (2)

Reasons for Approval

Then, these Approval Request Reasons need to be assigned to the Sales Document Categories on the following IMG path:

(Video) Flexible Workflow in SAP S4 HANA 1909

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.

WorkflowDescription
WS02000006Workflow for Sales Orders
WS02000029Workflow for Credit Memo Requests
WS02000447Workflow 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

Flexible Workflow in SAP S/4HANA Sales Scenarios - ERP Q&A (3)

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

Flexible Workflow in SAP S/4HANA Sales Scenarios - ERP Q&A (4)

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

Flexible Workflow in SAP S/4HANA Sales Scenarios - ERP Q&A (5)

Display BP

Scenario

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.

(Video) Flexible Workflows in SAP S/4HANA

I will use the following document types and amounts to trigger the second level of approval.

Document TypeDescriptionFrom L2 Amount (USD)
ZORWSales Order with Workflow$2000.00
ZQTWQuotation with Workflow $2000.00
ZCRWCredit 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.

Flexible Workflow in SAP S/4HANA Sales Scenarios - ERP Q&A (6)

Then, you will have to select Sales: Sales Document in the Business Context field, SetApproval Request Reasons for Sales Documents on the BAdI Description Field, and enter an Implementation Description and ID before creating the enhancement implementation.

Flexible Workflow in SAP S/4HANA Sales Scenarios - ERP Q&A (7)

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

Flexible Workflow in SAP S/4HANA Sales Scenarios - ERP Q&A (8)

BAdI

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.

Flexible Workflow in SAP S/4HANA Sales Scenarios - ERP Q&A (9)

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.

Flexible Workflow in SAP S/4HANA Sales Scenarios - ERP Q&A (10)

Define Team and Responsibilities

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.

Flexible Workflow in SAP S/4HANA Sales Scenarios - ERP Q&A (11)

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.

(Video) Purchase Requisition Approval Workflow

Flexible Workflow in SAP S/4HANA Sales Scenarios - ERP Q&A (12)

Document Categories

Select the Document Category and add a new Workflow.

Flexible Workflow in SAP S/4HANA Sales Scenarios - ERP Q&A (13)

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.

Flexible Workflow in SAP S/4HANA Sales Scenarios - ERP Q&A (14)

Maintain Workflow

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.

Flexible Workflow in SAP S/4HANA Sales Scenarios - ERP Q&A (15)

Step Sequence

Don´t forget to include the exception handling. This is required to restart the workflow in case a rework is requested by the approver.

Flexible Workflow in SAP S/4HANA Sales Scenarios - ERP Q&A (16)

Exception Handling

We followed the same procedure include a second step for the rest of the documents, for which the first Level approval is required.

Flexible Workflow in SAP S/4HANA Sales Scenarios - ERP Q&A (17)

Step Sequence 2

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.

Flexible Workflow in SAP S/4HANA Sales Scenarios - ERP Q&A (18)
(Video) Manage complex workflow approval processes in SAP S/4HANA Cloud

Manage Sales Orders

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.

Flexible Workflow in SAP S/4HANA Sales Scenarios - ERP Q&A (19)

Display Sales Document

Flexible Workflow in SAP S/4HANA Sales Scenarios - ERP Q&A (20)

Message

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.

Flexible Workflow in SAP S/4HANA Sales Scenarios - ERP Q&A (21)

My Inbox

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.

Flexible Workflow in SAP S/4HANA Sales Scenarios - ERP Q&A (22)

Notification Area

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.

Flexible Workflow in SAP S/4HANA Sales Scenarios - ERP Q&A (23)

Sales Document Status

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.

Flexible Workflow in SAP S/4HANA Sales Scenarios - ERP Q&A (24)

Withdraw Approval Request

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.

(Video) SAP S4 PO (Purchase Order) Release Using Flexible Workflow | Gaurav Learning Solutions

Videos

1. SAP S/4HANA Flexible Work Flows
(Sai Krishna Vallurupalli)
2. Flexible Fiori Workflow
(SastraGeek Solutions)
3. SAP Workflow- How to Analyse a Flexible Workflow from the Workflow Builder?
(arghadip kar)
4. How to activate the Linkage of Event and Workflow so workflow starts working?
(arghadip kar)
5. 4 SAP Invoicing Approval Workflows
(Testing Labs)
6. SAP HANA Academy - SAP S/4HANA RIG: Adapting Workflows in S/4HANA
(SAP HANA Academy)
Top Articles
Latest Posts
Article information

Author: Carmelo Roob

Last Updated: 10/08/2022

Views: 5834

Rating: 4.4 / 5 (65 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Carmelo Roob

Birthday: 1995-01-09

Address: Apt. 915 481 Sipes Cliff, New Gonzalobury, CO 80176

Phone: +6773780339780

Job: Sales Executive

Hobby: Gaming, Jogging, Rugby, Video gaming, Handball, Ice skating, Web surfing

Introduction: My name is Carmelo Roob, I am a modern, handsome, delightful, comfortable, attractive, vast, good person who loves writing and wants to share my knowledge and understanding with you.