Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
168 views

Enable Dynamic Parallel Approval For Company Code Data in Rule-Based Workflow

55
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
168 views

Enable Dynamic Parallel Approval For Company Code Data in Rule-Based Workflow

55
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

PUBLIC

How-To: Enable Dynamic Parallel Approval for


Company Code Data in Rule-based Workflow

Applicable Releases:
All

Version 2.0
April 2022
Document History

Document Version Description

1.0 First official release of this guide


1.1 Updated broken links and search help information
1.2 Updated new SAP Community links (October 2016)
2.0 Complete Update (April 2022)
1. BUSINESS SCENARIO ............................................................................................................................................................. 4
1.1. SPECIAL SCENARIO .............................................................................................................................................................. 4
2. BACKGROUND INFORMATION .............................................................................................................................................. 5
3. STEP BY STEP EXPLANATION ................................................................................................................................................. 6
3.1. CUSTOMIZING ................................................................................................................................................................... 6
3.1.1. Create new Change Request Type........................................................................................................................... 6
3.1.2. Define Workflow Step............................................................................................................................................. 7
3.1.3. Activate Highlighting.............................................................................................................................................. 8
3.1.4. Define Service (Cross Client) ................................................................................................................................... 8
3.1.5. BRF+ Tables ........................................................................................................................................................... 9
Single Value Decision Table .................................................................................................................................................................. 9
Non User Agent Decision Table ............................................................................................................................................................. 9
3.2. ENHANCEMENT SPOT: USMD_SSW_SERVICE_PROCESSOR ................................................................................................... 9
3.2.1. Create Enhancement Implementation for USMD_SSW_SYSTEM_METHOD_CALLER................................................. 9
3.2.2. Create Enhancement Implementation for USMD_SSW_PARA_RESULT_HANDLER.................................................. 11
3.2.3. Create Enhancement Implementation for USMD_SSW_DYNAMIC_AGENT_SELECT ................................................ 14
4. PROCESS ............................................................................................................................................................................. 17
5. ADDITIONAL INFORMATION ............................................................................................................................................... 20
5.1. FURTHER READING ........................................................................................................................................................... 20

3
1. BUSINESS SCENARIO
SAP Master Data Governance provides business processes to find, create, change, and mark master data for deletion.
It supports the governance of master data in a central hub and the distribution to connected operational and business
intelligence systems.

The processes are workflow-driven and can include several approval and revision phases, and the collaboration of all
users participating in the master data maintenance.

MDG-F uses the standard workflow templates WS75700027 and WS75700040 as default templates. However, the
rule-based workflow template WS60800086 can also be used. This How To Guide describes an example of the
account approval process using the decision tables of the rule-based workflow and create parallel approval workflow
steps when the parallel number is determined dynamically. The guide shows all relevant customizing and
implementation details.

1.1. Special Scenario


Generally, when the end user requests a new account, company code data is required, and you can apply several
company codes, depending on business requirements. For this, a workflow step is needed to approve all company
codes. The workflow continues only when all the company code owners have given their approval.
This How To Guide also addresses the parallel approval requirements for G/L account company codes with the
dynamic determination of parallel branches.

4
2. BACKGROUND INFORMATION
The Business Add-In (BAdI) USMD_SSW_PARA_RESULT_HANDLER is used to merge the result of the parallel
workflow items. You can use this BAdI to implement the result of a parallel workflow merge in the rule-based workflow.
The BAdI uses the method HANDLE_PARALLEL_RESULT to handle and merge the results of the parallel workflows
into one result. The input for this BAdI is the change request number, current step number, parallel step action table,
and the service name. By using the change request number, it is possible to access all data within this change request.

The input parameter Service Name enables you to use the same BAdI implementation for multiple service names. For
example, when two service names are used in the configuration of the same change request workflow, and the user
wants to create only one BAdI implementation, having the service name as the input parameter enables you to
separate the processing logic based on the service name input. With this BAdI you can change the workflow generic-
context table in the workflow. This BAdI also returns the next workflow step, the action taking place in the workflow
step, and the message table.

Requirements
You have defined the filter value Service Name in view V_USMD201C_SSW. You need to create a separate
implementation for the handling of a specific parallel result.

Standard settings

For more information about the standard settings (filters, single or multiple uses), see the Enhancement Spot Element
Definitions tab in the BAdI Builder (transaction SE18). No default BAdI implementation is preactivated in the standard
system. The BAdI is filter-dependent. The BAdI is not designed for multiple uses.

Activities
For information about implementing BAdIs in the context of the Enhancement Concept, see the SAP Library for SAP
NetWeaver under BAdIs - Embedding in the Enhancement Framework.

5
3. STEP BY STEP EXPLANATION
3.1. Customizing

3.1.1. Create new Change Request Type

Step Explanation Screenshot


1 Start transaction
MDGIMG. Navigate to
General Settings >
Process Modeling >
Change Requests
>Change Requests

2 Mark a similar CR type


and press
Copy. Change the
name and description
and press copy all.

6
3.1.2. Define Workflow Step

Step Explanation Screenshot


1 Start transaction
MDGIMG. Navigate to
General Settings >
Process Modeling >
Workflow > Rule-Based
Workflow > Configure
Rule-Based Workflow >
Define Change
Request Steps for
Rule-Based Workflow.

2 Maintain the relevant


CR steps.

7
3.1.3. Activate Highlighting

Step Explanation Screenshot


1 Log on to Cross Client
Customizing Client.

Start transaction MDGIMG.


Navigate to General Settings
> Process Modeling >
Change Requests >
Configure Properties of
Change Request Step

2 Select the new CR type New


Entries and choose User
Interface per Change
Request Step. Select the
Highlighting Indicator for all
dialog steps.

3.1.4. Define Service (Cross Client)

Step Explanation Screenshot


1 Log on to Cross Client
Customizing Client.

Start transaction MDGIMG.


Navigate to General Settings
> Process Modeling >
Workflow > Rule-Based
Workflow > Configure Rule-
Based Workflow > Define
Service Names for Rule-
Based Workflow.

2 Press New Entries and create


3 new entries with the
following data: Service Name
and Description.
Press Save. And ZACCOUNT1_DYNAGENT

8
3.1.5. BRF+ Tables
Start transaction MDGIMG. Navigate to General Settings > Process Modeling > Workflow > Rule-Based Workflow >
Configure Rule-Based Workflow. Enter the newly created change request type and press Continue. Set up the BRF+
tables.

Single Value Decision Table

Non User Agent Decision Table

3.2. Enhancement Spot: USMD_SSW_SERVICE_PROCESSOR

3.2.1. Create Enhancement Implementation for USMD_SSW_SYSTEM_METHOD_CALLER


In this chapter a Business Add-In (BAdI) implementation for BAdI USMD_SSW_SYSTEM_METHOD_CALLER is
created. You might refer to the BAdI documentation for further details. The service name defined in a previous chapter
serves as BAdI filter.

9
Ste
Explanation Screenshot
p
Follow the customizing path.

1 Or start transaction SE18. Select


option Enhancement Spot Name
and enter
USMD_SSW_SERVICE_PROCESSOR.

2 Open the context menu on the


Implementations for BAdI
USMD_SSW_SYSTEM_METHOD
_CALLER with right click on and
chose Create BAdI Implementation.

In pop-up Select or Create


Enhancement Implementation
chose Create Enhancement
Implementation.

3 Create Enhancement
Implementation, BAdI
Implementation (do not copy any
sample class, create empty
implementation and empty class),
BAdI Implementation and
Implementing Class. Leave the
implementation of the interface
method
IF_USMD_SSW_SYST_METHOD_CA
LLER ~CALL_SYSTEM_METHOD
empty.

10
4 Navigate to the Filter Values for the
BAdI implementation and go to edit
mode. Create a filter. Double-click
the combination or press Value.
In pop-up Change Filter Value
enter/ select the relevant data.
Press Continue.
Press Save and Activate.

3.2.2. Create Enhancement Implementation for USMD_SSW_PARA_RESULT_HANDLER


In this chapter a Business Add-In (BAdI) implementation for BAdI USMD_SSW_PARA_RESULT_HANDLER is created. The
BAdI uses the method HANDLE_PARALLEL_RESULT to handle and merge the results of the parallel workflows into
one result. You might refer to the BAdI documentation for further details. The service name defined in a previous
chapter serves as BAdI filter. The actual implementation of the BAdI method depends on the use case that should be
accomplished.

Ste
Explanation Screenshot
p
1 Start transaction SE18. Select option Enhancement
Spot Name and enter
USMD_SSW_SERVICE_PROCESSOR Press Display.

2 Open the context menu on the Implementations for


BAdI USMD_SSW_PARA_RESULT_HANDLER with
Right click on and chose Create BAdI
Implementation.

In pop-up Select or Create Enhancement


Implementation chose Create Enhancement
Implementation.

3 In pop-up Create Enhancement Implementation


enter the necessary data. Press Creation of
Enhancement.

Chose a suitable development package or store the


enhancement implementation as local object
depending on your needs.

11
4 In pop-up Select or Create Enhancement
Implementation amongst others the new
enhancement implementation is listed. Select it and
press Select Specified Enhancement
Implementation.
In pop-up Create BAdI Implementation enter the
necessary data:
Press Continue.

5 In the next pop-up chose enhancement


implementation MDG_BS_MAT_PARALLEL_WF and
press Copy Sample Class. Press Save.

6 Navigate to the Filter Values for the BAdI


implementation and go to edit mode. Create a filter,
matching the service defined in IMG activity Define
Service Names for Rule-Based Workflow.

7 Double-click the combination or press Value. In ZACCOUNT1_PARRSLT


pop-up Change Filter Value enter/ select the
relevant data.
Press Continue. Press Save.
8 Navigate to Implementing Class and double-click
BAdI method
IF_USMD_SSW_PARA_RSLT_HANDLER~HANDLE_PARAL
LEL_RESULT

12
9 Go to edit mode. Change the example
implementation according to your needs. Activate
the method. In case other objects are still to be
adjusted, select them too for activation.

10 Navigate back to Enhancement Implementation


ZMDG_BS_MAT_PARALLEL_WF and check the status
and the runtime behavior.

11 Check the activation status (column Active) for your


enhancement implementation. It should be Active or
Implementation is called.
You might need press Refresh to get the current
status.

13
3.2.3. Create Enhancement Implementation for USMD_SSW_DYNAMIC_AGENT_SELECT
In this chapter a Business Add-In (BAdI) implementation for BAdI USMD_SSW_DYNAMIC_AGENT_SELECT is
created. This BAdI uses the method GET_DYNAMIC_AGENTS to implement dynamic agent selection in the rule-
based workflow. You might refer to the BAdI documentation for further details. The service name defined in a previous
chapter serves as BAdI filter. The actual implementation of the BAdI method depends on the use case that should be
accomplished.

Step Explanation Screenshot


1 Start transaction SE18. Select option
Enhancement Spot Name and enter
USMD_SSW_SERVICE_PROCESSOR Press
Display.

2 Or use the MDGIMG. Open the context menu


on the Implementations for BAdI
USMD_SSW_DYNAMIC_AGENT_SELECT
with Right click on and chose Create BAdI
Implementation.

In pop-up Select or Create Enhancement


Implementation chose Create Enhancement
Implementation.

3
Navigate to the Filter Values for the BAdI
implementation and go to edit mode. Create
a filter, matching the service defined in IMG
activity Define Service Names for Rule-Based
Workflow.

8 Navigate to Implementing Class and double-


click BAdI method
IF_USMD_SSW_DYNAMIC_AGT_SELECT
~GET_DYNAMIC_AGENTS.

14
Implementation proposal:

The method reads all company codes of the account that are requested by the current change request, and then reads
the relevant approver and sets it to the exporting parameter CT_USER_AGENT_GROUP of method
IF_USMD_SSW_DYNAMIC_AGT_SELECT~GET_DYNAMIC_AGENTS.
To implement this method, perform the following steps:
1. Retrieve the object list of change request IV_CR_NUMBER by calling the data model method or reading the
USMD1213 table.
2. Normally a customer table stores the approvers for company codes. You can find all relevant approvers (by
user or organizational unit) using the object list of company codes. Or you have other logic to find the relevant
approvers which is not scope of this document.
3. Each entry in CT_USER_AGENT_GROUP represents one branch of parallel approval steps. Enter STEP_TYPE
as value 2. AGENT_GROUP should be unique for all entries.

In case there is only one company code or only one branch is generated, in order to make the decision
table easy, it’s recommended to use second branch using dummy system call, like this:

15
4. Set the return step as CV_NEW_STEP.

16
4. PROCESS
In this chapter the new process is tested. A G/L account is created using the newly created and configured change
request type ZACC1P1 and parallel workflow items are created.

Create a new G/L account:

17
Workflow log after submission:

Open a work item:

18
Afterwards, all parallel work items are approved:

19
5. ADDITIONAL INFORMATION
5.1. Further Reading
Product SAP Master Data Governance https://www.sap.com/products/master-data-governance.html

What’s New Viewer – SAP S/4HANA https://help.sap.com/doc/474a13c5e9964c849c3a14d6c04339b5/100/en-


US/8880de6dbfb94ea3b0de1f26b40816dc.html?lob=Cross%20Applications
with Line of Business Cross Applications and Search Term MDG
MDG Community https://community.sap.com/topics/master-data-governance

SAP Master Data Governance at a Glance With Key https://blogs.sap.com/2020/07/21/sap-master-data-governance-at-a-glance/


and What’s New Presentations

Online Help SAP MDG in S/4HANA https://help.sap.com/viewer/6d52de87aa0d4fb6a90924720a5b0549/latest/en-


US/56a57357f2b1aa6be10000000a4450e5.html
Online Help SAP MDG on ECC https://help.sap.com/viewer/product/SAP_MASTER_DATA_GOVERNANCE/latest/en-US

Road Map Explorer https://roadmaps.sap.com/board?PRODUCT=901B0ED1A0641EDA9FF75276E440C0EF&range=FI


RST-LAST#Q3%202020

Business Function Online Help https://help.sap.com/viewer/7113856e409647838af7891e1429b807/latest/en-


US/18a64e59f0744143a0c2ff9bc1b6aabc.html
How-to Information for SAP Master Data Governance https://community.sap.com/topics/master-data-governance/how-to

Video S/4HANA 2021 Media Share: https://video.sap.com/playlist/details/1_0n327xkg/categoryId/65627981


YouTube: https://www.youtube.com/playlist?list=PLWV533hWWvDnDSbXAtpIj4aZRVMd6aRUz

20
www.sap.com/contactsap

© 2022 SAP SE or an SAP affiliate company. 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 SE or an SAP affiliate company.

The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors. National
product specifications may vary.

These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or
omissions with respect to the materials. The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty statements accompanying such products and
services, if any. Nothing herein should be construed as constituting an additional warranty.

In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related presentation, or to develop or release any functionality mentioned therein.
This document, or any related presentation, and SAP SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platform directions and functionality are all subject to change and may
be changed by SAP SE or its affiliated companies at any time for any reason without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or
functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on
these forward-looking statements, and they should not be relied upon in making purchasing decisions.

SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All
other product and service names mentioned are the trademarks of their respective companies. See www.sap.com/trademark for additional trademark information and notices.

You might also like