Skip to Content
Technical Articles

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 is also more documentation available on the SAP help portal (Link) and Manage Sales Documents Workflow App Documentation (Link).


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.

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

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

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


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


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, Set Approval 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 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

You must be Logged on to comment or reply to a post.
  • Excellent block......Ivan I explored this workflow for one of my Customer in S4HANA 1909,everything went well but after 3 days this workflow stopped working and could not run again,i did all the analyses by me and from technical colleague also but could not find the reason.

    • Hi Amit,

      Thanks for liking my blog!

      About your Flexible Workflow stopped working, perhaps I can recommend you to check where exactly the workflow stopped working. I can think of 4 places you should check:

      1. Check that your logic in Custom Fields and Logic App is working. When you create a Sales Document the approval status is determined and the document is blocked for any modification.
      2. Check that your team is "ready to use" and the workflow is released and within the validity date.
      3. Check that  the workflows steps are triggering. You may need a help by a workflow expert to check the workflow logs. In the Manage Teams and Responsibilities App you can find a log as well.
      4. Check My inbox app. If the workflow task are being triggered correctly, they may have been filtered in this app or services missing. Check My Inbox documentation.

      If after this check you can't find where the problem is, or you can't fix it, please raise an Incident to the support colleagues on the support launchpad.

      I hope my recommendation is helpful! Let me know if you get your workflow running again.

  • Hi Ivan,

    Excellent Blog.

    Is there a possibility to check a subtotal (for example cumulative discounts) instead of the net value as a step condition for triggering the workflow?

    Thank you


    • Hi Sarish,

      Thanks for liking my blog! Regarding your question, Subtotal 1 to 6 are available on the Custom fields and Logic App at Sales Document item level. You can build your own logic using those fields to assign an approval reason to a Sales Document and trigger your workflow.

      I hope my answer is helpful!


    • Hi Mohd,


      Thanks for liking my blog. Flexible Workflow in Sales is available since SAP S/4HANA 1809 with some limitations. It is available for Credit memo Request only, and customization is different since Reasons for Approval are not available in that release. You can find the pre-requisites on the Manage Sales Document Workflows documentation on the following Link.

      Check the documentation from slide 31 onward.


      Hope this help!


  • Thanks for the excellent Blog, Ivan!

    Is it possible to configure the flexible workflow at the Sales order line item level? i.e. to trigger separate work items for each sales order line item based on line item usage.

  • I activated the flexible workflow for sales documents in my 1909 FSP01 on promise system. This blog has been very helpful to me. But I want to suggest something that event linkage step is missing. In my system event linkages was not activated.

    Thank you so much.

    Here is the help document.

    Activate the event linkage for workflows in your system. This ensures that the system events are linked to your workflow scenarios. In Customizing, go to SAP NetWeaver  Application Server  Business Management  SAP Business Workflow  Perform task-specific Customizing.

    For sales quotations, sales orders, and credit memo requests:

    1. Expand the application component for SD  SD-SLS.

    2. Ensure that event linkage is active for the following:

      • WS 02000447 (for sales quotations)

      • WS 02000006 (for sales orders)

      • WS 02000029 (for credit memo requests)


  • Hi Ivan! Excellent post! Thank you! ?

    Is there possible to use other SD Document Category?

    For example: I need to implement this solution for document category I – Order Without Charge; but in
    the standard solution I saw only those types: C – Order / K-Credit Memo Request /
    and B – Quotation.

    Thank you for your help!


  • Hello Ivan, thanks for your post.

    I have one question re design of Flex WF.

    If this is activated and created SO is not released yet, what is the effect of this SO status - e.g. what about transfer of requirement (for MRP planning)? Does transfer of requirement take place or not?

    Thanks for your feedback.

    Best regards, Pavel

  • Nice document.

    You mentioned next part:

    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.

    How can this be done in the custom fields and logic app to avoid a new approval is every time triggered after a change of document and first approval of order type is done?
    Is it also possible to trigger only again an approval if specific fields are changed (e.g. material added in sales order, quantity of material changed, price of sales order changed, ...)


    Thanks for your feedback.

  • Ivan,

    Very clear and concise instructions. Covers all the points. I commend you for this valuable piece.

    I have an issue in that I am seeing something different on "My Inbox" on Fiori though - where the workflow responses available to me are "Complete", "Show Log", "Claim", "Forward" and "Suspend".

    On the SAPGUI Inbox, however, the workflow shows the expected available responses - "Approve",  "Reject", "Request Rework", "Cancel and keep work item in inbox".

    Would you have a clue to what I'm missing? Its on on-prem 1909 front-end/back-end config.



  • Hi

    Thank you for this Blog. Wanted to confirm the following with you:

    a. Once the workflow has been approved, the release of the document is not recorded in the sales order changes to show that this was approved by an authorized user. How do we get that information?

    b. Is there a report that can give a list of orders that were approved for audit purposes ?

    c. There are comments that you record on the workflow object and also the decision text. How is that attached back to the sales document / can this be attached as a PDF to the underlying sales document so that this can be easily accessed for the specific sales order ?

    Appreciate your responses.