BRFplus
BRFplus
via BRF+
Business Rule Framework plus (BRFplus)
Business Rule Framework plus (BRFplus) provides a comprehensive application
programming interface (API) and user interface (UI) for defining and processing business
rules. It allows you to model rules in an intuitive way and to reuse these rules in different
applications.
Here are some examples of scenarios in which applications use BRFplus:
•Validation of data and detection of invalid data and states
•Matching responsibilities, suitable products, and locations
•Calculation of costs, overhead, and risks
•BRFplus as a technical configuration engine
Major BRFplus components include application, function, catalog, expression, action, data
object.
The interface between a business rule modeled with BRFplus and an application using
that rule is provided by a BRFplus function. The function serves as a container for the
entire business logic of a rule, no matter how complex it may be. Rules are implemented
as expressions which are assigned to a function. The rule input is known as context and
the rule output is called result. Context and result consist of data objects of one of the
following types: element, structure, and table.
BRFplus supports features such as simulation, trace, transport, XML export and import.
Steps in BRF
Formula and derivate workbench
BRF+ technical details
1) Data Objects
2) Expressions
3) Functions
4) Rule sets
5) Actions
Real world where we've utilized BRFplus to meet business
requirements:
•Logo determination on output forms
•Default priority and deadline determination on service
notification documents
•Default plant determination during sales order entry
•Custom carrier determination in SAP Transportation
Management
From a technical point of view, the most common use case for
BRFplus that we run into is the implementation of custom
business logic in user-exits and enhancements. In fact,
nowadays BRFplus is our default approach for implementing
custom business logic in such context, which can be described
at a high-level with 2 steps:
1.Creating a function within BRFplus that takes certain inputs,
processes them through the necessary business logic, and then
produces the derived outputs
2.Calling the BRFplus function created in prior step via ABAP in
a user-exit, enhancement, BAdI, custom program, etc
It is important to note that using the aforementioned approach you are still required to
write some ABAP to make the call to a BRFplus function. The difference is that,
generally speaking, the ABAP syntax is only responsible for making the call to BRFplus
and no actual business logic is specified directly via ABAP. Why is this an advantage you
might ask?
•BRFplus functions are easily re-usable, which greatly reduces the amount of duplicated
business logic in your system.
•BRFplus contains a large library of expressions that greatly speed up the development
process for mapping business rules, especially if those rules are complex. Something
that might take you days or even weeks to write in ABAP from scratch can be quickly
modeled within BRFplus using one of many expressions.
•All of your custom business logic can be seen in a single place - BRFplus
transaction. You don't need to hunt around the vast number of programs, exits and
enhancements to be able to make adjustments to existing business rules.
•Simple adjustments to existing business rules can be made by non-technical staff,
without any need for ABAP changes.
One of the really neat features of BRFplus is ability to create
both Customizing and Master Data applications. Customizing
applications require the use of SAP transports in order to move
the changes between SAP systems, whereas master data
applications allow the changes to be made directly in each SAP
system and client. This becomes especially useful when you
have master data values, such as customer, material, vendor
numbers, etc., as part of your business logic. Keep in mind that
since in most cases BRFplus functions are called via ABAP, the
functions themselves will need to reside under a customizing
application. But these customizing-level functions are then
able to utilize expressions (such as decision tables) that reside
under other master data-level applications. In a nutshell, you
are able to mix the use of customizing and master data BRFplus
objects in a single business rule.
user interface
Most of the modeling within BRFplus is done via a "point and click" User Interface, accessible via
transaction code BRFPLUS. You are able to create new objects by simply right-clicking on a node on the
left side of the screen and choosing the appropriate item from the contextual menu.
api
You can also interact with BRFplus through an API. This means that not only can you create and update
BRFplus object via transaction BRFPLUS but you can also do so via standard delivered ABAP classes and
methods. For example, in one of the scenarios we needed to store the average price of diesel fuel in the
US in a BRFplus decision table. We were able to create a custom ABAP program that looked up the price
of diesel for the prior week via a public web services and updated the BRFplus decision table on our end
via the BRFplus API.
BRFplus, SAP’s business rules management system
The decision-making process is one of the most important processes in a company. The
decisions to be made are almost always dependent on fixed rules, the so-called business
rules. In order to ensure efficient use of business rules, Business Rule Management Systems
(BRMS) are necessary.
For many years, SAP has provided an extensive business rule management system with its
SAP NetWeaver-based framework “BRFplus.” With the integration into the ABAP
environment, BRFplus enables the creation, management and use of simple, as well as
complex, business rules in the SAP environment. In addition to a powerful programming
interface, it offers the possibility of using a web-based interface and a focus on modeling so
that business rules can be mapped and configured by many users, not only by those with
technical experience. Implemented business control logic can be integrated into basically all
SAP products to enhance their functionality and to automate processes. It does not matter
whether this is ERP or another SAP System (QIM, GRC, Solution Manager, etc.). Using
integrated BRFplus rules allows one to make consistent decisions, calculate results or
determine deviations.
Prerequisites – For Output determinataion
) Enter a rule ID, preferably an ID that indicates the logic of the rule.
b) Enter an ordinal number to specify the position of the rule in the determination
sequence.
c) Following parameters are optional –
• Organization Type
• Organizational unit
• Channel
• Sender country
• Form Template
During document output, the master form template is determined by comparing each
defined rule with the current data provided by the application. If a parameter is
not defined (no value entered), this parameter is considered as a match, and else, system
determines the rule where all parameters match. Master form template is
used corresponding to this rule.
Business Rules for Output Determination –
Below configuration steps are relevant for all application areas
(Sales Order, Purchase Order, Billing Documents and Outbound
Delivery)
Only two dispatch times are available in new output management system.
• Immediately (1)
Output is processed as soon as document is saved. If no errors, output type status changes
to “Successful”. In case of errors, output will be in “Error” status. Errors can be viewed by
clicking log button.
• Scheduled (2)
Email output in SOST
Invoice copy is sent as PDF attachment.
Smartforms and SAPscrip
SPRO -> Cross Application components -> Output Control ->
Assign Form Templates
New output management utilizes bgRFC for processing of
outputs with Immediate dispatch time. bgRFC could be
configured using transaction SBGRFCCONF.
Connection to ADS can be checked in SM59. Please
see below screenshot.
KPRO maintenance
SPRO -> Cross Application Components -> Document Management -> General Data -> Settings for Storage
Systems -> Maintain storage category