Thursday, December 3, 2020

Concepts in Workflow Release Strategy - Purchase Order

 Why a Release Strategy is required ?

The procurement department of a company consists of multiple buyers who are responsible for buying goods from the market.

Since purchase order is a legal document and it goes to the vendor, it is very much important to control the process to avoid any errors or unauthorized transaction.

Because of the legal implications of Purchase orders, it is very much required to control the procurement process by introducing approvals

There is a hierarchy of people  like the buyer who creates the order and different levels of purchasing managers to supervise and control the procurement process.

Advantages of SAP Business Workflow:

Workflow helps in reduction of process time as it automates the business process.

Can be integrated with the email system so that approvers do not have to wait or enquire about status of particular transactions.

Workflow allows process owners to keep an eye on deadlines, provides statistics on the length of time to complete work processes, determine the workload with regard to individual employees and save processing time.

Workflow helps to enhance quality of work as it reduces manual intervention.

Example : Suppose we are given following scenario:

The Release Strategy would be triggered for the following criteria:

   Document Type NB, Purchasing Org 0001, Purchasing Group 001, 002, 003, 004, 005.

We have 4 different Approval Levels depending on the PO Net Value :

Level 1 : 0.00 – 20,000.00 INR

Level 2 : 20,000.00 – 50,000.00 INR

Level 3 : 50,000.00 – 1,00,000.00 INR

Level 4 : > 1,00,000.00 INR


The Release Approval Workflow is as follows:

Level 1 : 0.00 – 20,000.00 INR – Approver1

Level 2 : 20,000.00 – 50,000.00 INR – Approver2

Level 3 : 50,000.00 – 1,00,000.00 INR – Approver3 / Approver4 / Approver5

Level 4 : > 1,00,000.00 INR – Approver6 (can delegate to any Approver1 / Approver2 / Approver3 / Approver4 / Approver5)

We need to go through the following Customization path in order to configure Release Strategy :

SAP Easy Access -> Materials Management -> Purchasing -> Purchase Order -> Release Procedure for Purchase Orders

Step 1 : Edit Characteristics –  (Tcode CT04)

Business Requirement:

We need to define which fields would be  used to determine the release strategy. This fields constitute the Characteristics in Release Determination. We need to create a Characteristic for every field.

The following characteristics have been created in our case :

ZPO_BSART – Purchase Order Type (NB) – Datatype CHAR 4

ZPO_EKORG – Purchasing Organization (001) – Datatype CHAR 4

ZPO_EKGRP – Purchasing Group (001, 002, 003, 004, 005) – Datatype CHAR 3

ZPO_GNETW – Total Net Order Value – Datatype CURR (15, 2) Unit INR

For a full list of fields that can be used to determine the release strategy, use tccode SE11 communication structure CEKKO.

If we want to make use of a field which is not available in CEKKO, we add that field in structure CEKKOZZ available within CEKKO, we would need to make use of the user exit M06E004 -> Changes to communication structure for releasing purchasing document. The field added in CEKKOZZ should be reflected in Header Data of transaction code ME21N -> Create Purchase Order.

We have maintained default values for ZPO_BSART, ZPO_EKORG & ZPO_EKGRP

Step 2 : Edit Class  – (Tcode CL02)

The characteristics have been grouped together to form the following class – ZPO_HPPTCL

Note: We can create any new Class assigning it to the relevant Characteristics but the Class Type should always be 032.

Step 3: Define Release Procedure –

The Release Group, Code and Strategies need to be defined here.

Configuration Path : SPRO -> Purchasing -> Purchase Order -> Release Procedure for Purchase Orders -> Define Release Procedure for Purchase Orders.

Select Release Groups – Create a new entry for release group 02

Select Release Codes –

There would be 6 Approvers involved in the Release Procedure. Hence, 6 Release Codes W1, W2, W3, W4, W5, W6 are created.

The Workflow Role has been selected as from the dropdown list, since this is related to workflow release strategy without using a user exit.

Select Release Indicator

We would use 2 Release Indicators –

0 – Blocked

2 – Released.

Changeable indicator determines how the system would react when a purchasing requisition or purchasing document is changed after the change of the release procedure.

Release Strategy – Changeable Indicator : Possible values

       Changeable, new release in case of new strategy

   1  Cannot be changed

   2  Changeable, no new determination of strategy

   3  Changeable, new release in case of new strategy

   4  Changeable, new release in case of new strategy or val. change

   5  Changeable, new release if new strategy/outputted

   6 Changeable, new rel. if new strategy or value change/outputted

Select Release Strategies

Since we have 4 approval levels, We would create 4 new Release Strategies – R1, R2, R3, R4.

Configuration for Release Strategies are as follows :

Approval Level R1:


Screen Shot 2016-08-16 at 16.48.56.png


Approval Level R2:


Screen Shot 2016-08-16 at 16.51.00.png


Approval Level R3:


Screen Shot 2016-08-16 at 16.53.02.png

Approval Level R4:


Screen Shot 2016-08-16 at 16.54.19.png

Step 4: Maintain Classification – The Classification data can be maintained from the Classification Tab in Release Strategies or from Transaction Code CL20N.

Screen Shot 2016-08-16 at 16.55.23.png

Step 5: Maintain Workflow 

After configuring the release strategies, the Workflow Role Assignment for the respective Release Codes needs to be done.

Select Workflow from the Activities Screen. Create Assignment for the agent Codes W1, W2, W3, W4, W5, W6.

Note: Release Approval can be made position based instead or person by making reference to the HR Org Structure which would require considerable amount of customization, has not been covered in this section.

Screen Shot 2016-08-16 at 16.57.38.png

Step 6: Configure the Workflow –

Go to transaction SWU3 or use the following menu path :

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

Activate all the lines if they are not already activated

Screen Shot 2016-08-16 at 16.59.22.png

Screen Shot 2016-08-16 at 17.00.41.png

Screen Shot 2016-08-16 at 17.01.29.png

Screen Shot 2016-08-16 at 17.02.13.png

Go to Agent Assignment -> Create from Menu and assign the relevant Approver IDs

Go to Transaction SWDB – Workflow Builder – Create Workflow

Choose Workflow for Release of Purchase Order (WS20000075) from Workflow Box

Screen Shot 2016-08-16 at 17.05.37.png

Screen Shot 2016-08-16 at 17.06.32.png

Click on Header -> Start Events Tab

Screen Shot 2016-08-16 at 17.07.29.png

Check whether object category BO and Object Type BUS2012 are assigned and is active.

From Menu, Go to -> Agent Assignment for Task

Screen Shot 2016-08-16 at 17.08.15.png

Go To Agent Assignment -> Create

Screen Shot 2016-08-16 at 17.08.46.png

Create The Users

Screen Shot 2016-08-16 at 17.09.23.png

Assign the users and generate.

Go back to initial screen and Activate the workflow builder and Save.

Step 7: Type Linkages

Go to Transaction SWETYPV – Type Linkages

Screen Shot 2016-08-16 at 17.10.06.png

Check whether linkage is activated for object type BUS2012 Receiver type WS20000075 by clicking on detail button.

Screen Shot 2016-08-16 at 17.10.40.png

Substitution in PO Workflow:

In SAP, the inbox is generally the “SAP inbox” accessed via transaction code SBWP. SAP also lets you flow the tasks into Lotus Notes and Outlook.

Business Requirement

Substitutes are essential so that a users work items can be seen and executed by a defined replacement user. This ensures that work is not left unattended if someone is out of the office unexpectedly.

A workflow sitting unapproved in the inbox of a manager who is on a month-long vacation could be a problem for the organization.

To address such issues, SAP workflow provides a substitution mechanism. The manager/approver nominates a substitute for the duration of his or her absence.

Substitutions can be of 2 types:

Active substitution (for eg. for absence due to vacations): In this case, the items belonging to the absent person are automatically assigned to the substitutes inbox (in addition to his own work items).

Active substitution is where User A is going on vacation and specifies User B as their substitute and activates the substitution.

Passive substitution (for example, for absence due to illness): the substitute must explicitly assume the substitution and will only view the items of the absent person in this mode.

If Passive substitution is used then the substitute (User B) only sees the work items of User A. User A sets up the substitution but does not activate it, then User B can Adopt the substitution if User A is out of the office unexpectedly.

In order to configure Substitution in PO Workflow, Task Classes Classification Profile need to be defined in Customization.

Business Requirement:

In SAP Business Workflow system, there might be multiple Workflows activated at the same time , e.g. PO Release Approval, HR Time Sheet & Leave Approval, Approval for QM Notifications and so on. In order to map a substitution rule for a particular Work Item / Activity, we need to define Task Classes and Classification Profile and make the relevant assignment.

The customization steps for substitution are as follows :

Step 1: Define classification labels for tasks

To define classification labels, go to SPRO -> SAP Netweaver -> Application Server -> SAP Business Workflow -> Basic Settings -> Maintain Task Classes.

Screen Shot 2016-08-16 at 17.12.49.png

Step 2: Define Substitution Profiles

To define substitution profiles, go to SPRO -> SAP Netweaver -> Application Server -> Business Management -> SAP Business Workflow -> Basis Settings -> Substitute Profile -> Define Substitute Profile.

Screen Shot 2016-08-16 at 17.13.36.png

A substitution profile defines what tasks a substitute approver sees in his/her inbox

Step 3: Group the Classification into Profiles

In the previous step, we just defined names for substitution profiles. In this step, we assign the classifications to the profiles and make their definition complete.

To assign the classifications to profiles, go to SPRO -> SAP Netweaver -> Application Server – > Business Management -> SAP Business Workflow -> Basic Settings -> Substitute Profile – > Assign Substitute profile.

One or more classifications can be assigned to a profile.

Screen Shot 2016-08-16 at 17.14.31.png

Step 4: Classify the Workflow Tasks

The final step, though not technically a customizing activity, is classifying the tasks. Tasks are classified in transaction code PFTC.

Open up a task in change or display mode in PFTC.

To classify it, go to Additional Data -> Classification -> Create. Drop down on the classification field and pick one of the available classifications.

Screen Shot 2016-08-16 at 17.15.12.png

Screen Shot 2016-08-16 at 17.15.38.png

Setting up substitutions:

An approver can pick a substitute for a given time period and assign the substitute a profile.

To pick a substitute from SBWP, go to Settings -> Workflow settings -> Maintain substitute

Screen Shot 2016-08-16 at 17.16.17.png

Click on your name and select Create Substitute (F5)

Screen Shot 2016-08-16 at 17.16.53.png

Select the user ID, use a validity period, Add the ‘substitution profile’ 0003 and check on ‘Substitution Active’

Screen Shot 2016-08-16 at 17.17.28.png

PO Workflow Approval Media:

Business Requirement:

Once a PO is created and it is subject to release strategy based on the defined criteria, Workflow is triggered. There are several ways for an appropriate approver to release the PO for further processing.

Directly from R/3 System logon using a transaction code

From email – Offline or Online

  Offline Approval – when an approver can approve the PO without SAP GUI installed in his system / outside the office network

  Online Approval – when an approver gets a link in his email notification to release a PO  with the help of which he is directed to the SAP transaction to approve the PO.

Using Mobile Apps based on SAP Fiori



1. From System Logon – Relevant Approvers can approve the PO from R/3 system using transaction ME28 for list of releases or ME29N for single release.

The notification also appears in SAP Inbox which can be accessed using transaction SBWP


Screen Shot 2016-08-16 at 17.19.27.png


2. Directly from email –

Through an SMTP setup, which is generally done by basis, an approver can APPROVE or REJECT a workflow work item directly from email without logging into SAP. The approver may not have SAP GUI installed in system.

The list of email IDs to which the workflow items have been sent can be viewed in SAP through transaction SOST.

3. From SAP Fiori / Mobile Apps

SAP Fiori enable you to use your tablet, iPhone or any Android phone to access SAP applications.

You can view pending purchase orders and approve them using SAP Fiori. If necessary, you can forward approvals to a different employee for further processing.

Key Features

You can search for specific purchase orders.

You can display details for each purchase order, for example, the line items with detailed information, such as account assignment and conditions.

You can approve or reject purchase orders, and you can forward them to a colleague.

Prerequisites

Configuration of release strategy is done with Workflow

Fiori Add-On Components are installed on

your system

SAP Gateway to use add-on component

Same configurations need to be done as before through SPRO customizations.

The Fiori App Details for configuring PO Approval in App based devices can be obtained from following link.

Fiori Apps Library

Approval steps would be as follows:

1. Log on the website link using any browser or configure your Fiori App on your Android system

2. Enter Username and password

Screen Shot 2016-08-16 at 17.22.18.png

3. Scroll down to “Buyer” Section and Click “Approve Purchase Orders” logo

Select the Purchase Order number on Left side to look into details

You can also see the items details such as Price, Discount and any other information.

Now user have option to click on “Approve” Button or “Reject” Button or “Forward” button.

Approver can also maintains his comments while approving the purchase order and these comments get maintained in the purchase order header level text

In SAP, the Text PO Approval Note is maintained in Header Text.

Escalation Mechanism – Deadline Monitoring:

Deadline monitoring defines the time span with in which a job is scheduled to End.

Business Requirement:

If a workflow task (say, approval of the PO) is not executed within the specified time, Escalation happens. It may be required to inform his/her immediate superior / colleague regarding the activity if the approver misses on the deadline.

The particular work item is then terminated and the subsequent step (Mail) is executed.

Configuration:

Use transaction SWDD Workflow WS20000075 -> Go to User Decision step, click on the Latest End Tab

By default, no Deadline Monitoring is Active,

Choose the “Work Item Creation” from the List Box.

After selection “Work Item Creation”, choose an offset of 5 minutes. This means that work item must be executed within 5 minutes of the creation, if not this would trigger.

     Enter recipient details to whom the message to be escalated, if the work item is not executed within 5 minutes after work item creation.

Save and Activate the Workflow Definition.

Use transaction code SWWA to check how the deadline monitoring program is scheduled in program.

Status Monitoring

Business Requirement:

In order to monitor a PO status at a particular time point, for eg., with which approver a PO is stuck, or the workflow steps undergone by a particular PO, we need to run some standard reports which enables Status Monitoring of the Work Items.


Status Monitoring of PO’s awaiting approval can be viewed using transaction SWI6.

Go to transaction SWI6 and give Object Type BUS2012

The report provides information on Status of PO s for which release strategy has been triggered.

Audit Trail:

Business Requirement:

As part of Audit Requirement, one might be interested to see who all are involved in approving a given PO. It is required to check the SAP User IDs that actually processed the approval workflow. In order to meet such requirements, there are certain standard SAP transactions which can be used.

     In order to check PO Release History, one can use standard report ME2N

     Select a PO line and click on ‘Changes’

This gives the change history in a give Purchase Order

One can also make use of the standard Workflow SWI6, SWIA, etc to check on the Audit relevant reports (We can search in TSTC table with transaction code SW* in order to check on the workflow relevant report transactions)

Workflow Notification Automatic Deletion:

Report for Deleting Completed Notifications 

Business Requirement:

Completed notifications are not deleted immediately but are initially assigned the status Logically Deleted. You can physically delete these notifications from the database by using an appropriate report. In doing so, you can reduce the size of the relevant database table. This can result in reduced database-access times. Furthermore, you can reduce the amount of memory required.

Standard Report RSWNNOTIFDEL can be scheduled as a background job or execute it immediately.

If we schedule it as a background job, it is executed once daily and deletes all notifications that have been set to logically-deleted for more than 10 days. To change the number of days, we have to use transaction Schedule Background Job Job (SM36) .

If we execute the report immediately, we can also enter the number of days.

Transaction Code SWWL can also be used to delete Workflows based on their status.

Note : Execution of SWWL is not recommended in the Production environment.

Transaction SWIA can be used to manually complete the workflow instead of deleting it.

Security Assets – Roles & Authorisations:

Business Requirement:

In SAP, Roles and Authorization plays a vital order in order to restriction a transaction / Activity to the concerned user only. In PO Approval Workflow as well, it is very important that the Approvers are provided appropriate role in order to release a PO at a level defined for them by the management. For eg., A Level 1 Approver should not be authorized to approve a PO for level 2 or A level 2 Approver does not require interventions to approve PO at level 1.

For this reason, appropriate authorizations need to be set up in the user profiles where they user/approver would be given access to the relevant Release Code and Release Group only to which they are authorized to.

This is a Basis activity to provide the appropriate Authorization for release codes to the approvers.

Procedure to set up Roles & Authorizations:

Step 1: Through transaction Code PFCG, create a new authorization group, say, ZPO_APPROVER1

Step 2: The authorization group should contain the object M_EINK_FRG. The object needs to be added manually. First, select the object MM_E. Under that, select M_EINK_FRG.

Step 3: Assign values to the following as per release strategy

Release code: FRGCO

Release group: FRGGR

Step 4: Use Transaction Code SU01 to provide the rights to the approver as required. The appropriate Release code and release

group combination needs to be used for every user Authorization.

I have tried to explain the basic settings for configuring a PO workflow release strategy. Although the basic workflow configuration may be done by a Functional Consultant, help of a workflow consultant would be required in order to accommodate more complex business scenarios. This blog would give you a basic idea on the functionalities we can perform parallel to configuring the business workflow.

I hope you have enjoyed going through the configuration steps and scenarios. Any suggestions to this would be highly appreciated.