BRF Implementation

17
 SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com  © 2010 SAP AG 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 workflow’s 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.

Transcript of BRF Implementation

Page 1: BRF Implementation

8/3/2019 BRF Implementation

http://slidepdf.com/reader/full/brf-implementation 1/17

 

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

  © 2010 SAP AG

Process Controlled Workflow SRM7.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 workflow’s using BRF (Business Rule Framework) is called ProcessControlled workflow. This document explains the procedure for SC workflow.

Author: Bhanu P R Gattu

Company: ACS Systech IntegratorsCreated on: 1 June 2010

Author Bio

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

Page 2: BRF Implementation

8/3/2019 BRF Implementation

http://slidepdf.com/reader/full/brf-implementation 2/17

  Process Controlled Workflow SRM 7.0 (Using BRF)  

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

  © 2010 SAP AG

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 

Page 3: BRF Implementation

8/3/2019 BRF Implementation

http://slidepdf.com/reader/full/brf-implementation 3/17

  Process Controlled Workflow SRM 7.0 (Using BRF)  

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

  © 2010 SAP AG

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

Page 4: BRF Implementation

8/3/2019 BRF Implementation

http://slidepdf.com/reader/full/brf-implementation 4/17

  Process Controlled Workflow SRM 7.0 (Using BRF)  

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

  © 2010 SAP AG

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 chooseprocess schema based on conditions. Or we can use constant type if we have single Process Schema.

We have multiple process Schemas assigned to SC.

Page 5: BRF Implementation

8/3/2019 BRF Implementation

http://slidepdf.com/reader/full/brf-implementation 5/17

  Process Controlled Workflow SRM 7.0 (Using BRF)  

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

  © 2010 SAP AG

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.

Page 6: BRF Implementation

8/3/2019 BRF Implementation

http://slidepdf.com/reader/full/brf-implementation 6/17

  Process Controlled Workflow SRM 7.0 (Using BRF)  

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

  © 2010 SAP AG

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_ *

Page 7: BRF Implementation

8/3/2019 BRF Implementation

http://slidepdf.com/reader/full/brf-implementation 7/17

  Process Controlled Workflow SRM 7.0 (Using BRF)  

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

  © 2010 SAP AG

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.

Page 8: BRF Implementation

8/3/2019 BRF Implementation

http://slidepdf.com/reader/full/brf-implementation 8/17

  Process Controlled Workflow SRM 7.0 (Using BRF)  

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

  © 2010 SAP AG

Now under each Process Schema we have to create Process Levels. Each process Level will work as onestep in workflow.

Each process level will have

1. Level Type2. Evaluation ID ( BRF Event)3. Responsibility resolver Name4. Type of decision.

And final process level should be Automatic (system user) level type, 0EV999 as evaluation id and tasknumber 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

Page 9: BRF Implementation

8/3/2019 BRF Implementation

http://slidepdf.com/reader/full/brf-implementation 9/17

  Process Controlled Workflow SRM 7.0 (Using BRF)  

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

  © 2010 SAP AG

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

Page 10: BRF Implementation

8/3/2019 BRF Implementation

http://slidepdf.com/reader/full/brf-implementation 10/17

  Process Controlled Workflow SRM 7.0 (Using BRF)  

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

  © 2010 SAP AG

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

Page 11: BRF Implementation

8/3/2019 BRF Implementation

http://slidepdf.com/reader/full/brf-implementation 11/17

  Process Controlled Workflow SRM 7.0 (Using BRF)  

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

  © 2010 SAP AG

Page 12: BRF Implementation

8/3/2019 BRF Implementation

http://slidepdf.com/reader/full/brf-implementation 12/17

  Process Controlled Workflow SRM 7.0 (Using BRF)  

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

  © 2010 SAP AG

Procedure to create Responsible Resolver Name:

In this procedure we will assign the approvers for the work item ( RT_APPROVERS internal table will havethe approvers)

SPRO SAP Supplier Relationship Management SRM Server Cross-Application BasicSettings Business workflow Process-Controlled Workflow Business Process Configuration Definefilter values for BADI ‘Define Agents’. 

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

Page 13: BRF Implementation

8/3/2019 BRF Implementation

http://slidepdf.com/reader/full/brf-implementation 13/17

  Process Controlled Workflow SRM 7.0 (Using BRF)  

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

  © 2010 SAP AG

Page 14: BRF Implementation

8/3/2019 BRF Implementation

http://slidepdf.com/reader/full/brf-implementation 14/17

  Process Controlled Workflow SRM 7.0 (Using BRF)  

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

  © 2010 SAP AG

If you want to group the items Use the below mentioned Method. We can use this method to create AreaClass 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 methodGET_RESPONSIBLE_APPROVERS to assign responsible approvers. Use this method inGET_APPROVERS_BY_AREA_GUID method.

Page 15: BRF Implementation

8/3/2019 BRF Implementation

http://slidepdf.com/reader/full/brf-implementation 15/17

  Process Controlled Workflow SRM 7.0 (Using BRF)  

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

  © 2010 SAP AG

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).

Page 16: BRF Implementation

8/3/2019 BRF Implementation

http://slidepdf.com/reader/full/brf-implementation 16/17

  Process Controlled Workflow SRM 7.0 (Using BRF)  

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

  © 2010 SAP AG

Related Content

Process Controlled Workflow

Configuration Guides for SRM 7.0

Business Rule Frame Work

Page 17: BRF Implementation

8/3/2019 BRF Implementation

http://slidepdf.com/reader/full/brf-implementation 17/17

  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 notsupported 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 orcode sample, including any liability resulting from incompatibility between the content within this document and the materials andservices offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of thisdocument.