Enterprise Resource Planning Blogs 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: 
zhaoyo
Product and Topic Expert
Product and Topic Expert
3,192

Background


In S/4HANA Cloud, the SAP best practice content provided by SAP normally fulfills basic E2E business requirement. Different from S/4HANA On-Prem or S/4HANA Private Cloud where customer has full access to the backend system (e.g. SPRO) to change configuration, customer uses SSCUI apps to change some configuration settings in S/4HANA Cloud. However, most SSCUI settings are only defined in the design time and it is difficult to handle different process variants in Q2C order process.

With help of CPF tool (Configurable Parameters & Formulas), it is possible to define business rules in S/4HANA Cloud to influence different aspects of sales order process at runtime.

SAP Business Rule Framework plus (BRFplus) is widely used in different area of SAP products. There is also possibility to utilize BRF+ to allow customer define flexible business rules via BRF+ in CPF application. See more information of BRF+ with (link).

This blog shows CPF usage “S03” to determine pricing date on sales order header based on business rules defined by BRF+. Please find detail information in SAP help (link).

Business Example


Customer wants to define complex business rules to determine pricing date on sales order header. Comparing with the approach of CPF decision table, customer would like to utilize the capability offered in BRF+ to define business rules. For example, customer can not only define decision tree to influence pricing date, but also write logical expression to determine pricing date.

In this example, I'd like to show detail steps of generating BRF+ application for CPF usage and define business rules via BRF+ to determine pricing date.

Configuration Details


As of now, the BRF+ approach is not ye supported in S/4HANA Cloud. For some CPF usages, the BRF+ option is offered in S/4HANA OP2021. Therefore, I am testing BRF+ features in S/4HANA OP2021 version.

By the way, there is plan to enable BRF+ approach on S/4HANA Cloud. Please stay tuned for new features on S/4HANA Cloud for CPF improvement.

Since customer is able to access IMG on S/4HANA On-Prem, it is possible to access to CPF configuration from IMG.

Create BRF+ Application


Go to following IMG path to create BRF+ application.


Create BRF+ Application


System navigates to the BRF+ workbench. Create a new BRF+ application and provide required information.


BRF+ Application


Save the BRF+ application and activate it.


Activating BRF+ Application


Keep the BRF+ application like it, do not create BRF+ function now because the BRF+ function and other objects will be generated from CPF later.

Define Factory Calendar Determination Rule


Open following IMG node to define factory calendar determination rule.


Define a factory calendar rule and specify the source priority


Factory Calendar Determination Rule



Define CPF Parameter Catalogs


Open following IMG node to define parameter catalog for pricing date.


There are some standard parameter catalogs available for CPF usage "S03". Customer can directly include these parameter catalogs to build up business rules in CPF.


CPF Parameter Catalogs


In my example, these standard parameter catalogs are sufficient. But it is still possible to add new parameter catalogs by user, e.g. adding custom fields as available parameter catalog.

Assign BRF+ Application to CPF Usage


Open following IMG node to assign existing BRF+ application to CPF usage. The BRF+ application was already created in previous steps.


It is possible to use search help to find out the BRF+ application.


Assign BRF+ Application Name


Save the entry and mark this BRF+ application as default.

Define CPF Formulas with BRF+


Open the following IMG node to define CPF formulas for pricing date determination.


Define a new formula


Define CPF Formula


Select the formula ID and click sub-folder "Assign Formula Parameter" to add parameter catalogs to CPF formula


Assign Parameter Catalogs


In this example, sales org, sales office and sales group as selected to build up business rules in CPF.

Double click the sub-folder "Assigned Usage Task" to link BRF+ application to CPF usage task.


Assign CPF Usage Task


The CPF routine "2" represent the BRF+ is used to define business rule. Click the button in left top to generate BRF+ function.


Generate BRF+ Function


In the pop-up dialog box, name the BRF+ function and click button "Generate and Save". The BRF+ objects are generated automatically.


Generated BRF+ Function



Define Business Rules in BRF+


Create the Ruleset in BRF+ function.


Create Rule Set in BRF+


Then click button "Create And Navigate To Object" to define rules in rule set.


Insert Rules in Rule Set


Create a rules in ruleset based on different sales document types.


Define Rules for Sales Document Types


In this example, I created two rules for sales order and sales quotation. Navigate to the rule of sales order to create expression.


Pricing Date Rule for Sales Order


Create a decision table for sales order and select the columns as below to build up decision table.


Decision Table Settings


Then define the business rules in decision table.


Business Rules in Decision Table


In the business rule, the offset 7 days is defined for sales org 1010/sales office 100/sales group 100 combination, which means when sales org, sales office, and sales group combination in sales order matches CPF rule, pricing date will be determined with +7 days.

Activate the decision table and simulate the business rules. For example, use following input value to simulate business rule defined in BRF+


Simulate Business Rules


Execute and display the processing steps


Simulation Result


The offset value "7 days" is determined for sales org 1010, sales office 100 and sales group 100.

Define Custom Routines for Pricing Date Determination


Open following IMG node to define custom routine for CPF formula of pricing date determination


Define Custom Routine


Create a new custom routine for pricing date determination


Custom Routine


Click the line and double click the sub-folder to assign CPF formula to custom routine.


Assign CPF Formula to Custom Routine



Assign Custom Routine to Sales Document Type


Open following IMG node to assign custom routine number to sales document type.


The custom routine "3000001" defined in previous step is assigned to sales document type "OR".


Assign Custom Routine to Sales Document Type


Save the entry.

Test BRF+ Rules in Sales Order


Go to transaction VA01 to create sales order. Provide required information to create a sales order.


Create A Sales Order


Because the business rule defined in BRF+ is not matching, the current date is determined as pricing date.

Go to sales order header to change the sales office to 100 and sales group to 100 which match to business rule defined in BRF+.


Change Sales Office and Sales Group


After the sales office and sales group are changed, the pricing date is re-determined according to business rule maintained in BRF+. The pricing date is calculated with considering public holiday.


Pricing Date in Sales Order


Save the sales order, and calculated pricing date is persistent in sales order.

Create another sales order, make sure the combination of sales office and sales group doesn't match to business rule defined in BRF+.


Business Rule is Not Applied in BRF+


The default pricing date is calculated. The business rule defined in BRF+ is not functional here.

Additional Information


BRF+ provides much more flexibility to define business rules to control sales business processes via CPF framework. Apart from the decision table I showed in this blog, there are other options to define business rules in BRF+, e.g. decision tree, formula, function call, etc.

The BRF+ approach is not yet supported in CPF usages in S/4HANA Cloud, but it is planned to enable BRF+ in S/4HANA Cloud in near future.

Regarding this CPF usage to determine pricing date by BRF+, please find more information in roadmap (link), EKT document (link), and help document (link).

 
3 Comments