Professional Documents
Culture Documents
Live Expert Session For Sap SRM 7.0 Workflow Advanced
Live Expert Session For Sap SRM 7.0 Workflow Advanced
Workflow Advanced
Overview : Customizing:
Migration decision
Further Reference
Extensions:
Architecture:
BRF Examples
Process-Controlled Workflow
BADI
Decision Type
Agent BADI Examples
Business Rule Framework
Migration
Runtime Flow
Development Strategy
• No new features and functions will be • In future releases new features and
developed functions will be developed
• Development effort will be only on bug- • Rolled-in new requirements from the
fixing customer will be developed
Positioning
B
Consists of Many
U Process Step 1
Linked to many S Schema 1
I Process Step 2
N
E Process Step 3
BO Schema 2
S
R
Process Step 4
U
L
Schema 3 H
A
E
S
Sequence No
Process Type
Agent(s)
Business rule
Decision Type
Task id
Process-Controlled Workflow
Configuration Blocks
APL
Application Create SC Adjust (w. pot. Accept/Recall
Restart)
Approve/Reject
Event /SAPSRM/CL_WF_PDO. Approve/Reject
READY_FOR_WORKFLOW
BWF
Main Configuration
Decision Type
Scheme
Definition
BRF
Expression Expression
Expression Expression
IMG
BWF
BRF
PC
© SAP 2008 / Page 7
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
Workflow = WS40000014
Menu: Goto -> Basic Data, Strart Events Tab.
Transaction: SWETYPV
Object: /SAPSRM/CL_WF_PDO
Event: READY_FOR_WORKFLOW
Type Linkage = X
Package: /SAPSRM/WF_CFG
Import Status: A
All Objects
Transaction: BRF
For your handy reference, Configuration Guide is generated from Solution Manager.
Jump
Customizing:
Technical Configuration
BRF Configuration
Business Process Configuration
Offline Approval
Extensions:
BRF Examples
BADI
APL
Application Create SC Adjust (w. pot. Accept/Recall
Restart)
Approve/Reject
Event /SAPSRM/CL_WF_PDO. Approve/Reject
READY_FOR_WORKFLOW
BWF
Main Configuration
Decision Type
Scheme
Definition
BRF
Expression Expression
Expression Expression
Import Status: A
All Objects
Transaction: BRF
BRF Objects: SRM_WF
Expression:
0B_CT_ISCHANGEVERS
SAP SRM delivers a number of expressions that you can use. These are listed and
explained in a document on SAP Service Marketplace at
http://service.sap.com/srm-inst
Groups are used to cluster BRF-Objects depending on their area and purpose
However, Groups are not required for an approval workflow
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, expressions
evaluate document fields
There are many Expression Types
Always select the One Instance Mode and Multiple Instance Modes fields
Customizing:
Technical Configuration
BRF Configuration
Extensions:
BRF Examples
BADI
Transaction: SCPR20
Activating BC Sets creates entries BRF and Process Level Definition tables
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.
The Evaluation ID specifies the ID of the event that triggers the workflow. The
specific events are defined in the Business Rule Framework (BRF).
You can create many Process Schema Definition. One of Schema name is
returned in the Process Schema Evaluation step.
Reviewer
You can define rules based on which reviewers are added to the approval process.
You define which users receive notifications in which application scenarios when a
work item is approved, rejected, changed, or deleted. You select users according to
their functions in the workflow process, for example, 'workflow initiator' or 'approver'.
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.
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.
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.
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.
Customizing:
Technical Configuration
BRF Configuration
Business Process Configuration
Extensions:
BRF Examples
BADI
Agent BADI Examples
Migration
1. Budget Workflow
2. Multi-step Approval with completion
3. Expression Type
Main steps
1. Define Process Scheme.
2. Creates/adjust BRF Expression to return name of Process Schema
Scenario:
9EV_SC_006
checks user
budget
You can create own FM but Import/Export parameter must be the same
Expression
ZSC_CASE_SCHEMA
determines process
schema depending on the
organizational unit
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
help.sap.com -> SAP ERP -> SAP ERP Central Compornent -> SAP ERP
Central Compornent -> Cross-Application Services -> Business Rule Framework
Customizing:
Technical Configuration
BRF Configuration
Business Process Configuration
Offline Approval
Extensions:
BRF Examples
BADI list
Agent BADI Examples
Migration
© SAP 2007
2008 / Page 69
BADI Guide
Jump
Customizing:
Technical Configuration
BRF Configuration
Extensions:
BRF Examples
BADI list
Filter Value
BADI
Method example – Area
Method example - Map
Confirmation: /SAPSRM/BD_WF_AGENTS_CONF
Invoice: /SAPSRM/BD_WF_AGENTS_INV
/SAPSRM/BD_WF_SC_AGENTS
1. GET_AREA_TO_ITEM_MAP
An area of responsibility is assigned to the items. All items with the same area of
responsibility form a decision set. An area of responsibility can be, for example, a
department, a product category or a cost center. For each decision set, a new
sub-workflow is started.
Area GUID is saved to the database table /SAPSRM/D_WF_012.
2. GET_APPROVERS_BY_AREA_GUID
For each area of responsibility, the agents for the approval tasks are determined.
All agents found in this step get a work item. If the area of responsibility is a
department, for example, all employees belonging to that department could be
returned as agents. If the area of responsibility is a cost center, the person
responsible for the cost center could be returned as agent.
3. GET_FALLBACK_AGENTS
If no agent was found for an area of responsibility, fallback agents can be
provided to avoid the workflow getting stuck.
/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 in
the approval workflow when the document is split into decision sets (Task TS40007938 in
workflow 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 the
document. 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 determined
in method GET_APPROVERS_BY_AREA_GUID. The default agents can approve or reject the
items 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 “Define
process 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.
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.
Step 3
Click on ‘New Entry’ and create a new filter value with name ‘Z##_CATMAN’
/SAPSRM/CL_WF_AREA Identify
uniqueness of the
Area
Step 4
You can create a new class or copy an standard class for example
/SAPSRM/CL_WF_AREA_PURCH_GRP .
*----------------------------------------------------------------------*
* 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.
*----------------------------------------------------------------------*
* (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.
endif.
© SAP 2008 / Page 84
Ex8. Implement Custom Agent BADI
Solution Part 4 - Explanation
Step 5
You can create a new class or copy an standard class for example
/SAPSRM/CL_IM_WF_RR_MANAGER .
Implement the method GET_AREA_TO_ITEM_MAP with the logic to splits item into areas and
sets a area type and leading object id for each area
* Input checks
ASSERT ID /sapsrm/wf_cfg CONDITION ( NOT is_area IS INITIAL ).
IF is_area IS INITIAL.
RETURN.
ENDIF.
Package
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.
© SAP 2008 / Page 88
Ex8. Implement Custom Agent BADI
Solution Part 5
Step 6
Define Filter.
Create a filter value for the implementation with Document Type = BUS212 and
RESP_RESOLVER_NAME = Z##_CATMAN.
Customizing:
Technical Configuration
BRF Configuration
Extensions:
BRF Examples
BADI list
Agent BADI Examples
Migration
New Customer
Process Controlled Workflow recommended
Upgrade Customer
Can choose Application-Controlled Workflow or Process-Controlled Workflow
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 approval
scenarios on process controlled framework like ‘One Step Manager Approval’.
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”.
Uses entries from the Process Level table /SAPSRM/C_WF_MAP with one
Completion Approval and two Approval steps
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.
Note: Before you start migrating open work items, you must execute a test to make
sure that the new workflow works properly.
This action will stop your open work items and start new work items.
This report searches for workitems, sets them to CANCELLED and starts the respective
new workitem (with the GUID of the old workitem document).
Please join SDN SRM Forum. Community members will help solving your issues.
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 durch
SAP 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 die
dazugehö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-Produkte und -Dienstleistungen sowie die entsprechenden
Logos 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 diesem
Dokument erwähnten Namen von Produkten und Services sowie die damit verbundenen Firmenlogos sind Marken der jeweiligen Unternehmen. Die Angaben im Text sind unverbindlich und
dienen 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 Form
auch 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 Lizenzvertrag
oder 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 Materialien
entstehen können. Diese Einschränkung gilt nicht bei Vorsatz oder grober Fahrlässigkeit.
Die gesetzliche Haftung bei Personenschäden oder Produkthaftung bleibt unberührt. Die Informationen, auf die Sie möglicherweise über die in diesem Material enthaltenen Hotlinks zugreifen,
unterliegen nicht dem Einfluss von SAP, und SAP unterstützt nicht die Nutzung von Internetseiten Dritter durch Sie und gibt keinerlei Gewährleistungen oder Zusagen über Internetseiten
Dritter ab.
Alle Rechte vorbehalten.
© SAP 2008 / Page 103