0% found this document useful (0 votes)
108 views64 pages

BRFplus

BRFplus provides a comprehensive API and UI for defining and processing business rules. It allows modeling rules intuitively and reusing them across applications. BRFplus is used for validation of data, matching responsibilities and locations, calculation of costs and risks, and as a technical configuration engine. It supports features like simulation, trace, XML import/export. The most common use is implementing custom business logic in exits and enhancements by creating BRFplus functions that take inputs, process business logic, and produce outputs. These functions can then be called from ABAP.

Uploaded by

sapsd540
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
108 views64 pages

BRFplus

BRFplus provides a comprehensive API and UI for defining and processing business rules. It allows modeling rules intuitively and reusing them across applications. BRFplus is used for validation of data, matching responsibilities and locations, calculation of costs and risks, and as a technical configuration engine. It supports features like simulation, trace, XML import/export. The most common use is implementing custom business logic in exits and enhancements by creating BRFplus functions that take inputs, process business logic, and produce outputs. These functions can then be called from ABAP.

Uploaded by

sapsd540
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 64

Output Management

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

•Uploading XML for importing output determination application in BRF+ (Ref


note 2248229).
•BRF+ is active and usable
•Background RFC configuration has been set up
•Adobe Document Server is available – ADS needs to be implemented to allow
SAP to fetch PDF properties for rendering output form
•KPRO has been maintained – KPRO allows to store PDF attachments on
physical location.
Steps for uploading XML –

Note 2248229, provides decision tables for new output


management. We need to download XML files to local drive
and import them using below steps.

Transaction code BRF+ or BRFPLUS

BRF+ workbench will be displayed. For importing output


application, we need to change layout to “Expert” mode.
Follow below steps –
elect user mode as “Expert”.

Save this settings.


Steps to import –
Download zip files from SAP note 2248229 and save them on
your local machine

Next, we need to select Import XML under the Tools menu.


Select relevant file in below screen.
Specify Customizing request.

Click on “Upload XML File” button

Uploaded application will now be available under Repository


tab.
Configuration –
Steps are relevant for all application areas (Sales Order,
Purchase Order, Billing Documents and Outbound Delivery)

SPRO Node for output configuration (IMG Path –> Cross


Application Components)

Define Output types –


Define Output types –

Output Control -> Define Output Types


Assign Output Channels –
Output Control -> Assign Output channels In this activity
assign output channels to output type.
Define Determination of Form Master Templates –
Output Control -> Define Determination of Form Master Templates
The master form template contains static data (such as a logo and footer) that is applied to each form
page and is determined based on configuration setting maintained.
Activities

) 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)

SPRO – > Cross-Application Components -> Output Control ->


Define Business Rules for Output Determination (Transaction:
OPD

In this Customizing activity, you can define how the system


determines output parameters during document processing.
You can define business rules for the determination of output
parameters, such as output types, recipients, and form
templates.
Determination Number of Matches Result Example
Output BILLING_DOCUMENT can be determined on the basis of
Output Type Multiple Output Type to be used
billing document type (F2).
Receiver roles (SP, SH, RE, RG) are determined for the
Receiver Multiple List of Receiver Roles
determined output type (BILLING_DOCUMENT).
Channel Multiple List of Output Channels Channels (EMAIL, PRINT and IDOC) are determined.
Output devices and number of
Printer Settings Single Output device (LOCL) for channel PRINT
copies
Sender email address & Email template
Sender Email address and Email
Email Settings Single (SD_CI_DEFAULT_EMAIL_TEMPLATE) is determined for output
Template
type.
Email addresses for roles (To, Cc, Bcc) are determined for output
List of Email roles(To, Cc, Bcc)
Email Receiver Multiple type. This step is optional and system uses receiver email
and email addresses
address in case step is not maintained.
Form template (SD_CI_STANDARD_DE) is determined with
Form Template name and following options: Output type, Receiver, Channel, Recipient
Form Template Single
language language, Sender Country, Recipient Country and document
category.
Can the document be output
Output Output to be issued only when billing document is successfully
Single based on the defined condition
Relevance passed to accounting.
(Yes/No)?
Example of maintenance of Channel determination

•Select Rules for relevant document, example BILLING_DOCUMENT.


•Select determination, example Channel to be used for triggering output type.
•Input parameters could be changed by adding input columns to determination table. Each determination
table consists of input columns (condition columns) and result columns. You can add new input columns via
the table settings.
•Maintain relevant input combination to determine the channel needed. Multiple channel can be selected for
the same combination.
Output processing

•Output determination is performed in document based on


determination rules defined for Output type, receiver role,
channel, form template, receiver email address and email
template withe status as ‘In Preparation’. Default data can be
changed in the document.
Overview Screen:
Processing of output –

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

Here, we assign content repository to category “SOMU


Created a device of type PDF1

The output for me goes directly to To Be Output as I have set it


to print immediately and once the PO is saved it remains in
status Pending – even though it has spooled. If I look at the
messages before saving the PO and make changes – it ignores
these so it must be going through the set up again later. it
never changes to successful unless I manually complete it – lots
of little issues – it seems development is not fully complete.
Brf+
Define Output types

You might also like