Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
VKR_23
Participant
919

Flexible Workflow for Purchase Order

Flexible Workflow:                                                                                                                                      Flexible workflows enable businesses to establish approval processes that align with their specific needs, allowing customization for various departments, document types, and approval hierarchies.

  • The flexible workflow functionality mainly works based on Document types.

Concept of Flexible workflow in SAP S/4HANA:

  • In SAP S/4HANA, Flexible Workflow is a feature that allows organizations to design and manage workflow processes in a highly adaptable manner.
  • It enables users to configure workflows based on specific business needs without relying on complex custom coding.
  • This flexibility is particularly useful for managing approval processes, task assignments, and other business activities that may vary depending on document type, organizational structure, or business rules.

Key aspects of Flexible Workflow in S/4HANA include:

  1. Document-Driven Workflows: Workflows can be customized for different document types such as purchase orders, invoices, and other transactions, ensuring that workflow steps are customized to the document's characteristics.
  2. Configurable Workflow Paths: The workflow can follow different paths based on predefined conditions or approval hierarchies, making it easy to adapt as business needs evolve.
  3. Approval Stages and Agents: Users can define specific approval stages within the workflow, assigning different roles (agents) responsible for tasks at each stage based on set rules.
  4. Simplified Configuration: Unlike traditional workflows that required extensive ABAP programming, Flexible Workflow offers a more intuitive configuration process, making it easier to set up and modify workflows.
  5. Integration with Other Modules: Flexible Workflow is integrated with other SAP S/4HANA modules, such as Material Management (MM) and Finance (FI), enabling seamless automation across various business functions.
  6. Conditional Workflow Steps: Workflow steps can be triggered based on specific conditions (e.g., when an invoice exceeds a certain amount), adding further flexibility to the process.
  7. Real-Time Monitoring and Insights: The system offers real-time monitoring and reporting features, allowing users to track workflow progress and identify potential delays or issues.

Overview of Flexible Workflow in SAP S/4HANA:

  • Flexible Workflow is a scenario-based workflow which can have more than one starting condition.
  • It is an Alternate to Release Strategy in SAP S/4 HANA.
  • Only one Release Strategy can be used at a time, either it is a classic Release Strategy or Flexible Workflow.
  • Flexible Workflow has the possibility of determining approvers through a lot of different options.
  • It has an option to specify under which condition the workflow step can be trigger/Applicable.
  • It can be Configured by using Fiori App and the approval action can be taken from Fiori App.

Comparison between the Classic Release Strategy and Flexible workflow:

Strategy

Operation

Starting Condition

Validity Period

Step Sequence

Class/ Characteristics

HCM Required

Deadline

Classic Release
Strategy

SAP GUI

Net Value,
Company Code,
Document Type,
Purchasing Organization,
Purchasing Group,
Material group etc.,

NO

NO

Yes

NO

NO

Flexible Workflow

Fiori APP

Cost center,
Currency,
Company Code,
Net order Value,
Purchasing Group etc..,

Yes

Yes

NO

Yes

Yes

Mandatory Pre-Requisite settings need to be configured:

  1. Check automatic workflow customizing
  2. Activate flexible workflow scenarios
  3. Define step names and decision options in My Inbox
  4. Define visualization metadata for My Inbox
  5. Deactivate event type linkages for SAP Business Workflows
  6. Generalize tasks and activate event type linkages for flexible workflow
  7. Register gateway service for value helps
  8. Activate Flexible Workflow for Purchase Orders                                                                                          

1. Check automatic workflow customizing: In this configuration step, we just Ensure that the automatic customizing is active for the workflow functionality. Normally this configuration is done by the Basis Team.        Transaction code: SWU3                                                                                                              Functionality: SWU3 is used to maintain Automatic Workflow Customizing, covering areas like runtime environment, definition environment, additional settings, and task classification.                          Configuration: SPRO –> ABAP Platform –> Application Server –> Business Management –>  SAP Business Workflow –> Maintain Standard Settings

VKR_23_0-1743055656134.png                                                                                   If you have previously used a workflow functionality (either SAP Business Workflow or flexible workflow), check whether all customizing steps listed have a green checkmark.

If not, click Redo Automatic Customizing or select one of the activities and click Execute Activity to make the required settings.

VKR_23_1-1743055656137.png

2. Activate flexible workflow scenarios: Activate the workflow scenarios for a type of business document for example Purchase order.                                                                                                               Configuration: SPRO –> IMG –> ABAP Platform –> Application Server –> Business Management –> SAP Business Workflow –> Flexible Workflow –> Scenario Activation

VKR_23_2-1743055656139.png                                                                                   It is already activated in the system; if not, you can add it by selecting "New Entries," enter the Workflow Scenario ID, select the "Activate" tab, and then click on "Save.

VKR_23_3-1743055656140.png

3. Define step names and decision options in My Inbox: Check step names and decision options to be used in the app My Inbox.                                                                                                                                This step allows you to assign meaningful names to workflow steps and specify the decision options (e.g., Approve, Reject) available to users in the My Inbox app, improving workflow clarity and user interaction.

Key

Decision Text

Nature

1

Approve

POSITIVE

2

Reject

NEGATIVE

Configuration: SPRO –> IMG –> ABAP Platform –> SAP Gateway Service Enablement –> Content –> Workflow Settings –> Maintain Task Names and Decision Options

VKR_23_4-1743055656141.png                                                                           Select the workflow scenario ID and click on Decision keys as shown.                                                      Please make sure that the columns Icon MIME Repository Path must be empty.

VKR_23_5-1743055656143.png                                                                        Decision keys are not maintained for the workflow scenario ID: WS00800238. We can add by click on New Entries.

VKR_23_6-1743055656144.png                                                                        Maintain the data as shown and click on save

VKR_23_7-1743055656145.png                                                                        4. Define visualization metadata for My Inbox: When you use the flexible workflow for the approval of procurement documents, you have to ensure that the app My Inbox is available and set up for your approvers.                                                                                                                                                           To do this, you have to enter the data listed below.

Parameter Name

Visualization Parameter Value

SCHEME

Sapui5

COMPONENT_NAME

cross.fnd.fiori.inbox.annotationBasedTaskUI

QUERY_PARAM00

service=/sap/opu/odata/sap/C_PURCHASEORDER_FS_SRV

QUERY_PARAM01

entity=/C_PurchaseOrderFs('{&_WI_Object_ID.MS_PURCHASE_ORDER. PURCHASEORDER&}')

QUERY_PARAM02

annotations=/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Annotations (TechnicalName='C_PURCHASEORDER_FS_ANNO_MDL',Version='0001')/$value/

Configuration: SPRO – IMG – Material Management – Purchasing – Purchase Order – Flexible workflow for Purchase orders – Client-Dependent Configuration

VKR_23_8-1743055656145.png                                                                                For the workflow for the release of purchase order (workflow scenario ID WS00800238 and task ID TS00800531)                                                                                                                                                   If Task ID does not appear we will add by clicking on create button and the parameters as shown.

VKR_23_9-1743055656146.png                                                                   5. Deactivate Event Type linkages for SAP Business Workflows: In this step we can Deactivate the workflows based on the old workflow Scenarios.                                                                                    Transaction code: SWETYPV/SWE2                                                                                                        Standard Workflow for PO Release Strategy – WS20000075                                                                              If it is activated, Double-click on the line to deactivate it.

 

VKR_23_10-1743055656148.png                                                                               The main reason for deactivating Event Type linkages for SAP Business Workflows in Flexible Workflow is to prevent conflicts and redundancy between the old event-driven workflows and the new condition-based Flexible Workflows.                                                                                                                                           We can deactivate the classic release strategy for PO by unselect the checkbox Linkage activated and click on save.

VKR_23_11-1743055656150.png                                                                                For the Work scenario ID: SW00800238 if the linkage is not activated, activate the linkage and click on save.

VKR_23_12-1743055656151.png

6. Generalize tasks and activate event type linkages for flexible workflow: In this step you have to ensure that the system events are linked to your workflow scenarios, and you have to define the potential agents of workflow tasks to clearly define the organizational responsibility for processing work items.       Configuration: SPRO –> IMG –> ABAP Platform –> Application Server –> Business Management –> SAP Business Workflow –> Perform task-specific Customizing

VKR_23_13-1743055656152.png

VKR_23_14-1743055656155.png                                                                                  To generalize your workflow tasks, navigate to the required SAP application component, for example MM-PUR-PO - Purchase Order, and proceed as follows:

  1. Click Assign Agents
  2. Select a standard task for your business object. (The IDs of tasks start with TS). See Workflow Scenarios and Tasks. Do not select a background task.
  3. Click Attributes and select General Task.
  4. Leave the other settings unchanged and click Transfer.

VKR_23_15-1743055656157.png                                                                                 To activate the event linkages, proceed as follows:

  1. Click Activate Event Linking
  2. Select a workflow scenario for your business object. (The IDs of workflow scenarios start with WS).
  3. Expand the hierarchy to display the relevant event.
  4. Activate the linkage for the listed event.

VKR_23_16-1743055656158.png

7. Register gateway service for value helps: The main purpose of activating the configuration "Register gateway service for value helps" in Flexible Workflow for Purchase Order is to enable the integration of value help functionality in the workflow process.                                                                                                      This allows users to easily select and retrieve valid values (e.g., vendor names, material codes, or other relevant data) during the approval or processing steps in the workflow, improving user experience and data accuracy.

  • You have to register an OData service to enable the value help in the flexible workflow. Basis Team will configure this step.

Transaction code: IWFND/MAINT_SERVICE                                                                                 Configuration: SPRO –> IMG –> ABAP Platform –> SAP Gateway –> Odata Channel –> Administration –> General Settings –> Activate and Maintain Services

VKR_23_17-1743055656158.png                                                                        Standard Technical service is S_MMPURWORKFLOWVH_CDS 

VKR_23_18-1743055656159.png

VKR_23_19-1743055656160.png

If it is not maintained follow the mentioned steps:

  1. On the Activate and Maintain Services screen, choose Add Service.
  2. On the Add Selected Services screen, use the value help of the System Alias field to select the required back end system. (It must be an SAP S/4HANA system).
  3. Add the technical service S_MMPURWORKFLOWVH_CDS (Value helps for manage workflow apps) and click Get Services.
  4. The service is displayed below.
  5. Select the service and click Add Selected Services.
  6. On the subsequent Add Service screen, enter the required data and continue.

8. Activate Flexible Workflow for Purchase Orders:  Reason for Activating Flexible Workflow for Purchase Orders in SAP:

  • It Activates and configures the Flexible Workflow framework specifically for Purchase Orders in SAP and allows you to define customized workflow processes for the approval and processing of purchase orders based on different criteria, such as document type, value, or other business rules.
  • It replaces the traditional release strategy with a more flexible, configurable workflow model that can be tailored to meet specific business needs, improving the efficiency and control over the approval process.                                                                                                                                

Configuration: SPRO –> IMG –> Material Management –> Purchasing –> Purchase Order –> Flexible Workflow for Purchase Orders –> Activate Flexible Workflow for Purchase Orders.

VKR_23_20-1743055656161.png                                                                         Activate the Workflow scenario based check box for the PO Document Type and click on save.

VKR_23_21-1743055656162.png

Next Mandatory setting is HR-BP Data Synchronization: This configuration will be done by SAP HR Team.

  • The main purpose of HR-BP Data Synchronization in SAP Flexible Workflow is to ensure accurate and up-to-date synchronization of Human Resources (HR) and Business Partner (BP) data between different modules in SAP.
  • This allows for seamless integration and consistent data flow between HR and other business processes, such as workflow approvals and task assignments, ensuring that the right employees, managers, and roles are always linked to the appropriate workflows and tasks.

Starting from version 1511, Business Partner (BP) is mandatory, and for certain Fiori apps like Workflow and Supplier Evaluation, assigning an Employee with a User ID is also required. Therefore, the Employee must be created as a BP and synchronized with HR data.                                                                                 Transaction Code: PA30

Select the Infotype Text Action and click on the create tab as shown.

VKR_23_22-1743055656162.png                                                                                Set the parameters as shown and click "Save"; this will take you to the next screen.

VKR_23_23-1743055656163.png                                                                              Enter the Sub-Area and click on save.

VKR_23_24-1743055656164.png                                                                        Maintain the Address and click on save.

VKR_23_25-1743055656165.png                                                                        Maintain the Bank details and click on save

VKR_23_26-1743055656165.png                                                                                For the communication maintain the Infotype as Communication and Subtype as 0001 as shown and click on create,

VKR_23_27-1743055656166.png                                                                           Assign the User ID and click on save.

VKR_23_28-1743055656166.png                                                                                For the communication maintain the Infotype as Communication and Subtype as 0001 as shown and click on create,

VKR_23_29-1743055656167.png                                                                           Assign the Email ID and click on save.

VKR_23_30-1743055656168.png                                                                                The Employee has now been created with the Personnel Number.                                                          Ensure that the configuration settings mentioned below are maintained before creating the Business Partner.    Activate HR Integration –> Goto SM30 –> Maintain table V_T77S0 –> search for entry group: HRALX, sem. abbr.: HRAC and set the value abbreviation value to X.                                                                                When you set the abbreviation value to "X" for the semantic abbreviation HRAC in the entry group HRALX, you are enabling the system to recognize and process HR master data (such as personnel or organizational data) properly.

VKR_23_31-1743055656168.png VKR_23_32-1743055656169.png

Configuration: SPRO –> Cross-Application Components –> SAP Business Partner –> Business Partner –> Basic Settings –> Identification Numbers –> Define Identification Categories

VKR_23_33-1743055656170.png                                                                               The main purpose of maintaining the "Define Identification Categories" step for flexible workflow in SAP is to configure the identification categories that are used to define and categorize objects or data within the workflow process.                                                                                                                                            This enables the system to differentiate between various objects (such as business partners, personnel, or organizational units) and apply appropriate workflow rules and actions based on their categorization.              If activated, remove the Identification Categories for HCM0001 for display only and click on save.

VKR_23_34-1743055656170.png

Now create Business Partner in Transaction code BP.

Configuration: SAP Menu –> Logistics –> Logistics Execution –> Master Data –> Partner –> Supplier –> Create

VKR_23_35-1743055656171.png                                                                                                                       Select BP category as a Person.

VKR_23_36-1743055656171.png                                                                        Maintain the parameters as shown and click on Identification tab as shown.

VKR_23_37-1743055656172.png

VKR_23_38-1743055656172.png                                                                        Maintain HCM001 as the ID Type, and enter the personnel number created in PA30 under the Identification Number tab.                                                                                                                                                     The main purpose of maintaining this step in Business Partner (BP) is to establish a link between the personnel number from PA30 and the corresponding identification type (HCM001) within the Business Partner master data.

This ensures that the employee's identification is correctly associated with the Business Partner record, allowing for accurate integration of HR data into other business processes like personnel management, workflows, and reporting.

VKR_23_39-1743055656173.png                                                                          Business partner 700052 created.

Now, select the BP role FLNV00 and click on the company code.

VKR_23_40-1743055656173.png                                                                             Enter the company code (CC) and reconciliation account, scroll down, then enter the personnel number and save.

VKR_23_41-1743055656174.png

VKR_23_42-1743055656174.png                                                                              Now, select the BP role FLNV01 and click on purchasing.

VKR_23_43-1743055656175.png                                                                             Enter the Purchasing Organization, Order currency and click on save.

VKR_23_44-1743055656176.png                                                                             Now, select the FS0000 role, open the company code, verify if it is extended or not and then click save.     The main purpose of checking the FS0000 role in the Business Partner (BP) for flexible workflow is to ensure that the company code is properly assigned and extended for the relevant Business Partner.                     

This step is essential for integrating financial and organizational data in the workflow, allowing the system to recognize the Business Partner in financial transactions and processes.

VKR_23_45-1743055656176.png                                                                           Select the BUP001 role, verify if all address details are populated or not and then save.

  • The main purpose of checking the BUP001 role in the Business Partner (BP) for flexible workflow is to ensure that the address and contact details are correctly populated and associated with the Business Partner.
  • This role is crucial for managing and verifying the Business Partner’s personal or organizational information, ensuring that accurate contact details are available for communication within the workflow processes

VKR_23_46-1743055656177.png                                                                              Now go to the Transaction code SA38                                                                                                           Enter Program Name /SHCM/RH_SYNC_BUPA_EMPL_SINGLE and click on execute.                                The purpose of executing the program /SHCM/RH_SYNC_BUPA_EMPL_SINGLE in the SA38 transaction for flexible workflow is to synchronize the employee data from SAP Human Capital Management (HCM) with the Business Partner (BP) master data in the system.

This program ensures that the employee information, such as personnel number and associated data, is correctly reflected in the Business Partner master data for use in various HR and financial processes.

VKR_23_47-1743055656177.png                                                                        Maintain the Personnel Number and click on Execute.

VKR_23_48-1743055656178.png

VKR_23_49-1743055656178.png

Now, we can check the logs in the SLG1 transaction. Maintain the object and Subobject as shown.

  • Object: SHCM_EE_INTEGRATION
  • Subobject:  BUPA_SYNC

VKR_23_50-1743055656178.png

VKR_23_51-1743055656179.png

Now the Personnel Number is successfully synced with Business Partner.

Check in SU01 Transaction, It’s synced with Business Partner as shown.

VKR_23_52-1743055656180.png

From here, the process is handled in FIORI.

In the search bar, enter the Fiori tile "Manage Flexible Workflow." This will display a list from which we can select the relevant workflow to process. In this case, I am select managing the workflow for Purchase Orders.

VKR_23_53-1743055656181.png

It will display the existing workflows in the system. To create a new one, click on the "Create" tab.

VKR_23_54-1743055656182.png

In the Header tab, the Workflow Name tab is mandatory.

In Properties tab the fields are optional. The main reason for maintaining "Valid From" and "Valid To" dates in managing flexible workflows is to define the period during which a specific workflow is active and applicable.

These dates ensure that the workflow is executed only within the specified timeframe, providing control over the workflow's validity. This helps prevent outdated workflows from being triggered and ensures that only the relevant workflows are active for processing during the designated periods.

VKR_23_55-1743055656182.png

In this step, we can define the conditions under which the flexible workflow will be triggered in the purchase order.

We can add additional conditions by clicking the plus (+) button as shown.

VKR_23_56-1743055656183.png

In this step, we can assign the User ID and define how the Purchase Order (i.e., Automatic or Manual Release) will be released by clicking the create button.

VKR_23_57-1743055656183.png

In the Header, we have two options like

  • Automatic Release of Purchase Order
  • Release of Purchase Order

Based on requirement, we can select any one option.

The main reason for maintaining the steps for Automatic Release of Purchase Order and Release of Purchase Order in Manage Flexible Workflow for Purchase Order is to streamline and automate the approval process.

  • Automatic Release of Purchase Order: This step ensures that once certain conditions are met, the Purchase Order is automatically released without requiring manual intervention. This helps speed up the procurement process and reduces delays.
  • Release of Purchase Order in Manage Flexible Workflow for Purchase Order: This step allows for a structured and controlled release process within the flexible workflow, ensuring that the Purchase Order goes through the necessary approval stages before being finalized. It provides better oversight, transparency, and compliance with business rules.

VKR_23_58-1743055656183.png

In the Recipients we have two tabs like User and Role

The purpose of maintaining the "Recipients" step in the Manage Flexible Workflow for Purchase Orders, with the two tabs User and Role, is to define and manage who will be involved in the workflow process.

  • User Tab: This allows you to assign specific users to the workflow. By specifying individual users, you ensure that the right people are involved at each stage of the workflow, allowing for more granular control over task assignments and approvals.
  • Role Tab: This allows you to assign roles to the workflow. Roles are often used to define groups of users with similar responsibilities or permissions, ensuring that the right person (or group) with the appropriate authority is assigned to approve or process the purchase order at different stages.

To know the User list, click on F4 Help and click on “GO” system will display the list of  users list. Select the appropriate user for the approval and click on “Ok” Tab.

VKR_23_59-1743055656184.png

In Manage Flexible Workflow for Purchase Order, the options like  "One of the Recipients" and "All of the Recipients" are used to control how approval or action is handled by the recipients within the workflow.

  • One of the Recipients: This option means that only one of the designated recipients needs to take action (approve, reject, or process) for the workflow to continue. This is useful when you have multiple recipients, but only one is required to perform the task, making the process faster and more flexible.
  • All of the Recipients: This option requires all designated recipients to take action before the workflow can proceed. This is used when you want to ensure that every recipient involved in the workflow must approve or perform a task, ensuring a higher level of consensus or control before moving forward.

VKR_23_60-1743055656184.png

It is an optional step because we are already maintained conditions.

VKR_23_61-1743055656185.png

If all the pre-requisites are maintained correctly, the deadline tab will trigger. By clicking on create we can add Number of days as a deadline for approval.

VKR_23_62-1743055656185.png

In this step, If the Approver Reject the workflow what is the action result is to be taken is maintained here.

After Maintaining all the data click on the “Create” button.

VKR_23_63-1743055656185.png

After clicking on the create button, the workflow steps are created and then click on save.

VKR_23_64-1743055656186.png

Next, we can click on the Active button.

VKR_23_65-1743055656186.png

VKR_23_66-1743055656187.png

The system defines the sequence order. Therefore, we need to maintain the flexible workflow at the top, or alternatively, we can deactivate the other person's flexible workflow.

Click on Define order tab. Drag our workflow Name to the top and click on save.

VKR_23_67-1743055656187.png

VKR_23_68-1743055656187.png

VKR_23_69-1743055656188.png

Now Create the purchase Order in ME21N Transaction.                                                                            Based on the activation of Flexible workflow for the Document type Flexible Workflow tab is triggered in the Purchase Order.                                                                                                                                              After Maintaining all the data click on save.

VKR_23_70-1743055656188.png                                                                        ZN_Standard PO created under the number 6000001.                                                                                        Based on the conditions maintained in the Manage workflow for Purchase order the User will trigger in the PO.

VKR_23_71-1743055656189.png                                                                           Based on the 31-day deadline set in the Manage Flexible Workflow for Purchase Order, the system calculates the deadline by adding 31 days to the creation date and time of the Purchase Order.

VKR_23_72-1743055656189.png

In the FIORI Launchpad, search for the Fiori tile "My Inbox" in the search bar.

VKR_23_73-1743055656190.png

Select the Task and click on Approve, the system displays a pop up tab to enter the Decision Note.

VKR_23_74-1743055656191.png                                                                             Enter the Decision Note and click on submit.

VKR_23_75-1743055656191.png

Now check the status in the Flexible workflow of the Purchase order. The Status has been changed from Ready to Purchase Order Released

VKR_23_76-1743055656191.png

VKR_23_77-1743055656192.png                                                                                 Note:                                                                                                                                                                   If the Email was not received by the recipient in My Inbox App, let's proceed with setting up the email transmission. The prerequisites for setting up the email are as follows:                                                              In transaction code S_ATO_SETUP, configure the Adaptation Transport Organizer with specific data, using ZZ1_ as the prefix and ZZ9_ as the sandbox prefix.

VKR_23_78-1743055656193.png

The configurations for SOST and SCOT should be properly set up. The following are the initial screens for SOST and SCOT, which are typically managed by the Basis team.                                                                Transaction code SOST is used to view and manage all messages sent through SAP connect. It displays requests that are either in progress or have already been sent. Each send request in this transaction is linked to a single recipient.

VKR_23_79-1743055656193.png                                                                                  The SCOT transaction code is primarily used to receive notifications via email, fax, and other communication channels.                                                                                                                                                          Add the mail Id and click on tick mark as shown.

VKR_23_80-1743055656194.png

I hope this blog will useful for the consultants who is new for the concept of Flexible workflow. In conclusion, Flexible Workflow in SAP MM simplifies and automates procurement processes by allowing businesses to customize approval steps based on their needs, improving efficiency and ensuring better control over purchase orders and approvals. This flexibility helps organizations streamline operations, reduce manual work, and enhance overall productivity.

1 Comment
Labels in this area