Skip to Content
Technical Articles
Author's profile photo Alexander Shipilov

Flexible Workflow in SAP S/4HANA Sales Scenarios


Dear readers, this blog post enhances the previous post on flexible workflow in Sales Documents updated with information relevant for SAP S/4HANA 2022 FPS0 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.

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 for sales documents.

As of SAP S/4HANA 2022 FPS0 flexible workflow is available for the following sales document types:

  • Sales quotations

  • Sales contracts (since SAP S/4HANA 2020 FPS1)

  • Sales orders

  • Sales orders without charge (since SAP S/4HANA 2020 FPS1)

  • Customer returns

  • Credit memo requests

  • Debit memo requests (since SAP S/4HANA 2021)


Since  SAP S/4HANA 2020 Approva workflowl is also available in Billing for Preliminary Billing Documents – a new concept introduced in Sales & Billing processes in SAP S/4HANA 2020.

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

More documentation available on the SAP help portal (Link) and Manage Sales Documents Workflow App Documentation (Link).

Documentation on Preliminary Billing Document Workflows: (Link). The pre-requisites and the process described below for Sales Documents Workflow are also valid for Preliminary Billing Documents.


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.

Role Description
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

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

Role Description
SAP_SD_BC_BIL_MYINBOX Sales-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.


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.


Reasons for Approval

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

  • WS02000447 (for sales quotations)

  • WS01800145 (for sales contracts)

  • WS02000006 (for sales orders)

  • WS01800180 (for sales orders without charge)

  • WS02000084 (for customer returns)

  • WS02000029 (for credit memo requests)

  • WS01800202 (for debit memo requests)

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


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


Decision Options

More information on this topic can be found on My Inbox documentation – chapter 5 (Link), referenced by the KBA 2424054 – How to setup My Inbox 2.0 app (Link).

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


Display BP


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, SetApproval Request Reasons for Sales Documents on the BAdI Description Field, and enter an Implementation Description and ID before creating the enhancement implementation.


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.



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.


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.

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.


Document Categories

Select the Document Category and add a new Workflow.


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.


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.


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.


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.


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.


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.


Display Sales Document



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.


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.


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.


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.


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.


I hope this blog post was useful for you or anyone interested in learning and implementing the Sales Flexible Workflow on your own SAP S/4HANA 1909 or SAP S/4HANA 2020 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.

Please feel free to leave comments and feedback, you can follow the SAP Business Workflow tag to receive updates on blog posts. For questions and answers please see the SAP Community Q&A area for SAP S/4HANA or SAP Business Workflow and feel free to post your own questions.

Special thanks to Jean-Marie Conseil for help to set up the workflow scenario and many thanks to Iván Ramírez who prepared the initial version of this blog post.


Thanks and regards,

Alexander Shipilov, SAP S/4HANA RIG


Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo venu gopal
      venu gopal

      Good document , thanks for sharing.


      It means we need to take ABAP help to enter a logic to determine a Reason for Approval for sales document type as you mentioned.( View bady documentation).

      Author's profile photo Torsten Heck
      Torsten Heck

      Very good document, thanks!

      I my implementation, all is good - only your picture 22 shows much more details in the Inbox. Is this a own solution? I can´t find more information about the necessary activities to become the same... Any tipps?

      Best regards,

      Author's profile photo Alexander Shipilov
      Alexander Shipilov
      Blog Post Author

      Hi Torsten,

      You're welcome 🙂 Do you mean "header" contents like "Sales data" and "Administrative" data?


      Author's profile photo Torsten Heck
      Torsten Heck

      Hi Alexander,

      I mean the screen of "My Inbox". All the detail from the sales order in the Inbox looks very nice, but I can only see text in the standard definition.

      Best regards,


      Author's profile photo David Hammon
      David Hammon

      I find the approver determination using 'Teams and Responsibilities' a very rigid way of ascertaining approver/s. I require the approver to be determined dynamically with a BADI but it seems that this would require adding a rule and associated function module (with custom code) to an additional 'Z' agent rule on the flexible block 'Agent Rules' tab.

      I was half expecting SAP to have provided a BADI for custom dynamic approval determination?

      Author's profile photo Alexandre Guedes
      Alexandre Guedes

      Hello Alexander.

      First of all, many thanks for this knowledge transfer.

      I´d like to ask you, where in Sales Flexible Workflow we can change the text from e-mail recevied for example: "

      Dear Sir or Madam,

      The sales order you submitted on 01.03.2021 has been rejected.

      Sales Order
      Net Value
      EUR 75,00

      You can view rejection comments in approval details of the sales order object page. If required, you can create a new sales order.


      Kind regards,
      Sales Document Workflow SYSTEM"


      Are there any customizing settings to change this message or is it hard code?

      Could you help us?

      Thank you





      Author's profile photo Michiel Vanhauwaert
      Michiel Vanhauwaert

      Great document Alexander, thanks!

      I was able to activate this for credit memo requests, however do not succeed in activating this for returns.

      In the customizing menu to link the document category to the approval request reason I do not see an option to link document category 'H' for returns.

      Is there an option how I can achieve this?

      best regards,



      Author's profile photo Alexander Shipilov
      Alexander Shipilov
      Blog Post Author

      Hi Michiel,

      Could you please clarify which S/4HANA release are you looking at? Approval workflows for customer returns are available starting from S/4HANA 2020.

      You can check the SAP Roadmap Explorer and "what's new viewer" for existing and planned features.

      Thank you,


      Author's profile photo Sean Zhang
      Sean Zhang

      I guess most of the mentioned part is also available in S/4HANA Cloud?

      Author's profile photo Alexander Shipilov
      Alexander Shipilov
      Blog Post Author

      Hi Sean,

      Yes, Flexible workflow should be more or less the same in Public Cloud and OP (there could be some time lag between the moments when new features appear in OP and Cloud versions).

      For the "classic" workflow - only few classic workflows are available in Public Cloud.




      Author's profile photo Pipat Hompromma
      Pipat Hompromma

      Very usefull thank you Alexander

      I  would like to ask you, I want to add field partner function e.g Sales Employee in Responsibility Definitions of Manage Team and Responsibilities.

      How I can add this fields?


      Best regards,

      Peter Hom.

      Author's profile photo Priya Shekhar
      Priya Shekhar

      Hi Alex,

      Great Blog.

      Is it possible to view the approver details from the sales order or can we only see if its in "Approval" or "Rejected" in sales order header status.



      Author's profile photo Kannan Muthukrishnan
      Kannan Muthukrishnan

      Hi Alex,

      Excellent Blog.
      I followed the steps for creating sales Quotation workflow and it works fine.

      In Approver notification,we see informatoins like Sales Document, Partner Functions, Amount,      item details, material, Order Quantity, Netvalue etc.

      In the item details, if I want to include some custom fields like discount or tax from line item Pricing condition. Please let me know how we can customize the Approver notification message.

      Kannan Muthukrishnan

      Author's profile photo Robert Keenan
      Robert Keenan

      Thank you Alex, a very nice summary.

      Has anyone used the Custom Field and Logic app to eliminate some field changes from retriggering the WFL? Can you direct me to any samples online.

      For us it makes no sense to retrigger the WFL if we hear from the customer that we did not win the quote and we want to set a reason for rejection. Also, even going back in to the quote to issue the BRF+ output sets it back into approval!

      Author's profile photo Damien MARTINEAU
      Damien MARTINEAU

      Hi Alexander

      Does this workflow appies also to sales contracts (within sales order) ?


      Author's profile photo Alexander Shipilov
      Alexander Shipilov
      Blog Post Author

      Hi Damien,

      Yes, approval workflow is available for sales contracts as of SAP S/4HAHA 2020FPS1

      I will update the blog post with actual information.



      Author's profile photo Michiel Vanhauwaert
      Michiel Vanhauwaert

      Hi Alexander,


      great blog, thanks!

      One question: is there an option to show the GOS attachments of the credit memo request in the MyInbox App?