Hi everyone and welcome back to the second part of my BRF+ blog. Now that we know what is BRF+ and why it is so important to be implemented in the business processes of the company. I would like to explain some real-life examples of this tool, because it will always be better to explain with real scenarios and cases than just pure theory.
Every company in the world has their own rules, so here we are going to take an example to fully explain the process of how BRF+ can be implemented in the daily operations. In this case, we will take a very important process that almost every company has, called “Salary Calculation”.
First, I will explain the rules of the process. If is a new employee he enters to the company with a “base” salary. This salary was calculated by the experience years and the old salary that the employee was receiving in the previous job (in case that he had one) It will also affect the proposed salary that the employee wants. If is not a new employee or in other words in case that the employee has 1 or more years in the company, a formula will increment the salary based in his job during the year. So, having these two scenarios I will explain how can we create our first real time example of a BRF+ application.
In this step, we must define all the variables that we are going to use in our application. For example, for this case we must define some objects named salary, experience years, last salary, new salary, years in company, etc.
The expressions are the main computational power of the BRF+. Here is where the data is processed and well defined. So, for this case as an expression we will define the formulas to calculate the salary. Something like this: “total amount of base salary + total amount of salary in base of your experience years”, the amount that is given here can be part of another expression for example, a decision table in where we define the experience years and a certain amount of money depending on that. For more expressions you can always see some types in the SAP forums, there are a lot different kind of expressions that you can use to define the logical process of your application.
The function will be similar as the ones we use in our ABAP programs or methods of a class. In the function, we will define the initial variables that we will use. There will also be the rules that will make the application to work. For example, a function that will be name “Salary Calc. Function”. The function will always have inputs and outputs, so in this case the output will be the new salary.
As we explained in the function, we must create a ruleset that will contain all the rules of the process. For example, a general ruleset named “Salary Rules”. Inside the ruleset, we will define the different rules. For example, if the employee is new then a rule for initial salary calculation will be triggered, if not the rule of “new salary calc.” will not be triggered, instead we will use the “employee year salary calc.” Each rule can have their own rules and expression so the result must be an amount and this amount will be shown at the end of the function in a screen.
This step is optional because not all the BRF+ applications will have actions, the actions must be like send an email, call a function module or a BADI from the ECC, or simple as triggers a Workflow. For example, at the end of the salary calculation we can trigger an action named “Send salary email” that will send the information to the employee.
There is an option in the function to test the result, press the button “simulate” and see the results, change your inputs, your rules to see the different reactions of the data.
At the end of this steps we will have an application that will help to optimize the process of salary calculation of the employee’s company. This is how it practically works in every BRF+ application, we must define all the possible rules and functions to have the best result. Of course, I can enter in more technical details but for that I’ll think that a tutorial would be better. As a general overview with this example you will be able to know how to define the process of certain business operations, so I invite you to try by making this kind of examples with processes that you manage in your company. Feel free to post it in the comments or even make your own blog/tutorials showing the results.
Thank you for reading and wait for more interesting blogs from my part.