Skip to Content
Technical Articles
Author's profile photo Chelliah Soundar

Flexible Workflow for Sourcing and Procurement in SAP S/4HANA

Content updated on July 13, 2023

Flexible Workflow is a new concept introduced in SAP S/4HANA with the objective to simplify workflow configuration. Documents in Sourcing and Procurement, such as purchase requisition, purchase order, request for quotation, etc., usually go through an approval process. In the SAP ERP system, we used Release Procedure and, in some cases, SAP Business Workflow to accomplish this process. For example, the approval process for a PO could be as simple as the following: any PO exceeding $1000 requires a manager’s approval and any PO exceeding $5000 requires two levels of approval.

Even though both Release Procedure and SAP Business Workflow are still available in S/4HANA, it is recommended that you use the new Flexible Workflow functionality in S/4HANA. The flexible workflow is based on a set of predefined workflow scenarios and tasks. This provides the functionality to define condition-based workflow for different processes in sourcing and procurement. It is possible to define single or multi step approval processes, and the relevant workflow items are made available in the My Inbox Fiori App for the approvers. Manage Workflows Fiori Apps are available for different purchasing documents, and these apps allow the Business process specialist to set up workflows based on the business requirement.

In this blog, I will explain the configuration steps and provide screenshots for workflows for Purchase Requisition. The steps to implement workflows for other purchasing documents are similar, and the information provided in this blog may be used as reference material for those as well.

Flexible Workflow for Purchase Requisitions – Configuration steps

  1. Automatic Workflow Customizing

SPRO -> ABAP Platform -> Application Server -> Business Management -> SAP Business Workflow -> Maintain Standard Settings

This customizing activity has the following areas

  • Runtime Environment
  • Definition Environment
  • Additional Settings and Services
  • Classify Tasks as General

If you have configured workflow functionality (SAP Business Workflow or Flexible Workflow) in your system already, all Customizing steps listed in this step should have a green checkmark. If not, click Redo Automatic Customizing to complete this activity. You could select individual activities under each area and click Execute Activity to make the required settings. If you have not used any workflow before you need to click Automatic Workflow Customizing to make the settings.

For more info on Automatic Workflow Customizing please visit https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/36802406aebb4b96b1598246e1d316ee/4f25999fe85a18c3e10000000a421937.html

  1. Activate flexible workflow scenarios

SPRO -> ABAP Platform -> Application Server -> Business Management -> SAP Business Workflow -> Flexible Workflow -> Scenario Activation (You could access this from PR configuration as well)

Activate the workflow scenario ID as shown in the table below. Scenarios will become visible in the Manage Workflows for Purchase Requisitions Fiori App once activated here.

Scenario ID Workflow Name
WS02000458 Overall Release of Purchase Requisition
WS02000471 Release of Purchase Requisition Item

 

  1. Define step names and decision options to be used in the Fiori app My Inbox.

SPRO -> ABAP Platform -> SAP Gateway Service Enablement -> Content -> Workflow Settings -> Maintain Task Names and Decision Options

In the Step Name Overview screen, the following new entries are made if they don’t exist already. The step names defined in this step are used in the Fiori app My Inbox to group and display the approvers’ work items.

Workflow ID Step ID Step Description
WS02000458 0000000019 Overall Release of Purchase Requisition
WS02000471 0000000020 Release of Purchase Requisition Item

In the Step Name Overview screen, select a workflow ID and double click on Decision Keys in the dialog structure on the left-hand side of the screen. Then enter the data shown in the table below

Key Decision Text Nature
1 Approve POSITIVE
2 Reject NEGATIVE

The columns Icon MIME Repository Path and Comment On must be left blank.

This activity should be repeated for all workflow scenarios and steps that you would like to use.

 

  1. Define visualization metadata for My Inbox

In S/4HANA, procurement documents that use flexible workflow are approved in the Fiori App My Inbox. For this reason, the Fiori app My Inbox should be activated and set up for the approvers. Please refer to the link below for more details

https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/af9ef57f504840d2b81be8667206d485/179740ca1bff480c86a3d86522143f4f.html

SPRO -> Materials Management -> Purchasing -> Purchase Requisition -> Flexible Workflow for Purchase Requisitions -> Client-Dependent Configuration

Select Worklist Client as SAPUI5 My Inbox or My Inbox and choose Task tab.

 

 

Select Task ID TS02000702 and make the following entries

Parameter Name Visualization Parameter Value
COMPONENT_NAME cross.fnd.fiori.inbox.annotationBasedTaskUI
QUERY_PARAM00 service=/sap/opu/odata/SAP/C_PURREQUISITION_FS_SRV
QUERY_PARAM01 entity=/C_PurRequisitionFs(PurchaseRequisition='{OBJKEY}’)
QUERY_PARAM02 annotations=/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Annotations(TechnicalName=’C_PURREQUISITION_FS_ANNO_MDL’,Version=’0001′)/$value

 

Select Task ID TS02000714 and make the following entries

Parameter Name Visualization Parameter Value
SCHEME Sapui5
COMPONENT_NAME cross.fnd.fiori.inbox.annotationBasedTaskUI
QUERY_PARAM00 service=/sap/opu/odata/sap/C_PURREQUISITIONITEM_FS_SRV
QUERY_PARAM01 entity=/C_PurRequisitionItemFs(PurchaseRequisition='{&_WI_OBJECT_ID.MS_PUR_REQ_ITEM.PURCHASEREQUISITION&}’,PurchaseRequisitionItem='{&_WI_OBJECT_ID.MS_PUR_REQ_ITEM.PURCHASEREQUISITIONITEM&}’)
QUERY_PARAM02 annotations=/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Annotations(TechnicalName=’C_PURREQUISITIONITEM_FS_ANNO_MDL’,Version=’0001′)/$value

 

  1. Deactivate event type linkages for SAP Business Workflow

In this step, using T Code SWETYPV (Event Type Linkages), deactivate any old workflow scenarios you may have used previously.

 

  1. Generalize tasks and activate event type linkages for flexible workflow

SPRO -> ABAP Platform -> Application Server -> Business Management -> SAP Business Workflow -> Perform task-specific Customizing

 

Navigate to the application component, MM-PUR-REQ – Purchase Requisitions. Click on Assign Agents

Select Overall Release of purchase Requisition (TS02000702). Click on Attributes.

Repeat this step for Release of Purchase Requisition Item (TS02000714)

Choose General Task and click Transfer

 

Go back one time and click Activate Event Linking

Select the workflow scenario for Overall Release of Purchase Requisition WS02000458 and expand the node to display the relevant event. Click on the button Deactivate to activate the event linking

Repeat this step for workflow scenario, Release of Purchase Requisition Item WS02000471

  1. Register gateway service for value helps

To enable value help in the flexible workflow an OData service is used. In this step you will register this OData service as shown below.

SPRO -> ABAP Platform -> SAP Gateway -> OData Channel -> Administration -> General Settings -> Activate and Maintain Services

T Code: /n/IWFND/MAINT_SERVICE

From the initial screen choose Add Service and enter the following values

System Alias – Use value help (F4) and select the S/4HANA backend system

Technical service = S_MMPURWORKFLOWVH_CDS

and click on Get services and then click on Add Selected Services

This concludes the configuration required for Flexible Workflow for Purchase Requisition and now you should be able to launch the Manage Workflow app and set up the workflow as required for the business.

 

Additional links

Flexible Workflow for Purchase Requisitions

Workflow Scenarios and Tasks

Documents Supporting the Flexible Workflow

 

For questions, please check these helpful links:

 

I hope this blog post was helpful for you. If so, click on “like” or “share”. I’m looking forward to your feedback and thoughts.

Thank you.

Brought to you by the SAP S/4HANA RIG and Customer Care team.

 

 

Assigned Tags

      8 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo MOHAN V
      MOHAN V

      Simple and Short blog to understand Flexible workflow concept in SAP S4 HANA

      Author's profile photo RTN P
      RTN P

      hi,

      how to enable Active Event Linkage in QAS?

      Author's profile photo Alexis Siegel
      Alexis Siegel

      Hi,

      You can open the customizing with SCC4, it's good for testing but not the most recommended.
      You can make changes in the DAS and transport.

      Author's profile photo Tomasz Scibior
      Tomasz Scibior

      Hello,

      I need your help please.

      Is there any way during PR creation for user to select approver from the list based on role assigned ?

       

      Author's profile photo Kanaka Rao Gumpina
      Kanaka Rao Gumpina

      Very good explanation. Thank you.

      Author's profile photo Fernando Bail
      Fernando Bail

      Is possible assign attachments (like a PDF) in message to releaser (to Fiori My Inbox) ?

      Author's profile photo Minh Tran Nguyen Ngoc
      Minh Tran Nguyen Ngoc

      Hi Chelliah Soundar,

       

      I have issue that PR number show in FIORI but there are not any item shows, but I can approve PR, is there any services need to active ?

      Author's profile photo sanan afridi
      sanan afridi

      Hi Alexis,

      I am facing an issue we activated Workflow WS02000471 but when user approve this in Fiori still it is showing not approved. The status in me53n is showing 03 In released while I checked the SWIA Work item is showing completed. Could you please advise?