Skip to Content

Process-controlled workflows are available for the following business objects:

  • Shopping cart

  • Purchase order

  • Contract

  • RFx

  • Quote

  • Invoice

  • Confirmation

We will see the example for Shopping cart workflow using PROCESS CONTROLLED WORKFLOW (BRF).

 Requirement overview:

Automatic assignment of approvers/approvals.  Users may not be able to change the default Approver.

Approver determination is based on position in the Organizational Hierarchy (i.e. ‘head of org unit’).

Shopping cart approval is based on the value of the highest dollar line item of the shopping cart. 

All shopping carts require Approval. The main criteria for shopping cart approval are:  K-Level of Manager, Company Code, Account Assignment Category, Item Type, and Approval Limit monetary amount per the currency used on the shopping cart.

 

The approval process in BRF typically run on several process levels.  So we need to define the process levels as below.

 The process level configuration will be done in the below path using SPRO transaction:

 SAP Implementation Guide -> SAP Supplier Relationship Management -> SRM Server -> Cross-Application Basic Settings -> Business Workflow -> Process Controlled Workflow -> Business Process Configuration -> Define Process Levels

Select the Object type as BUS2121 and click on ‘Process level configuration’ on left hand side.

 Untitled

 

We need to enter the ‘Process level schema’ as below.  

 Process_levels1

 

The below are the process levels as below. Here as per the requirement we have created the two process levels. One is for N – level approvals and another one is for automatic system approvals.

 

Process_levels2

 

Note: we have the standard evaluation ID ‘0EV_SC_SL2’ and responsible resolver name ‘RR_SPENDING_LIMIT_APPROVER’ to achieve the N-Level approval process in shopping cart.  

 

How N-Level Approval Process will work:

 

We need to create process level using the evaluation ID ‘0EV_SC_SL2’ and responsible resolver name ‘RR_SPENDING_LIMIT_APPROVER’.

This will get the approver name and approval limit of manager of org unit from the SLAAPPROVER attribute.

PPOSA_BBP: Here we can maintain the approval limit for the manager. The standard BADI implementation has logic to fetch the approval limit from the org unit.

 

Employee

 

Employee1

But we have created the Z evaluation ID and Z responsible resolver name because of the below requirement.

In our scenario, we have the K-Level attribute in the org unit for the manager, here they will maintain the level like K1, K2…and based on the K-level, company code and account category we need to get the approval limit from Z table.

  Employee

 

The evaluation ids like Z_SC_NSTEP, 0EV999 are also the events.

 Process_levels2

Event

 

In the expression, we have the formula. Check is the spending limit of the approver is less than the most expensive line item.

 Expression

 

In the expression, we have given the parameters as below, mentioned the Z class name and method to get the previos limit of the approver. Here we can write our own logic.

 

 Expression

 

Also created the Z responsible resolver name ‘Z_KLEVEL_APPROVER’ as below. Which will be used as filter values for BADI implementations.

 Process_level

 

The below is the path to create the Z responsible resolver name.

 SAP Implementation Guide -> SAP Supplier Relationship Management -> SRM Server -> Cross-Application Basic Settings -> Business Workflow -> Process Controlled Workflow -> Business Process Configuration -> Define Filter Values for BAdi ‘Define Agents’.

 

AGENTS

 

The below standard BADI will create the process levels:

BADI_DEF

 So we have created the implementation for this as below.

 BADI_IMPL

Also given the filter value as ‘Z_K_LEVEL_APPROVER’

 FILTER

In this method, we will write our own logic to create the process levels dynamically.

BADI_IMPL1

Note:  the scenario is: we have created the process level 100, but the requirement is the shopping cart should send for N- level approvers based on the most expensive line item of shopping cart.  

Example: I have created the cart with 1000$ and in the org unit we have TESTMGR1 has approval limit 500$ and TESTMGR2 has approval limit as 1200$. Now the shopping cart should sent for 2 level approvers. So we need to create the 2 process level dynamically.

In our scenario: we will get the document responsible person and will fetch manager. And again will pass the manager and get the manager of manager. This will be done in a while loop. So that we will get all the managers in the org unit and K-Levels. And will create the number of process levels based on the number of managers in the org unit.  

Till the program finds the valid list of approvers, the process levels will be repeated based on the formula in the expression. (Spending limit of approver<Most expensive line item).

Based on the configuration, the below BADI  /SAPSRM/BD_WF_RESP_RESOLVER will get the approvers.

 So create the implementation for this BADI and will maintain the filter value as ‘Z_K_LEVEL_APPROVER’.

To report this post you need to login first.

6 Comments

You must be Logged on to comment or reply to a post.

  1. muthuraman govindasamy
    Good Job. Nice one. Keep writing more ..
    Write this in topi in article rather than blog.
    Articles topic can be easily searched and can be sorted by quick reference to everyone rathern than blog.
    Muthuraman
    (0) 
  2. Yichao Sun
    Great artical!
    After reading it, I still did not get the key why the approval process will be repeated by only one process level 100.
    As the artical, it is because of the expression formula. Does it mean the WF will follow the organizational structure and get those organization bojects with the right attributes and values of money limit?
    (0) 
    1. lakshmi podile Post author

      Hi,

      Sorry for the late reply..but still I just want to give the clarification.

      Yes, the process levels will be repeated based on the expression formula till the condition get satisfied.  The logic will be written in expression formulas.

      Please let me know if any questions.

      Thanks,

      Lakshmi

      (0) 
    1. lakshmi podile Post author

      Hi Syam,

      No Its not auto generated. while creating process levels, we will assign the custom event and event will hold the expression which nothing but a formula. These are custom formulas based on our requirements we can edit them.

      Thanks,

      Lakshmi

      (0) 

Leave a Reply