You are on page 1of 17

Process Controlled Workflow SRM 7.

0 (Using BRF)

Applies to:
SAP SRM 7.0 For more information, visit the Supplier Relationship Management homepage.

Summary
This document helps user to create workflows using BRF (Business Rule Framework) is called Process Controlled workflow. This document explains the procedure for SC workflow. Author: Bhanu P R Gattu

Company: ACS Systech Integrators Created on: 1 June 2010

Author Bio
Bhanu P R Gattu is working as an ABAP/WORLFOW consultant in ACS Systech Integrators in Bangalore from past 4 years.

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 1

Process Controlled Workflow SRM 7.0 (Using BRF)

Table of Contents
Process Controlled workflow Step by Step Procedure ....................................................................................... 3 Dynamic Process Levels (To Increase Process Levels Dynamically) .......................................................... 15 Related Content ................................................................................................................................................ 16 Disclaimer and Liability Notice .......................................................................................................................... 17

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 2

Process Controlled Workflow SRM 7.0 (Using BRF)

Process Controlled workflow Step by Step Procedure


To assign the Process Schema Evaluation ID to Business Object. Transaction code: /SAPSRM/WF_PROCESS. In our case it is shopping cart, Business Object: BUS2121.

In This Case Evaluation ID: ZEV_SC_EVENT.

Need to create the evaluation id as event in BRF (Business Rule Framework). To do so, go to transaction BRF

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 3

Process Controlled Workflow SRM 7.0 (Using BRF)

Assign the implementation class 0EVENT. This event will help you to identify or select the Process Schema. This can be achieved by Rules of that particular event by assigning Expression as shown in below screens.

In our case Expression Name: ZEX_SC_FM_SCHEMA.

There are many types of Expressions: We need to use function module Expression type if we want to choose process schema based on conditions. Or we can use constant type if we have single Process Schema. We have multiple process Schemas assigned to SC.

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 4

Process Controlled Workflow SRM 7.0 (Using BRF)

Create Expression ZEX_SC_FM_SCHEMA (Type: 0CF001).

Assign standard function module /SAPSRM/WF_BRF_0EXP000 as access FM. Assign a class and method as parameters to this FM. There 2 parameters are constant type Expressions. One parameters represents Class Name and another parameter represents Method Name.

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 5

Process Controlled Workflow SRM 7.0 (Using BRF)

To create Class name and Method name parameters, Class name Expression needs to be created with following naming convention. Class Name: ZC_C1_C_CON_* Method Name: ZC_C2_C_CON_*

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 6

Process Controlled Workflow SRM 7.0 (Using BRF)

Class Implementations: Copy the standard Class /SAPSRM/CL_WF_RULE_CONTXT_SC into a Z Class.

Create your own method to select the Process Schema. Assign the parameters as shown in below screen.

Exceptions, if any.

Assign the type of value.

Based on conditions assign the Schema value to EV_VALUE variable.

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 7

Process Controlled Workflow SRM 7.0 (Using BRF)

Now under each Process Schema we have to create Process Levels. Each process Level will work as one step in workflow. Each process level will have 1. 2. 3. 4. Level Type Evaluation ID ( BRF Event) Responsibility resolver Name Type of decision.

And final process level should be Automatic (system user) level type, 0EV999 as evaluation id and task number 40007988.

Consider at present we have 7 custom process levels and one system process levels.

First Process Level: Level Type: Approval with completion. Evaluation ID: ZEV_SC_CATEGORY ( BRF event).

To create BRF event follow the same procedure as above

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 8

Process Controlled Workflow SRM 7.0 (Using BRF)

In this case we will validate the Process level by using formulas, If all formulas are successful, then process level is true else it is false. Here we have two formulas

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 9

Process Controlled Workflow SRM 7.0 (Using BRF)

Formulas Expression can be any type of expression, in this case we have Function module Expression, in that Expression we can assign EV_VALUE as X or others based on conditions.

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 10

Process Controlled Workflow SRM 7.0 (Using BRF)

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 11

Process Controlled Workflow SRM 7.0 (Using BRF)

Procedure to create Responsible Resolver Name: In this procedure we will assign the approvers for the work item ( RT_APPROVERS internal table will have the approvers) SPRO 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.

SPRO SAP Supplier Relationship Management SRM Server Business Add-Inns workflow Process-Controlled Workflow Define Agents.

Business

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 12

Process Controlled Workflow SRM 7.0 (Using BRF)

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 13

Process Controlled Workflow SRM 7.0 (Using BRF)

If you want to group the items Use the below mentioned Method. We can use this method to create Area Class for group of items or SC by passing the Approver id or any value to find the approver. We can copy the standard implementing class of BADI /SAPSRM/BD_WF_RESP_RESOLVER.

Sample code:

Copy SAP standard Method /SAPSRM/CL_WF_AREA_MANAGER and use method GET_RESPONSIBLE_APPROVERS to assign responsible approvers. Use this method in GET_APPROVERS_BY_AREA_GUID method.

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 14

Process Controlled Workflow SRM 7.0 (Using BRF)

Sample Code:

GET_RESPONSIBLE_APPROVERS:

Dynamic Process Levels (To Increase Process Levels Dynamically) Implement the BADI /SAPSRM/BD_WF_PROCESS_CONFIG. (Read the documentation of the BADI) Before that please apply OSS note -1372031 (Up to SRM 7.0 Only).

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 15

Process Controlled Workflow SRM 7.0 (Using BRF)

Related Content
Process Controlled Workflow Configuration Guides for SRM 7.0 Business Rule Frame Work

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 16

Process Controlled Workflow SRM 7.0 (Using BRF)

Disclaimer and Liability Notice


This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade. SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk. SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.

SAP COMMUNITY NETWORK 2010 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 17

You might also like