Introduction to SAP BRF+/BRFplus & why is it so popular in SAP World !!
- 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.
- 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.
- 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.
- 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+ :
- Data Object Creation
- Rule Set
- Decision Tables
- Decision Tree
- 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 ?
- Create an Application using t-code BRF+.
- Inside the Application , we will create all the other objects like Data Object Creation , Functions , Rule Set and so on.
- 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.
- Next step , is to create Functions which is the core component – where the actual processing of the functionality gets executed.
- 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.
- Here , Rules will be assigned to Rule Set and Rule Set in assigned to Functions and the Function will be tagged to a application.
- Decision tables are going to hold the data which consists of all possible Inputs & corresponding Output values.
- Basically , the Data Objects import parameters validate against the Decision Tables and these Decision table will generate the outcome/result.
- 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.
You need to print a Country Information in the adobe form/smart form with certain validation.
|Company Code||Sales Organization||Country|
- 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.
- 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.
- Output management for Billing and Purchasing – Output determination ( SAP S/4HANA ).
- Integration with IMG transaction.
- SAP business Workflows.
- Cloud based Environment.
- 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.