Welcome. Today we are going to discuss why we like the SAP Business Rule Framework Plus recipe.

Everyday life is made up of many rules. Some of them are easy to understand and visualize, whilst others may be more difficult to comprehend. In order for us to reach the office at 8.30 AM, we must board the bus or the train at 7.30 AM, otherwise we will probably arrive late. We may wonder why we need rules, and ask why we can’t just align ourselves in a self-disciplined way; however in today’s world we have many commitments, urgency of jobs, timeframes for work, personal boundaries, social issues etc., all of which result in us adhering to internal and external rules that are enforced in our daily lives. Individuals with self-discipline might possibly be able to live without any rules in their lives, but if we look at a family or an organization we cannot expect everyone to behave in the same way. Therefore, when rules are implemented across families and organizations we can at least expect uniform results.

Good examples are sports such as cricket, football, baseball, basketball, chess and so on, which have their own unique rules and regulations to follow.

Let’s take the specific example of a chess board game:

There are six different kinds of chess pieces that may move differently around the chessboard. The queen is the most powerful piece in the game, whilst the king is important but actually the weakest piece, because the king can only move one square at a time compared to the queen that can move in any straight direction for any number of available squares. The rook, or castle, can move only forward and backward, the bishop moves diagonally as far as it can, knights move in a completely different way in an “L” shape formation made up of five squares, and the pawn can move only 1 or 2 spaces forwards, and is only allowed to capture other pieces diagonally. Each piece has a unique playing method and technique, and implementing a strategy of using the right piece at the right time helps you to win the game easily.

Similarly, applying business rules against business processes assists with achieving better visibility, providing for example; insight into customers, the manufacture of products at a specified time, whether deliveries were performed early, on-time or late, the submission of customs documentations, addressing customer queries and so on.

Today, business rules are required to run a successful business model, whether local or global. They are used to monitor, notify, automate and improve business decisions. If you are running your small or enterprise level business, these business rules will have already been integrated into your IT applications to assist with managing business processes effectively and efficiently.

Business Rule Management System (BRMS)

“A Business Rule Management System is a software system used to define, deploy, execute, monitor, and maintain the variety and complexity of decision logic in the form of business rules that are used by operational systems within an organization. The purpose of a BRMS is to ease the identification the identification and authoring of business rules, and to enable the management and execution of the right rules at the right time and in the correct to order, without making changes in the application code that implements the processes” – BRFplus—Business Rule Management for ABAP Applications written by Thomas Albrecht, Carsten Ziegler

Components of a Business Rule Management System (BRMS)

The following components are key to a Business Rule Management System:

  • Rule Authoring Environment – A set of interface based tools helps to define and maintain business rules without coding
  • Rule Repository – Allows business rules to be stored, which are defined in the rule-authoring environment. The Rule Repository works as a backbone and can provide levels of access, management, usage control and versioning of applications.
  • Rule Engine – Helps with the evaluation of rules, interference and execution.

SAP Business Rule Framework Plus (SAP BRF+)

SAP Business Rule Framework Plus (BRF+) is a component of the SAP Netweaver platform and provides a comprehensive application programming interface (API) and user interface (UI) provided through SAP Web Dynpro ABAP technology. It allows us to effectively define, edit and process business rules. It provides functionality to model business rules in an intuitive way and to reuse these rules across different applications.

The image below provides a logical overview of a typical SAP Business Rule Framework Plus environment.

Image Source: SAP AG

Business Rule Representations

Business rule representations can be thought of as the following:

  • Rules and Rule sets – These are also referred to as plain or text rules which are used within if/then/else constructs.

 

  • Rule Flows – Are flowchart-like structures that are maintained as a sequence of execution steps. An example is provided below.

 

 

 

  • Decision Tables – Most of the SAP BRF+ implementations use decision tables by structuring and organizing business rules in column and row concepts. The following is an example of a decision table demonstrating different criteria and the result if the criteria are true.

 

  • Decision Trees – Are business rules represented in a hierarchical model very similar to Rule Flows, and look like flowchart-like structures. An example is provided below:

 

 

  • Formulas – These are mathematical algorithms that we normally see in financial transactions such as shipping calculations etc. A text-based example of a formula might be the following example:

                 Delivery Lead Time = Transportation Planning Time + Picking +   Packing    + Loading + Goods Issue + Transit Time 1 (Warehouse to Departure Port) + Transit Time 2 (Departure Port to Destination Port) + Transit Time 3 (Destination Port to Customer).

  • Scorecards – We rank the customer based on past transactions, their credit history etc. using the scorecard method.

An example of a transportation-planning scorecard might be the following:

Business Rule Workflow

The image below demonstrates the logical flow of steps involved in developing a business process rule:

Image Source: SAP AG

The logical steps can be broken down and described as follows:

  1. Create an application
  2. Create a function
  • Create and assign Context Data Object
  • Create and assign a Result Data Object
  • Assign Top Expression to the function
  1. Create and assign Rule set(s)
  2. Create and assign Rules
  • Create and assign Expressions
  • Create and assign Actions
  1. Activate the objects
  2. Simulate the function

Benefits of using SAP Business Rule Framework Plus (SAP BRF+)

The following benefits can be gained by using SAP Business Rule Framework Plus:

  • Complex business rules can be handled easily through the use of expressions, including functionality such as the Decision Table, Decision Tree, Formula and ABAP function calls.
  • Custom expressions and actions can be created to handle highly complex business rules
  • A bulk activity user interface is available to allow the end user to perform multiple operations in a simple way, against a number of objects at the same time
  • There is no hard coding required for business rules
  • It is possible to edit the business rules without much technical knowledge and activate the business rule again once the changes have been applied
  • It is possible to maintain business rules using Microsoft Excel, that cater for expected and unexpected events
  • You can trigger alerts for business scenario exceptions

 

Ref: BRFplus—Business Rule Management for ABAP Applications written by Thomas Albrecht, Carsten Ziegler