How could one describe a business rule? Well… to put it in a nutshell: it defines what outcome should occur based on the values of the input criteria. Such a rule could be for instance the following statement: „Polish drivers who caused an accident within the last year have to pay 20% higher insurance rates”. The fact of being a Polish citizen and causing an accident over the last year is, in this case, an input criterion, whereas the outcome is whether or not the insurance rate will be 20% higher.
While writing yet another ABAP report, how many times did it happen that you had to implement some complex business rules? Moreover, one may ask: why would you intertwine business rules with technical peculiarities in the first place? Let’s set it off by explaining what the BRFplus is all about and later on we’ll delve into comparing it against the previous ways of handling business rules in SAP applications.
The uttermost purpose of BRFplus framework was to deliver a platform where the rules can be created and modified in a more flexible manner than anything the SAP has seen so far. To obtain this goal this framework is designed in a way that provides a comprehensive application programming interface and a user interface for defining the business rules. The clear advantage is the fact that it separates the business rules from the ABAP code. Hence it can be used by developers, as well as non-technical users (e.g. business users) that can now create their own rules and rulesets in a quite easy and intuitive manner.
Prior to the introduction of the Business Rule Framework plus, the business rules were often implemented in SAP in the form of Z-customizing tables. However sometimes it still wasn’t sufficient and the developer had to code them in ABAP, which itself doesn’t have to be necessarily a bad thing unless they are complex. Unfortunately keeping the rules in Z-customizing tables had its flaws. They are designed in such a way that one would actually need a value for all the keys to do a proper database read. In this way, with only a few columns where each can contain up to 10 different values, we would get a really large number of entries that would have to be kept in such a table. Of course, there might still be some ways to minimize the amount of records. On the other hand, comparing it to BRFplus it would still produce maybe even a vast redundancy of records. Moreover, some additional ABAP-related and Z-table related workaround would most likely still have to be done to optimize the performance.
Now, with BRFplus, a user can create not only some simple business rules but also really complex ones. But he isn’t limited to rules only. By using this framework he can also create decision trees and decision tables. It also enables the user to perform a simulation of a previously created rule, which seems like a nice addition. Especially when it doesn’t work exactly as expected the simulation lets us track it and see what went wrong. Although BRFplus is not an entirely new solution, it’s not so hard to see all it brings to the table when handling of business rules is concerned.
Although BRFplus is not an entirely new solution, it’s not so hard to see all the good it brings to the table when handling of business rules is concerned.
Last but not least, it’s worth mentioning that BRF+ doesn’t come as a separate product but is integrated into the SAP NetWeaver platform instead. It’s been available since SAP NetWeaver 7.0 Enhancement Package 1.