Upload
nikhil-reddy
View
238
Download
3
Embed Size (px)
Citation preview
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 1/103
Live Expert Session for
SAP SRM 7.0
Workflow Advanced
Jijilal Ramachandran, Procurement RIG EMEAMarkus Frieske, Procurement RIG Americas
Masayuki Sekihara, Procurement RIG APJ
November 14, 2008
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 2/103
© SAP 2008 / Page 2
SRM 7.0 Workflow Advanced - Agenda
Overview :
Business Overview
Functions
Changes
Migration decision
Further Reference
Architecture:
Process-Controlled Workflow
Decision Type
Business Rule Framework
Runtime Flow
Customizing:
Technical Configuration
BRF Configuration
Business Process Configuration
Extensions:
BRF Examples
BADI
Agent BADI Examples
Migration
Covered by Basic Session on
November 10
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 3/103
© SAP 2008 / Page 3
Introduced in SRM 6.0
Modeled/Configured process hascontrol on the process-flow
Process-Controlled Workf low Application-Control led Workflow Existed in SRM 5.0 and releases before
Application has control on the Business
workflow templates
SRM 7.0 Approval Framework
2 enablement possibilities
Development Strategy
• In future releases new features andfunctions will be developed
• Rolled-in new requirements from thecustomer will be developed
• No new features and functions will bedeveloped
• Development effort will be only on bug-fixing
Positioning
• Workflow of choice• Not to be positioned to new customers
• Position to upgrade customers only if there is a considerable effort to migrate
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 4/103
Basics of ‘How it works’
BO
Schema 1
Schema 2
Schema 3
Process Step 1
Process Step 2
Process Step 3
Process Step 4
Linked to many
Consists of Many
Sequence No
Process Type
Agent(s)
Business rule
Decision Type Task id
H
A
S
B
U
S
I
N
E
S
R
U
L
E
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 5/103
© SAP 2008 / Page 5
Process-Controlled Workflow
Configuration Blocks
Appl ication
SAP
Business
Workflow
SRM
Process
Level
Definition
BRF
Process
Level
Process Control
WS40000014
Process Level
WS40000015
Approval
WS40000016
Event Event
APL
BWF
PC
BRF
Completion
WS40000017
Approve/Rejec t App rove/Reject
Responsible
Decision Type
Expression Expression
Expression Expression
Adjust (w. po t.
Restart)
Accept/Recall
S h o u l d n
o t c h a n g e
M a i n C o n f i g u r a t i o n
Create SC
Process
Scheme
Event /SAPSRM/CL_WF_PDO.
READY_FOR_WORKFLOW
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 6/103
© SAP 2008 / Page 6
Customize SAP Business Workf low Automatically (Required)
Check Event Trigger Configuration (Option)
Check Event Type Linkage (Required)
Generalize Task (Required)
Check Task Generalization (Option)
Check Task Consistency (Option)
Copy BRF Objects (Required)
Customizing – Technical Configuration
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 7/103
© SAP 2008 / Page 7
Solution Manager IMG Configuration
BWF
BRF
PC
Solution Manager (SOLAR02)
IMG
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 8/103
© SAP 2008 / Page 8
Customize SAP Business Workflow
Automatically (Required)
Execute the Automatic Workflow Customizing
Automatic Customizing for Runtime Environment are performed automatically
Make sure “Maintain Runtime Environment” is green
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 9/103
© SAP 2008 / Page 9
Start Verification Workflow (Option)
Select 3rd button. Start Verification Workflow
Go to inbox and execute the test workitem
Select “Execute background step immediately”. You will get 2 emails.
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 10/103
© SAP 2008 / Page 10
Check Event Trigger Configuration (Option)
Workflow = WS40000014
Menu: Goto -> Basic Data, Strart Events Tab.
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 11/103
© SAP 2008 / Page 11
Check Event Type Linkage (Required)
Transaction: SWETYPV
Object: /SAPSRM/CL_WF_PDO
Event: READY_FOR_WORKFLOW
Type Linkage = X
Check whether an entry has been added for the main
workflow and whether the linkage is active. This entry
should contain the following
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 12/103
© SAP 2008 / Page 12
Generalize Task (Required)
Task Group for 40000003 and 40000007
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 13/103
© SAP 2008 / Page 13
Check Task Generalization (Option)
Task Group for 40000003 and 40000007
Additonal Data -> Classification -> Detail
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 14/103
© SAP 2008 / Page 14
Check Task Consistency (Option)
Package: /SAPSRM/WF_CFG
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 15/103
© SAP 2008 / Page 15
Copy BRF Objects (Required)
Application Class: SRM_WF
Import Status: A
All Objects
Copy from client 000
Deselect Simulation flag
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 16/103
© SAP 2008 / Page 16
Copy BRF Objects – Check result (Option)
Transaction: BRF You will see some object in SRM_WF BRF Object
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 17/103
© SAP 2008 / Page 17
Configuration Guide for Process-Controlled
Workflow generated by Solution Manager
For your handy reference, Configuration Guide is generated from Solution Manager.
Jump
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 18/103
© SAP 2008 / Page 18
SRM 7.0 Workflow Advanced - Agenda
Customizing:
Technical Configuration
BRF Configuration
Business Process Configuration
Offline Approval
Extensions:
BRF Examples
BADI
Agent BADI Examples
Migration
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 19/103
© SAP 2008 / Page 19
Copy BRF objects (Required)
Check Pre-Defined Objects (Option)
Define Groups (Option)
Define Events (Option) Define Expressions (Option)
Customizing – BRF Configuration
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 20/103
© SAP 2008 / Page 20
Process-Controlled Workflow
Configuration Blocks
Appl ication
SAP
Business
Workflow
SRM
Process
Level
Definition
BRF
Process
Level
Process Control
WS40000014
Process Level
WS40000015
Approval
WS40000016
Event Event
APL
BWF
PC
BRF
Completion
WS40000017
Approve/Rejec t App rove/Reject
Responsible
Decision Type
Expression ExpressionExpression Expression
Adjust (w. po t.
Restart)
Accept/Recall
S h o u l d
n o t c h a n g e
M a i n C o n f i g u r a t i o n
Create SC
Process
Scheme
Event /SAPSRM/CL_WF_PDO.
READY_FOR_WORKFLOW
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 21/103
© SAP 2008 / Page 21
Copy BRF Objects (Required)
Application Class: SRM_WF
Import Status: A
All Objects
Copy from client 000
Deselect Simulation flag
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 22/103
© SAP 2008 / Page 22
Check Pre-Defined Objects (Option)
Transaction: BRF
BRF Objects: SRM_WF
Expression:0B_CT_ISCHANGEVERS
SAP SRM delivers a number of expressions that you can use. These are listed andexplained in a document on SAP Service Marketplace athttp://service.sap.com/srm-inst
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 23/103
© SAP 2008 / Page 23
Define Groups (Option)
Groups are used to cluster BRF-Objects depending on their area and purpose
However, Groups are not required for an approval workflow
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 24/103
© SAP 2008 / Page 24
Define Expression (Option)
Expressions are used to determine whether or not a certain approval level is required. The
result of an expression can be compared with a concrete value. Generally, expressionsevaluate document fields
There are many Expression Types
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 25/103
© SAP 2008 / Page 25
Expression detail (Option)
Example for FM Type
Specify Result Type
Specify Length
FM name
and Parameters
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 26/103
© SAP 2008 / Page 26
Define Events (Option)
Create a new event, assign an Impl. Class, Appl.Class, Group (optional)
Events should have link to Expressions
Always select the One Instance Mode and Multiple Instance Modes fields
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 27/103
© SAP 2008 / Page 27
SRM 7.0 Workflow Advanced - Agenda
Customizing:
Technical Configuration
BRF Configuration
Business Process Configuration
Offline Approval
Extensions:
BRF Examples
BADI
Agent BADI Examples
Migration
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 28/103
© SAP 2008 / Page 28
Activate BC Sets (Recommend)
Define Process Level (Option if BC Sets is act ivated)
Define Recipient of Notif ication (Option)
Define Deadline for Events (Option) Define Filter Values for BADI Define Agent (Option)
Define Filter Values for BADI Define Reviewer (Option)
Customizing
– Business Process Configuration
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 29/103
© SAP 2008 / Page 29
Activate BC Sets (Recommend)
BC Sets are available for quick start workflow implementation
Transaction: SCPR20
BC Sets name: /SAPSRM/*
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 30/103
© SAP 2008 / Page 30
Activate BC Sets (Recommend)
Activating BC Sets creates entries BRF and Process Level Definition tables
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 31/103
© SAP 2008 / Page 31
Activate BC Sets - Sequence
1. Complex example
/SAPSRM/TH_BO_600_001_SP04 Test Workflow Settings: All Business Objects
2. WithOut Approval
/SAPSRM/C_CO_600_000_SP04 Confirmation Without Approval
/SAPSRM/C_CT_600_000_SP04 Contract Without Approval
/SAPSRM/C_IN_600_000_SP04 Invoice Without Approval
/SAPSRM/C_PO_600_000_SP04 Purchase Order Without Approval
/SAPSRM/C_QT_600_000_SP04 RFx Response Without Approval
/SAPSRM/C_RQ_600_000_SP04 RFx Without Approval
/SAPSRM/C_SC_600_000_SP04 Shopping Cart Without Approval
3. 1-Step Approval by Manager
/SAPSRM/C_CO_600_001_SP04 Confirmation with One-Level Manager
/SAPSRM/C_CT_600_001_SP04 Contract with One-Level Manager Approval
/SAPSRM/C_IN_600_001_SP04 Invoice with One-Level Manager Approval
/SAPSRM/C_PO_600_001_SP04 Purchase Order with One-Level Manager
/SAPSRM/C_QT_600_001_SP04 RFx Response with One-Level Manager
/SAPSRM/C_RQ_600_001_SP04 RFx with One-Level Manager Approval
/SAPSRM/C_SC_600_001_SP04 SHopping Cart with One-Level Manager
The last activated BC Sets is active. This means all documents go 1-step approval by Manager.
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 32/103
© SAP 2008 / Page 32
Define Process Levels – Business Object
(Option if BC Sets is activated)
A Process Level is level within a completion or approval process.
Process Levels belong to a process schema which refers to a specific Business
Object, for example BUS2121 Shopping Cart
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 33/103
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 34/103
© SAP 2008 / Page 34
Define Process Levels – Schema
(Option if BC Sets is activated)
Third Step – Schema Definition
You can create many Process Schema Definition. One of Schema name is
returned in the Process Schema Evaluation step.
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 35/103
© SAP 2008 / Page 35
Process Level Configuration Level Type (Completion, Approval, Automatic)
Evaluation ID (BRF Event)
Responsibility Resolver name (User, Role, Manager, …)
Task ID (predefined OR customer own)
Decision Type
Example:
Secretary approves shopping cart
Purchasing group member approves shopping cart, because event
(SC Value > 1,000.00 EUR) was exceeded
Manager approves shopping cart, because event (SC Value > 5,000.00 EUR) exceeded
Define Process Levels - Level
(Option if BC Sets is activated)
Microsoft ExcelWorksheet
Jump
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 36/103
© SAP 2008 / Page 36
Define Process Levels - Level
(Option if BC Sets is activated)
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 37/103
© SAP 2008 / Page 37
Other Options
You can set same way for
Defaults for Ad Hoc Process Level
Here you can define defaults for adhoc levels (manually inserted approvers).
Acceptance by Contact Person
You can determine whether the contact person (in most cases document creator)receivesa work item when the approval process is finished.
Reviewer
You can define rules based on which reviewers are added to the approval process.
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 38/103
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 39/103
© SAP 2008 / Page 39
Define Deadline for Events (Option)
Deadline monitoring is a workflow runtime system function that monitors the start and
end deadlines for the processing of selected work items in an approval process.
The following deadlines are already considered in the workflow templates
WS40000016 (Approval Workflow) and WS40000017 (Completion Workflow):
Latest Start Date/Time
Requested End Date/Time
Latest End Date/Time
BADI is also available
/SAPSRM/BD_WF_DEADLINES
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 40/103
© SAP 2008 / Page 40
Define Filter Values for BADI Define Agent
(Option)
In this step, you specify the BAdI filter that enables you to determine the user to
be assigned to a workflow task in Define Process Levels.
There are 12 predefined samples.
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 41/103
© SAP 2008 / Page 41
Determine Processor
This Business Add-In (BAdI) is used in the SRM Workflow component
(SRM_EBP_WFL).
You can use this BAdI to assign SRM purchasing documents (or separate parts of
these documents) to agent groups for (parallel) approval. You can either display
existing Agents or perform an implementation enhancement by creating new Agents.
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 42/103
© SAP 2008 / Page 42
Define Filter Values for BADI Define Reviewer
(Option)
In this step, you specify the BAdI filter that enables you to determine the user to
be assigned to a workflow task in Define Process Levels.
There are 4 predefined samples.
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 43/103
© SAP 2008 / Page 43
SRM 7.0 Workflow Advanced - Agenda
Customizing:
Technical Configuration
BRF Configuration
Business Process Configuration
Extensions:
BRF Examples
BADI
Agent BADI Examples
Migration
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 44/103
© SAP 2008 / Page 44
1. Budget Workflow
2. Multi-step Approval with completion
3. Expression Type
Extensions – BRF Examples
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 45/103
© SAP 2008 / Page 45
Overview
Procedure for all examples
Preconditions:
You have already configured the basic SAP Business Workflow
BRF Initialization is done in current client
Use Transaction /SAPSRM/WF_PROCESS as shortcut to configuration.
Main steps
1. Define Process Scheme.
2. Creates/adjust BRF Expression to return name of Process Schema
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 46/103
© SAP 2008 / Page 46
2. Budget Workflow – Schema Name
Sample BC Sets: /SAPSRM/T_SC_600_000_SP04
Scenario:
Approval by Requester‘s Manager: Requester‘s User Budget (3000 EUR /
Monthly) Exceeded
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 47/103
© SAP 2008 / Page 47
2.1 Budget Workflow – Process Level
9EV_SC_006
checks user
budget
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 48/103
© SAP 2008 / Page 48
2.2 Budget Workflow – BRF Expression
9EV_SC_006 -> 9B_SC_LEVEL_006 ->
(0V_SC_USRBUDGTSPNT > 0V_SC_SPNDNGLMTFRQST)
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 49/103
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 50/103
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 51/103
© SAP 2008 / Page 51
3.1 Define Process Level - Overview
Sample BC Sets: /SAPSRM/T_SC_600_000_SP04
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 52/103
© SAP 2008 / Page 52
3.2 Level 100 – If there is Free Text Entry
If there is Free Text item, Secretary canchange the SC and pass to next level
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 53/103
© SAP 2008 / Page 53
3.3 Level 200 – Completion by Res.Purchaser
Completion by Responsible Purchaser
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 54/103
© SAP 2008 / Page 54
3.4 Level 300 – Depends on Total Value
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 55/103
© SAP 2008 / Page 55
3.4 Level 300 – Depends on Total Value
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 56/103
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 57/103
© SAP 2008 / Page 57
3.6 Level 500 – Total Value > 10,000
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 58/103
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 59/103
© SAP 2008 / Page 59
5. Expression Type
help.sap.com
Expressions are BRF objects that return a definite result
Boolean Expressions form the „ IF“ part of the Rule
Expressions can be of the following types:
• Constant - (0CN001)
• Field of a Structure (Data Source)
• Field of a line of an Internal table (Data Source) - (0TB001)
• Call Function Module / Method - (0CF001)
• Boolean Three-operand Arithmetic - (03O001)
• Simple Formula Interpreter - (0FR001)
• SAP Formula (as used in BADI implementations) - (0FB001)
• Truth Table – Pattern Matching - (0PM001)
• Random Number Generator - (0RV001)
• Date Interval - (0DI001)
• Case expression - (0CE001)
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 60/103
© SAP 2008 / Page 60
5.1 General Function Module
FM /SAPSRM/WF_BRF_0EXP000 is provided to access document attributes
This expression returns TRUE
if SC has CC or AS account
assignment category
First parameter is SC object
Second Parameter is method
3rd and 4th are CC and AS
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 61/103
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 62/103
© SAP 2008 / Page 62
5.3 Case Type example
BUS2121 is linked to Eval. ID Eval. ID = Event calls Expression
Expression
ZSC_CASE_SCHEMA
determines process
schema depending on the
organizational uni t
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 63/103
© SAP 2008 / Page 63
5.4 SAP Formula example
You can build own logic in Formula Editor without programming
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 64/103
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 65/103
© SAP 2008 / Page 65
BRF Namespaces
SAP Application classes prefixes:
0 to 9 (such as 0FLIGHT) A to W
Partner/Customer Application classes prefixes: X to Z
Namespace prefix /MY_COMPANY/
SAP BRF event prefixes:
0 to 9 A to W
Partner/Customer BRF events prefixes X to Z
All other SAP BRF object prefixes 0 to 9
All other Partner/Customer BRF object prefixes A to Z
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 66/103
© SAP 2008 / Page 66
Over 230 expressions are delivered
http://service.sap.com > SAP Solutions > Solution Details > Business Solutions and
Applications > SAP Business Suite > SAP Supplier Relationsship Management >SAP SRM 2007 - for RU Customers Only
-> Links - SRM Guides: Master, Upgrade Master, Solution Operati
-> Workflow in SAP SRM 2007Jump
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 67/103
© SAP 2008 / Page 67
Business Rule Framework
help.sap.com -> SAP ERP -> SAP ERP Central Compornent -> SAP ERP
Central Compornent -> Cross-Application Services -> Business Rule Framework
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 68/103
BADI P C t ll d W kfl
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 69/103
© SAP 2008 / Page 69© SAP 2007 / Page 69
BADI – Process-Controlled Workflow
Define Agennts - /SAPSRM/BD_WF_RESP_RESOLVERYou can use this Business Add-In to assign SAP SRM purchasing documents (or separate parts of these documents) to agent
groups for (parallel) approval
Define Deadlines for Events - /SAPSRM/BD_WF_DEADLINEYou can use this Business Add-In (BAdI) to calculate the different deadlines that are used in a completion or approval
process
Configure Process Levels - /SAPSRM/BD_WF_PROCESS_CONFIGYou can use the BAdI to build your own runtime version of the process schema on the basis of the design time processschema as defined in Customizing
Manage Process Restarts- /SAPSRM/BD_WF_PROCESS_RESTARYou can use this BAdI to avoid a complete process restart after a document change
Determine Shopping Cart Value for Purchasing Budget Workfl ow - BBP_SC_VALUE_GETThis BAdI allows you to implement your own method for determination of the value of a shopping cart
Adjust Search Help for Ad Hoc Agent - /SAPSRM/BD_WF_ADHOC_AGENT_F4Enables you to filter the available users to be inserted
Adjust Search Help for Reviewers - /SAPSRM/BD_WF_REVIEWER_F4Enables you to filter the available users to be inserted
Define Reviewers - /SAPSRM/BD_WF_REVIEWER_RULE Assign SRM purchasing documents to agent groups for review
Customer enhancement of Offline Approval - BBP_OFFLINE_APP_BADI
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 70/103
SRM 7 0 W kfl Ad d A d
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 71/103
© SAP 2008 / Page 71
SRM 7.0 Workflow Advanced - Agenda
Customizing:
Technical Configuration
BRF Configuration
Business Process Configuration
Offline Approval
Extensions:
BRF Examples
BADI list
Agent BADI Examples
Migration
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 72/103
Define Filter values for business Add In
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 73/103
© SAP 2008 / Page 73
Define Filter values for business Add-In
There are 12 predefined samples.
BADI Definition /SAPSRM/BD_WF_RESP_RESOLVER
Enhancement Implementation
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 74/103
© SAP 2008 / Page 74
Enhancement Implementation
Shopping cart: /SAPSRM/BD_WF_AGENTS_SC
Purchase order: /SAPSRM/BD_WF_AGENTS_PO
Purchase contract: /SAPSRM/BD_WF_AGENTS_CTR
Confirmation: /SAPSRM/BD_WF_AGENTS_CONF
Invoice: /SAPSRM/BD_WF_AGENTS_INV
Request for quotation /RFQ: /SAPSRM/BD_WF_AGENTS_RFQ
Supplier quotation: /SAPSRM/BD_WF_AGENTS_QTE
In addition, there is an internal enhancement implementation:
/SAPSRM/BD_WF_AGENTS
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 75/103
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 76/103
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 77/103
Method
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 78/103
© SAP 2008 / Page 78
Method
/SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_AREA_TO_ITEM_MAP:
This method assigns areas of responsibility to the items in a document. This method is called inthe approval workflow when the document is split into decision sets (Task TS40007938 inworkflow template WS40000015).
/SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_APPROVERS_BY_AREA_GUID:This method determines the agents for a given area of responsibility for each decision set in thedocument. This method is called in task TS40007943.
/SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_FALLBACK_AGENTS:
This method is optional and can be used to define default agents if no others were determinedin method GET_APPROVERS_BY_AREA_GUID. The default agents can approve or reject theitems in a document. In addition, the work item can be forwarded to another processor.
/SAPSRM/IF_EX_WF_RESP_RESOLVER~GET_RESP_RESOLVER_PARAMETER_F4:This method is optional, and can be used to provide an F4 help for the field RESP. RESOLVER
PARAMETER in the customizing view “Process level configuration” in the IMG step “Defineprocess levels” of the new workflow.
/SAPSRM/IF_EX_WF_RESP_RESOLVER~CHECK_RESP_RESOLVER_PARAMETER:This method is also optional, and can be used to check the user input for the field as described
in the previous method. If a value is required for the field “Responsibility Resolver Parameter”,implement the check here.
Ex8 Implement Custom Agent BADI (30 min)
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 79/103
© SAP 2008 / Page 79
Ex8. Implement Custom Agent BADI (30 min)
Descr ibe your custom scenario.
A customer wants to implement a commodi ty( Product category ) based approval.
The company assigns purchasers as category managers. When a shopping cart is
created , an item level approval should be implemented where a shopping cart item is
send to the category manager for approval
Procedure
A Z table will be maintained with the details of the category and the corresponding
category manager.
A implementation of Custom agent BADI will be created which will read the
approver based on the category of the item.
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 80/103
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 81/103
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 82/103
Ex8. Implement Custom Agent BADI
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 83/103
© SAP 2008 / Page 83
Ex8. Implement Custom Agent BADI
Solution Part 3
Step 4 – Sample code – Part1
method /SAPSRM/IF_WF_AREA~GET_RESPONSIBLE_APPROVERS
This part of the code is the data declarations and the checks
*----------------------------------------------------------------------*
* Area of responsibility corresponds to a category;
* managers of that category are returned as agents
*----------------------------------------------------------------------*
DATA lv_category_id TYPE COMT_CATEGORY_ID.
DATA lt_manager_id TYPE hrbcitb_user.DATA lr_manager_id TYPE REF TO hrbciuser.
DATA ls_approver TYPE /sapsrm/s_wf_approver.
Data : begin of catman,
CATEGORY type COMT_CATEGORY_ID,
MANAGER(12),
end of catman.
data : tcatman like standard table of catman.*----------------------------------------------------------------------*
* (1) Get identifier of area's leading object
*----------------------------------------------------------------------*
lv_category_id = me->/sapsrm/if_wf_area~get_leading_object_id( ).
ASSERT ID /sapsrm/wf_core CONDITION ( NOT lv_category_id IS INITIAL ).
Ex8. Implement Custom Agent BADI
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 84/103
© SAP 2008 / Page 84
Ex8. Implement Custom Agent BADI
Solution Part 3
Step 4 – Sample code – Part2
This part of the code is for the finding the approvers for each area
*----------------------------------------------------------------------*
* (2) Return all dependent users assigned to that category
*----------------------------------------------------------------------*refresh tcatman[].
clear catman.
refresh rt_approver[].
select category manager from Z##_CATMAN appending table
tcatman where category = lv_category_id.
LOOP AT tcatman INTO catman.
ls_approver-approver_ot = /sapsrm/if_wf_process_c=>gc_otype_user.
ls_approver-approver_id = catman-manager.
APPEND ls_approver TO rt_approver.
ENDLOOP.
if rt_approver[] is initial.ls_approver-approver_ot = /sapsrm/if_wf_process_c=>gc_otype_user.
ls_approver-approver_id = 'de_manager'. APPEND ls_approver TO rt_approver.
endif.
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 85/103
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 86/103
Ex8. Implement Custom Agent BADI
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 87/103
© SAP 2008 / Page 87
Ex8. Implement Custom Agent BADI
Solution Part 4
Step 5 – Sample code – Method GET_APPROVERS_BY_AREA_GUID
DATA lo_area TYPE REF TO /sapsrm/if_wf_area.
Constants : LC_AREA_TYPE_CATMAN type SWF_CLSNAM value 'Z##_CL_WF_AREA_CATMAN'.
* Input checks
ASSERT ID /sapsrm/wf_cfg CONDITION ( NOT is_area IS INITIAL ).
IF is_area IS INITIAL.
RETURN.
ENDIF.
* Activate fallback agents
IF is_area-area_guid = /sapsrm/if_wf_process_c=>gc_nil_guid.
RETURN.
ENDIF.
* Get responsibility area reference for given area GUID
lo_area = /sapsrm/cl_wf_area=>/sapsrm/if_wf_area~get_instance_by_guid(
iv_area_type = LC_AREA_TYPE_CATMAN
iv_area_guid = is_area-area_guid ).
* Return all responsible users assigned to that area
rt_approver = lo_area->get_responsible_approvers( ).
Ex8. Implement Custom Agent BADI
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 88/103
© SAP 2008 / Page 88
Ex8. Implement Custom Agent BADI
Solution Part 4
Step 5 – Sample code – Method GET_AREA_TO_ITEM_MAP
Package
LOOP AT lt_item_to_cat_map REFERENCE INTO lr_item_to_cat_map.
AT NEW category_id.
* Create responsibility area (corresponding to the category)
lo_area = /sapsrm/cl_wf_area=>/sapsrm/if_wf_area~create_instance(* iv_area_type = /sapsrm/if_wf_process_c=>GC_AREA_TYPE_CATMAN
iv_area_type = 'Z##_CL_WF_AREA_CATMAN'
iv_leading_object_id = lr_item_to_cat_map->category_id
).
ls_area_to_item_map-area_guid = lo_area->get_guid( ).
ENDAT.
ls_area_to_item_map-item_guid = lr_item_to_cat_map->item_guid.
APPEND ls_area_to_item_map TO rt_item_to_area_map.
ENDLOOP.
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 89/103
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 90/103
Ex8. Implement Custom Agent BADI
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 91/103
© SAP 2008 / Page 91
p g
Solution Part 5
Activate the Enhancement Implementat ion.
Ex8. Implement Custom Agent BADI
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 92/103
© SAP 2008 / Page 92
p g
Solution Part 6
Step 7 – Create Process Step
Create a process schema Z00_SCHEMA_SC2
Add a process step and specify your Z00_CATMAN Responsible Resolver
SRM 7.0 Workflow Advanced - Agenda
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 93/103
© SAP 2008 / Page 93
g
Customizing:
Technical Configuration
BRF Configuration
Business Process Configuration
Offline Approval
Extensions:
BRF Examples
BADI list
Agent BADI Examples
Migration
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 94/103
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 95/103
Select Workflow Framework (No Migration)
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 96/103
© SAP 2008 / Page 96
Customer have the option to decide whether he wants to use Process Controlled Workflow or
Application Controlled Workflow via customizing.
Default setting for workflow framework in SRM 7.0 is to use Process Controlled Workflow. The
customer can switch to Application controlled workflow via customizing.
In SRM 7.0 BC sets are delivered which on activation enables out-of-the-box simple approvalscenarios on process controlled framework like ‘One Step Manager Approval’.
Select Workflow Framework (No Migration)
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 97/103
© SAP 2008 / Page 97
Note: Upgrade customer can use current productive use workflow templates in
Application-Controlled workflow. In this case customer must set flag “AC”.
The default workflow framework setting is the Process-Controlled Workflow “PC”.
/SAPSRM/C_WF_100 – System Default
/SAPSRM/C_WF_101 – Customer Default
/SAPSRM/C_WF_102 – User Level Default
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 98/103
Restart Workitem – Step1 (for Migration)
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 99/103
© SAP 2008 / Page 99
If you decided to migrate SRM50 or earlier workflow to “Process-Controlled
Workflow, you should migrate “Iive” workitem.
All your running workflows need to be stopped and restarted using the Process-
Controlled Workflow framework.
Note:
You must have completed the process level configuration and test the workflow once.
Run the report /SAPSRM/PR_WF_MIGRATION_CFG„Set Toggle“ option
Workitem Migration – Step2 (for Migration)
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 100/103
© SAP 2008 / Page 100
Note: Before you start migrating open work items, you must execute a test to make
sure that the new workflow works properly.
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 101/103
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 102/103
© SAP 2008 / Page 102
Questions
* Workflow Basics session was on November 10.
Please join SDN SRM Forum. Community members will help solving your issues.
http://sdn.sap.com -> Forums -> SRM - Workflow & User/Vendor/Org.
Management
Copyright 2008 SAP AG
All Ri ht R d
8/12/2019 BRF Workflow
http://slidepdf.com/reader/full/brf-workflow 103/103
All Rights Reserved
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changedwithout prior notice.
Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.
SAP, R/3, xApps, xApp, SAP NetWeaver, Duet, SAP Business ByDesign, ByDesign, PartnerEdge and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world.Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius and other Business Objects products and services mentionedherein as well as their respective logos are trademarks or registered trademarks of Business Objects S.A. in the United States and in several other countries. Business Objects is an SAPCompany. All other product and service names mentioned and associated logos displayed are the trademarks of their respective companies. Data contained in this document servesinformational purposes only. National product specifications may vary.
The information in this document is proprietary to SAP. No part of this document may be reproduced, copied, or transmitted in any form or for any purpose without the express prior writtenpermission of SAP AG. This document is a preliminary version and not subject to your license agreement or any other agreement with SAP. This document contains only intended strategies,developments, and functionalities of the SAP® product and is not intended to be binding upon SAP to any particular course of business, product strategy, and/or development. Please note thatthis document is subject to change and may be changed by SAP at any time without notice. SAP assumes no responsibility for errors or omissions in this document. SAP does not warrant the
accuracy or completeness of the information, text, graphics, links, or other items contained within this material. This document is provided without a warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose, or non-infringement.
SAP shall have no liability for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of these materials. This limitationshall not apply in cases of intent or gross negligence.
The statutory liability for personal injury and defective products is not affected. SAP has no control over the information that you may access through the use of hot links contained in thesematerials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-party Web pages.
Weitergabe und Vervielfältigung dieser Publikation oder von Teilen daraus sind, zu welchem Zweck und in welcher Form auch immer, ohne die ausdrückliche schriftliche Genehmigung durchSAP AG nicht gestattet. In dieser Publikation enthaltene Informationen können ohne vorherige Ankündigung geändert werden.
Einige von der SAP AG und deren Vertriebspartnern vertriebene Softwareprodukte können Softwarekomponenten umfassen, die Eigentum anderer Softwarehersteller sind.
SAP, R/3, xApps, xApp, SAP NetWeaver, Duet, SAP Business ByDesign, ByDesign, PartnerEdge und andere in diesem Dokument erwähnte SAP-Produkte und Services sowie diedazugehörigen Logos sind Marken oder eingetragene Marken der SAP AG in Deutschland und in mehreren anderen Ländern weltweit. Business Objects und das Business-Objects-Logo,BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius und andere im Text erwähnte Business-Objects-Produkt e und -Dienstleistungen sowie die entsprechendenLogos sind Marken oder eingetragene Marken der Business Objects S. A. in den USA und anderen Ländern weltweit. Business Objects ist ein Unternehmen der SAP. Alle anderen in diesemDokument erwähnten Namen von Produkten und Services sowie die damit verbundenen Firmenlogos sind Marken der jeweiligen Unternehmen. Die Angaben im Text sind unverbindlich unddienen lediglich zu Informationszwecken. Produkte können länderspezifische Unterschiede aufweisen.
Die in dieser Publikation enthaltene Information ist Eigentum der SAP. Weitergabe und Vervielfältigung dieser Publikation oder von Teilen daraus sind, zu welchem Zweck und in welcher Formauch immer, nur mit ausdrücklicher schriftlicher Genehmigung durch SAP AG gestattet. Bei dieser Publikation handelt es sich um eine vorläufige Version, die nicht Ihrem gültigen Lizenzvertragoder anderen Vereinbarungen mit SAP unterliegt. Diese Publikation enthält nur vorgesehene Strategien, Entwicklungen und Funktionen des SAP®-Produkts. SAP entsteht aus dieser Publikation keine Verpflichtung zu einer bestimmten Geschäfts- oder Produktstrategie und/oder bestimmten Entwicklungen. Diese Publikation kann von SAP jederzeit ohne vorherige
Ankündigung geändert werden.
SAP übernimmt keine Haftung für Fehler oder Auslassungen in dieser Publikation. Des Weiteren übernimmt SAP keine Garantie für die Exaktheit oder Vollständigkeit der Informationen, Texte,Grafiken, Links und sonstigen in dieser Publikation enthaltenen Elementen. Diese Publikation wird ohne jegliche Gewähr, weder ausdrücklich noch stillschweigend, bereitgestellt. Dies gilt u. a.,aber nicht ausschließlich, hinsichtlich der Gewährleistung der Marktgängigkeit und der Eignung für einen bestimmten Zweck sowie für die Gewährleistung der Nichtverletzung geltenden Rechts.SAP haftet nicht für entstandene Schäden. Dies gilt u. a. und uneingeschränkt für konkrete, besondere und mittelbare Schäden oder Folgeschäden, die aus der Nutzung dieser Materialienentstehen können. Diese Einschränkung gilt nicht bei Vorsatz oder grober Fahrlässigkeit.