Enterprise Resource Planning Blog Posts by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
Gaayathri
Product and Topic Expert
Product and Topic Expert
4,171

Identifying persons using rules 

You can identify persons using responsibility rules. Rules are based on business logic and assigned to a specific business context. This responsibility context refers to a specific business process, such as sales order creation or project budget request, in a Business Workflow. The responsibility context can also refer to a situation scenario in Situation Handling. 

Rules are highly flexible and come with some implementation effort. That’s why we recommend creating responsibility rules for teams with more than 1,000 employees. For smaller units you may want to consider managing responsibilities by teams. 

Sample use case 

Let’s illustrate the identification of persons by rules with a simple use case that relates to the reseller introduced in the blog post Responsibility Management: Create Your Teams. We’ll create a rule that identifies the creator of a purchase contract.

Create your own rules 

To create your own responsibility rules, follow the steps in this sequence: 

  • Create the business logic 
  • Create a custom rule 
  • Assign the rule to a responsibility context 

Create the business logic 

A custom rule is based on a BAdI implementation. Log in as an extensibility specialist and open the Custom Logic app. Select Create and filter for RSM_BADI_RESPONSIBILITY_RULE. Then choose Responsibility Rule and go to step 2. 

Responsibility Rule in Custom Logic appResponsibility Rule in Custom Logic app

Responsibility Rule in Custom Logic app

Add a new filter and select STATIC_RULE_FILTER. Enter a name in the Value field that identifies your BAdI. The name needs to

  • be identical with the responsibility rule ID because it’s the link between the business logic and the responsibility rule.
  • start with an ATO prefix such as YY1 or YY2.
  • be in UPPERCASE letters.

Save the filter and go to step 3.

Static rule filter for the responsibility filter.png

Static rule filter for the responsibility filter

When you enter the implementation description the implementation ID is created automatically. Select Review and make sure that everything is okay.

Implementation ID of your custom logic.png

Implementation ID of your custom logic

Then create and publish your custom logic. After the status has changed to published, open the code editor.

Published custom logic.png

Published custom logic

Enter your business logic in the code editor and publish it. You will need to refer to all parameters used in the BAdI later on when you create the responsibility rule.

In our example the BAdI identifies the creator of a purchase contract. We need to use the purchase contract YY1_PURCHASECONTRACT as a parameter.

Code editor of custom logic.png

Code editor of custom logic

Since the BAdI isn’t context-dependent you can use it in multiple rules.

Create a custom responsibility rule

You’re logged in as an extensibility specialist and open the Manage Responsibility Rules app. Select the Custom tab and create a new responsibility rule. The rule’s ID needs to be the same as the BAdI’s ID. In our example it’s YY1_PC_CREATOR. The BAdI’s value filter is set automatically.

In the Parameters section you need to add all the parameters that you use in your BAdI. In our example we need YY1_PURCHASECONTRACT and are adding the corresponding CDS view I_PURCHASEORDERAPI01 and CDS view field CREATEDBYUSER from the purchase order.

Creating a responsibility rule.png

Creating a responsibility rule

Assign your rule to a business context

You’re logged in as an extensibility specialist and open the Manage Responsibility Contexts app. Depending on your use case you have two options:

  • Extending a standard context delivered by SAP
  • Creating a custom context

Extending a standard context

Select the standard context and select the Extend button in the header. Then create an agent rule. Go to the subpage by selecting the chevron so you can see all the required fields.

Enter an ID and a description.

Select the responsibility rule, in our example YY1_PC_CREATOR.

Select the CDS view as the data source, in our example I_PURCHASECONTRACTAPI01.

The parameters are added automatically. You need to add either a fixed value or a data source. In our example we’ve add the CDS view field CREATEDBYUSER.

Assign a rule to a standard responsibility context.png

Assign a rule to a standard responsibility context

Creating your own context

Custom team contexts can be used only for Situation Handling. If you want to create your own rules for Business Workflow you can extend a standard responsibility context.

The responsibility context and the situation scenario are dependent on each other, so you need to follow this sequence.

1.     Create a context without a rule

Create a custom context by selecting the Custom tab in the list view and choosing Create. Enter the responsibility context ID, add a description, and save the context.

Create a responsibility context without a rule.png

Create a responsibility context without a rule

2.     Create a situation scenario

Create your situation scenario and assign your custom context to it.

Assign the responsibility context to your situation scenario.png

Assign the responsibility context to your situation scenario

3.     Add your rule to your context

Open your custom context and create a rule. The procedure is the same as described above for extending a standard responsibility context.

Add a rule to the custom context.png

Add a rule to the custom context

Now you’re all set.

This was the last blog post in this series. I hope the sample configurations provided helpful insight about how you can use Responsibility Management.

For more information, see SAP Help Portal for Responsibility Management in SAP S/4HANA Cloud, SAP S/4HANA, and SAP Business Technology Platform.

 

9 Comments