Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
patil477pavan
Explorer
Introduction:

  • BRF+ stands for Business Rule Framework Plus which provides a comprehensive application programming interface and user interface for defining business rules.

  • It enables you to define business rules without the need of writing ABAP code.

  • The generated Business Rules can be incorporated into other SAP programs or Substitution/Validation rules.

  • BRF+ is not new and even not directly related to SAP S/4HANA, but with the release of SAP S/4HANA 1610, BRF+ gained more attention since it is launched as the go-to solution for some business processes. The most important ones are the changes in output management for Billing and Purchasing.

  • It is a part of SAP NetWeaver ABAP stack.

  • The t-code used is BRF+ or BRFplus.


What is the Significance of BRF+ ? 

  • Before BRF+ came into existence , still the business was running right ? .

  • So , It is very much important to understand how it was handled earlier , before we get into SAP BRF+/BRFplus.

  • The following below are the approaches followed when SAP BRF+ was not into existence or when the developer was not aware of SAP BRF+/BRFplus.



  1. Lets say you want to add a condition based on the particular Company Code(BUKRS) & Sales Organization(VKORG) and execute some functionality , this was achieved by simply doing the hardcoding in IF ELSE condition & achieve the functionality to work for a particular Company Code & Sales Organization - & this was handled in program itself , which is the traditional approach.

  2. The above approach was little bit difficult - if any changes come in future , as it was time consuming for the developer to do analysis first & do the changes - if the change was done at multiple places . So, the second approach & the little bit better approach which was used to follow is to maintain the Company Code(BUKRS) & Sales Organization(VKORG) in the Customized Table(Z/Y table) and fetch the corresponding value maintained from the Customized Table.

  3. The third approach what SAP suggested is to maintain the hardcoded values using table TVARVC and the associated transaction to store parameter data and based on parameter data stored in TVARVC validation was done for a particular Company Code(BUKRS) & Sales Organization(VKORG) and corresponding value was fetched.


So ,even in some standard application or programs SAP is still following the above approaches. But , now SAP is thinking to overcome the approaches mentioned above , by the framework which is known as SAP BRF+/BRFplus.

At least with evolution of SAP S/4HANA , BRF+ has got more prominence and SAP has already started using BRF+ in some standard applications for decision making purpose.

Components of BRF+ : 

  1. Application

  2. Data Object Creation

  3. Functions

  4. Rule Set

  5. Rules

  6. Decision Tables

  7. Decision Tree


Note:

  • All SAP applications that are based on SAP NetWeaver can access BRFplus within the boundaries of the SAP system.

  • In BRF+ terminology , the Input is called Context & the Output is called the Result.

  • This is available from SAP (ECC) ERP 6.0 onwards.


How do we create BRF+  & its procedure ? 

  1. Create an Application using t-code BRF+.

  2. Inside the Application , we will create all the other objects like Data Object Creation , Functions , Rule Set and so on.

  3. Data Object Creation consists of all the variables used , which will be used for processing. These variables are basically input data to the BRF+ to process and to generate the output/result.

  4. Next step , is to create Functions which is the core component - where the actual processing of the functionality gets executed.

  5. Inside the Functions we have a Rule Set , which is basically a container which holds all Set of Rules and these Rules are processed based on the decision tables.

  6. Here , Rules will be assigned to Rule Set and Rule Set in assigned to Functions and the Function will be tagged to a application.

  7. Decision tables are going to hold the data which consists of all possible Inputs & corresponding Output values.

  8. Basically , the Data Objects import parameters validate against the Decision Tables and these Decision table will generate the outcome/result.

  9. Decision Tree can also be used instead of Decision tables but these would be used when you have very simple - Yes or No type of validation.


Note : This is just a high level steps for creating BRF+ - as its just an overview & step by step creation of BRF+ will be covered in another blog post.

Example:

You need to print a Country Information in the adobe form/smart form with certain validation.




























Decision Table 
Company Code Sales Organization Country
DE01 0001 Germany
PK01 0002 Pakistan
IN01 0003 India


  • Lets say , the validation is based on your the Company Code and Sales Organization and the corresponding Country Information is to be displayed.

  • Company Code & Sales Organization are the Input Parameter and Country is the Output Parameter .

  • This is nothing but the Decision Table which is maintained in the BRF+ & based on the Rule Set maintained the corresponding output is determined.


How do we call BRF+ in programs , after its being maintained all necessary decision checks ?

  • In the function component . you have a option called Create Code Template - after selecting this , it shows the generated code template.

  • The generated code is the one which you need to place in the program - where you pass the Company Code & Sales Organization as Input to the generated code and it gives the corresponding Country Information as the Output as maintained in the Decision Table based on Rule Set maintained. This is one way of calling BRF+ , directly calling with the help of Function Code Template.

  • The other way is to call with the help of ABAP Function Module , where Function Module needs to be created and the generated logic is wrapped around a Function Module and can directly call the Function Module wherever the validation is required.


Note:

  • Every generated Function Code Template consists of a Unique Alphanumeric ID( Constant ) associated to it. This will uniquely identify respective function , which should be called for validation.


Use Cases: 

  1. Output management for Billing and Purchasing - Output determination ( SAP S/4HANA ).

  2. Integration with IMG transaction.

  3. SAP business Workflows.

  4. Cloud based Environment.


Conclusion :

  • BRF+ allows us to model rules in an intuitive way and to reuse these rules in different applications.

  • BRF+ avoids creation of custom table & maintenance of custom table for validation , also it avoids hardcoding of the values which was a traditional approach followed by the developers.

  • Basically , BRF+ is used for doing Decision Making where on the fly decision input & output values are maintained in Decision Tables , which has advanced features for doing validations.

10 Comments
Labels in this area