0 ratings0% found this document useful (0 votes) 79 views33 pagesBRFplus Applications
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
Community Network
EE
BRFplus Applications in SAP BPC for S/4 HANA
(formerly known as
Integrated Business Planning for Finance)
An Example-Based How-To Guide
Applies to:
‘SAP BPC for S/4 HANA (fka IBPF or Integrated Business Planning for Finance)
Summary
‘This How-To Guide describes step-by-step, using an example, how customers can use BRFplus Applications
‘for manipulating Planning Data in the SAP BPC for S/4 HANA solution.
Author: Thomas Wessolek
Company: SAP SE
Created on: December 11", 2015
Version: 3
EE community NetworkTable of Contents
Business Scenario
Background Information
SAP BPC for S/4 HANA Architecture.
Business Rules Frameworkplus
Architecture of the Integration of BRFplus Applications into SAP BPC for S/4 HANA
Step-by-Step Procedure...
First Example: Check Amounts.
Part 4: The Planning Sequence .
Part 2: The BRFplus Application...
Part 3: The Analysys Office Workbook.
‘Second Example: Simple Discount.
The Planning Function..
The BRFplus Function.
Execution of the BRFplus Function SIMPLE_DISCOUNT.
Technical Prerequisites
Copyright.
EY community NetworkBusiness Scenario
SAP users can use the queries and workbooks delivered by SAP BPC for S/4 HANA for financial planning in
Management Accounting. These queries and workbooks serve as examples for different types of planning
and can be readily used. For example, an SAP customer can use the delivered Analysis Office Workbook for
Cost Center Planning on Years (/ERP/SFIN_AQ0_WB01) to plan costs on the granularity of cost center/cost
categoryifiscal year in a Microsoft Excel environment (see Figure 1).
[sme [mre [ sims J crneorn | mn
[Petusis 2013 | Pian 2018 [OWerence Fan Actus
(cost Center \G/1 Account | eva] eva un
ge [400000 130,00 330,09
Texso00 35,000,00| 38.0000 5.000,0)
[aues00 25.000,00|_30.000,00, 000.00
Tazoo00 50.000,00|45.000,0 -s.000,0
Taro000 4.00,00] _3.500,00 500,00
[sz0200 25.0000) 30.000,00) '.000,00
[s20s00 25.000,00|_30.000,00 5.00.00
[s20u00 25.000,00|_20.000,00) =5.000,00)
Tesanoo ps] _25.000,00|_24.000,00, 2.0000
[Resutt 203.870,00, 232.500,00 £.630,00)
Figure 4: Analysis Office Workbook for Cost Center Planning on Years
‘Taking their specific business requirements into account, customers may build on the SAP delivered
‘workbooks and add their own plan data processing applications to them.
‘These applications can be implemented as BRFplus (Business Rules Framework (plus)) applications.
Integrating these applications into the SAP BPC for S/4 HANA solution does not require any ABAP coding.
‘This How-To Guide describes how the BRFplus applications have to be implemented in order to fit into SAP
BPC for S/d HANA and how 2 workbook and the underlying objects are to be modified so that users can
access the BRFplus applications functionality from within a workbook.
EY community NetworkBackground Information
SAP BPC for SI4 HANA Architecture
SAP delivers planning sosnarios for financial planning in Management Accounting as oca’ BWV content (that
is, BW content in the ERP system, not in the central BW system), based on the real-time InfoCube
JERPISFIN_RO1 (Financials Planning). Analysis Office workbooks constitute part of the planning scenario,
Customers can use these to enter planned figures in a Microsoft Excel environment.
SAP delivers the following workbooks:
Cost Center Planning on Years (JERP/SFIN_A00_WB01)
Cost Center Planning on Periods (/ERP/SFIN_AO1_WBO1)
Internal Order Planning on Years (/ERP/SFIN_A10_WBO1)
Internal Order Planning on Periods (/ERP/SFIN_A11_W801)
Project Planning on Years (/ERP/SFIN_A20_WB01)
Project Planning on Periods (/ERP/SFIN_A21_WBO01)
Market Segment Planning on Years (/ERP/SFIN_AS0_WBO1)
Market Segment Planning on Periods (/ERP/SFIN_A51_WB01)
Profit Center Planning on Years (/ERP/SFIN_A70_WB01)
Profit Center Planning on Periods (/ERP/SFIN_A71_WB01)
P&L Planning on Years (/ERP/SFIN_A90_WB01)
P&L Planning on Periods (/ERP/SFIN_A91_WB01)
Figure 2 shows the technical architecture of the delivered planning scenarios.
EY community NetworkBw
Analysis Office Workbook ERP/SFIN_ AS. > WEO!
t
Input Ready Quory ERPISFIN. A .> IRQS.»
t
‘Agaronstion Level ERPISFIN-AS. >
es
Matiprovider ERPISFIN_MO1
i 4
RealTime InfoProvider /ERPSINF_RO1 | | Vityai Provider IERPISINF_VO' (Actual
(Pisn Data) rae
a J
HANA Views from Package sap erp sin op
‘Master Data Views FCO_C_<..>
HANA Information Mode!
FCO_G_IBP_ACDOGA (Actual Data)
Figure 2: Architecture of the Delivered Planning Scenarios
On the highest level are the Analysis Office workbooks, with which end users can enter planned figures. The
figures entered in this way are persisted in InfoCube /ERP/SFIN_RO1.
InfoProvider /ERP/SFIN_V01 is used to read the actual values from the previous year and compare the
planned values of the current year in the workbooks. A planning function can also be used to copy the actual
values from the previous year as a template for the planned values of the current year in the workbooks. The
InfoProvider is based on HANA Information Model sap.erp.sfin.co.pl. FCO_C_IBP_ACDOCA,
The characteristics of both InfoProviders read their master data from the ERP master data tables, which are
accessed in HANA Views FCO_C_<...>. For exemple, master data access for characteristic
/ERP/MATERIAL is based on HANA View FCO_C_PRODUCT, which in tum contains ERP master data
tables MARA and MAKT.
Business Rules Frameworkplus
The SAP Business Rules Framework lets you define rules for processing data without having to use @
programming language. Example of such rules are data validation, derivation of dependent data, calculations.
and generation of new planning data. These rules are implemented as “BRF Functions” which in turn are
organized in "BRFplus Applications”. The BRFplus Functions can be integrated in SAP programs by use of
the BRFplus Application Programming Interface.
EY community NetworkIn order for a BRFplus Function to be compatible with the SAP BPC for S/4 HANA solution, certain
constraints apply. Within the scope of the example BRFplus functions used in this How-To Guide, these
constraints are explained the chapters below. For more elaborate scenarios, please refer to the document
“How To: DSM-Decision Service Management / BRFplusBRF plus in BW-IP" (httos://sen.sap.com/docs/DOC-
65172).
Please note that this How-To-Guide assumes that you are familiar with the basies of BRFplus. Itis not
intended to be an introductory text for BRFplus. For this, please refer to the SAP documentation on BRFplus,
Architecture of the Integration of BRFplus Applications into SAP BPC for S/4 HANA.
Customer
Defined
Planning AAG
Funetion emotes otter
Wr BBRF Plus Function
(Transaction
RSPLFI)
Customer Defined BRF Plus
Application
‘Customer Defined Filter (Transaction RSPLAN)
Customer Defined Aggregation Level (Transaction RSPLAN)
Figure 3: Architecture of the Integration of BRFplus Applications into SAP BPC for S/4 HANA
‘As shown by Figure 3 above, BRFplus functions can be accessed using customer defined Planning
Functions. These Planning Functions can then be accessed, using push buttons, from within Analysis Office
‘Workbooks in order to execute their data processing tasks,
Step-by-Step Procedure
In this How-To Guide, we will present two examples of BRFplus functions and their integration in an Analysis
Office based scenario.
First Example: Check Amounts
‘The first example is a BRFplus function which checks amounts of planning data and returns error messages
in case some limits defined as part of the BRFplus function have been exceeded. This is an especially
simple example in that no planning data are changed ar generated. It should nevertheless serve to make the
‘essential building blocks of the BRFplus integration clear.
‘The exemple scenario which we are going to build is as follows:
- From within an Analysis Office workbook, the execution of a Planning Sequence is triggered. The
Selection Parameters: Material Group, Customer Group and Account are passed on to the Planning
Sequence.
+ The Planning Sequence consists of just one set of Planning Functions, Filters and Aggregation
Levels. The Planning Function reads the data corresponding to the Selection Parameters.
- For each line of data, the BRFplus function is called. The Function returns an error message if a limit
‘amount, defined within the BRFplus funtion, is exceeded. The limit amount may be a global limit or
may be defined for specific values of combinations of Material Group, Customer Group and Account.
EE community Network- _ Allerror messages are passed back to Analysis Office and are displayed there.
‘The description is organized in the following three parts:
Part 4: The Planning Sequence
Part 1 describes how you create the abjects within ERP BPC which are required for communicating with the
BRFplus function from within ERP.
~ Creating the Aggregation Level
+ Creating the Filter
= Creating the InfoObjects for the Planning Function Type Parameters
= Creating the Planning Function Type
= Creating the Planning Function
+ Creating the Planning Function Sequence
- Test
Part 2: The BRFplus Application
Part 2 describes how you can define a BRFplus application and a BRFplus function associated with it.
- Creating the BRFplus application and BRFplus function
Part 3: The Analysis Office Workbook
Part 3 describes how you can enhance an Analysis Office workbook so you can execute the Planning
Funetion (from part 2 above) from within the workbook.
= Adding the Planning Function Sequenes to an Analysis Office workbook
~ Definition of the Selection Parameter Mapping
+ Combing an Analysis Office push button with the Planning Function Sequence
Part 4: The Planning Sequence
In order to create a Planning Sequence you will need an Aggregation Level, a Filter and a Ptanning Function.
For our example, these are described in the following subchapters.
Creating the Aggregation Level
Typically you will use an existig aggregation level. Creating a new aggregation level only is necessary if the
planning function needs to work on a finer or a coarser level than the existing ones,
- Use transaction RSPLAN to create the new aggregation level. In our example, the Aggregation Level
is called /ERPIFCOH_AQ4.
EY community Network‘Aggregation Level
Description
Version a MActve Verson >)
| Editing Functions ]
fee owey ) [A eae} (ete)
+ Inthe Create Aggregation Level popup window, specify a description and the InfoProvider you want
to.use. Our example aggregation level is based on the InfoProvider of SAP BPC for S/4HANA.
For the aggregation level, choose the characteristics according to your business requirements. Our
example
‘Aggregation Level Technical Naw | Data... | Lena
a p PBL ‘JERP/ECOH_AS4
+ GB object Information
Verson B Modtied Ve.
+ Giinfoobjects
+ Gi Time characteristics
+ @ Fescal year variant OFISCVARNT CHAR 002
+ © Fecal year OFISCYEAR __NUMC 004
chars.
+ & Ctegory JERP/CATEGORY CHAR 010
+ aE Chart of Accounts /ERP/CHRTACCT CHAR 004
+ M Company Code /ERP/COMPCODE CHAR 004
+ M Controling Area _/ERP/CO_AREA
+ Mf Customer Group _/ERP/CUST_GRP 002
+ Af Debit/Credit Indici/ERP/OCINDCO 001
+ MEG/L Account —_/ERP/GL_ACCT 010
+ Ledger (Unified 3¢/ERP/LEDGER 002
+ Mi Materel Group /ERP/MATL_GRP
+ df Clent (specal Log OMANDT.
> Glunits
+ ME Currency Key OCURRENCY
+ Unit of Measure [UNIT
+ Gilkey Figures
Ss 52 RER228
8
+ 4g Amount /ERP/AMOUNT 012
+ 4g Quantry /ERP/QUANTY 012
Giniavigation attributes
Ey” community Network- Save and activate your aggregation level.
Creating the
~ Use transaction RSPLAN to create the Filter.
r
In our example, we have a fix restriction on the DIC Indicator (=D) while all the other InfoObjects are
restricted based on the corresponding variables. Our example:
eoOh Fa
Fite __/ERP/FCOH_A94_FILOL ‘Pat Quantty Panning
‘Aggregation Level: /ERP/FCOH_AS4
‘Key Date: @standard
‘OFxed Date:
OFrom variable
+ Save the Filter
EY community NetworkInfoObjects for the Planning Function Type Parameters
For the definition of the Planning Function Type (below), we will need three parameters in order for the
Planning Function to be able to connect with the BRFplus Application. Each parameter will be associated
with an InfoObject. The names of the parameters and their corresponding InfoObjects are:
© IP_BRF_APPLICATION : ORSPL_BRFAP
© IP_BRF_FUNCTION - ORSPL_BRFFC
© IP_MESSAGE_CONTEXT oBOOL,
If you don't see these InfoObjects in your system, you may have to activate them.
‘The InfoObject definition for the parameter IP_BRF_APPLICATION looks like this
© 9 OTs YG de FP Blospay Bitogs.. Gimetadata Content Functions Mantain
(s][R5 verson comparton_.)|(Gs=5")
characterstc ORSEL_BREAP
Long Desereton (pipusAppicaton——SSSCSC*~S~S~S~
Short Descroton [Bipus Anpicaton |
verson of tsaved Object Status B Aaive, executable
Data Bement [fetoromsm, pare || Clattrbute ony
ata Type [CHAR CHAR - Character Sting =| Person Responsble Cc —_
Length fo] Content Release frewreo]
Dllowercase Letters CDicharacteristic is Document Property
Conversion Route fea ‘constant C—_
Output Length
Dion cardia
sD Table
‘Transfer Route
Ditransfer Routne bests ey (ressoxex |
OlZ}ese3\e3) on
EE community Network
10Creating the Planning Function Type.
~ Use transaction RSPLF1 to create a new Planning Function Type. For our example, we choose the
name FCOH_BRF for the Planning Function Type.
ei Denote Groction Types intial Soe
4 Bitogs... Hoy, cecioy enty | 8
Version MActwe/Modfied —_~|
EY community Network
"4~ _ Inthe following window, specify the Implementation Class CL_RSPLFC_BRFplusBRFplus_SRVTP:
PRimy OF
Function Type FoomeerF =i
Description ]
Version
Object Status Active, executable
eo
General Data
Last Changed by fmessouex |
‘Changed On 10.06.2015]10:37:42)
Person Respons.
Content Release ry
Implementation
Reference Data
(without Blocks
(O)Process Empty Records:
(Hierarchy Nodes Selections Supported
= Goto the tab Parameter’ and specify the parameters required for the connection with the BRFplus
Application. Use the InfoObjects mentioned in the previous step’
EE ——————
Ge)
‘Object Name Deserption _T Infoobject
+ Parameter
+ __IP_BRF_FUNCTIIBRE Function © ORSPL_BRFFC
+ [TIBTBRE APBLICAERE Appication ‘ST ORSPL. BREAP
Pe MESSAGE_Cessage Context 5 0B00L
- Save and activate the Planning Function Type.
EE community Network
12Creating the Planning Function
Create a Planning Function of the type created in the previous step. By this Planning Function Type, the new
Planning Function will be associated with the ABAP class CL_RSPLFC_BRFplusBRFplus_SRVTP, which
implements the interfacing with the BRFplus framework
Do not mark any fields as "to be changed”
SPO ts Parameter Y se
Yanning Function /ERP/FCOH_A94_pFO4 — |BRF Adapter for Check Amounts
Aggregation Level JERP/FCOH_A94 Copy: P&L. Quantty Planning on Years
‘uncton Type FCOH_BRF BRF Adapter ~|
~ Select a characterstic with values that the planning function can change.
=F you want to work with condttons, mark the charactenstcs
‘that you want to create conditions for.
U1, C01 Ln 1 -Ln3 of 3 ines
Fields to be changed Fields for Conditions
Oo oO
oO Oo
Oo oO
9° oO
oO oO
° °
° oO
° o
o Oo
o oO
° °
° °
° °
oO Oo
In the Parameter section, specify the BRFplus Application and the BRFplus Function to be called.
For our example, make sure the BRFplus Application and Function do not already exist.
‘The Message Parameter has to be set to X:
Ey” community Network
13© PO Ts | Bemacentcuace Y 6
RF Function (ene eur ]
RF Aopleaton| (ec soos
Message Context ix
Save the Planning Function. You will got an error message ,Value CHECK_AMOUNTS for parameter
IP_BRF_APPLICATION is not valic”, but you may safely ignore this message.
Creating the Planning Function Sequence
Now use the Aggregation Level, the Filter and the Planning Function created in the previous steps to create
the Planning Sequence:
SPO TY Qematermenysemnee Pomerening (Psvaranny sure UBoay oat one
cece [se kage eR te
Test
You may test the objects you have created so far — the Planning Objects and the BRFplus Function — and
their working together from within the transaction RSPLAN using the “Set Variables” and the “Execute Step”
buttons shown in the following picture:
Planning Sea. (7ERP/FCOH_AS4_PS04
Descrption 'aRF Adapter for Check Amou
Part 2: The BRFplus Application
We will create the BRFplus objects (application, function, variables etc) using the ABAP program
RSPLS_BRFplusBRFplus_TOOL described in the document “How To: DSM-Decision Service Management /
BRFplusBRFplus in BW.-IP* (see link above).
In order to use the tool, you will need to create the BRFplus Application first. Execution of
RSPLS_BRFplusBRFplus_TOOL will then create the function CHECK_AMOUNTS and a number of
variables within this application.
‘The function, of course, will not have any logic built into it - this is the task of our upcoming steps (below).
EE community Network
14‘The generated variables correspond to the components of the Aggregation Level that your Planning Function
created above is associated with, The correspondence is based on the names (but not necessary equality
‘of names) of these components.
‘The program RSPLS_BRFplusBRFplus_TOOL will generate variables for all the components of the
Aggregation Level. You can safely delete all those variable which are not needed for the purpose of the
BRFplus Function.
Keep in mind that you may need to adapt the BRFplus Function in case you modify the Aggregation Level.
Creating the BRFplus Application
In BRFplus, create the application CHECK_AMOUNTS:
‘Save the new application,
EY community Network
15Running the program RSPLS_BRFplusBRFplus_TOOL
‘We will now make use of the program RSPLS_BRFplusBRFplus_TOOL in order to create the first BRFplus
objects (Data Objects and Function) in the application created in the previous step.
Start the program RSPLS_BRFplusBRFplus_TOOL using the transaction SA38. Fillin the values for the
Planning Funetion, the BRFplus Application and the BRFplus Function:
(© Program Edt Goto System Heb
@ *}48'C@@ SHH BRA)
o
QAnalyse Planning Function
© Greate BRFpIus Function
Planning Function
[BRFplus Application Name (CHECK_AMOTITS
BBRFplus Function Name (CHECK AMOUNTS
Otheck Consistency for Function
@check Consistency
Planning Function
Occheck Consistency
Function Type
Press FB (Execute). This should reulin he folowing response:
( ust Edt Goto System Heb
ei 7181 C@@ 2H8 HHHO FH OR
a
BW-IP ~ BREpLu:
1 CHECK AMOUNTS ox
EE” community Network
16In BRFplus you can now see that a number of “Elements” have been created, the structures
FDT_S_MESSAGE, |S BLOCK VALUES and S_DATA, the tables C_TH_DATA and E_T_MESSAGE and,
finally, the function CHECK_AMOUNTS.
‘As oxplained above, RSPLS_BRFplusBRFplus_TOOL creates more objects than we will need, Therefore,
from the structure |_S_BLOCK_VALUES, delete all components except S_ CUST_GROUP, S_GL_ACCT
and S_MATL_GRP:
® Structure: |_$_BLOCK_VALUES, Block Values
mula Slide Designer Data Cele
Insert Component Toots Panning
Go to the “Components” tab of the Display:
‘Analysis. Antormation
Place the cursor on ,Planning Objects”
Analysis
(@ By Data Source (© By Sheet
Pail Planning Price Calculation xtsm
(®. /ERP/FCOH,AS4_IRQOOOL [DS_1]
coarser
and after a right mouse click choose “Use Planning Sequence’. In the following popup window, enter a
search string and select the Planning Sequence created in the previous steps:
‘Open Planning Sequence
‘Search For ASS
Desciption Technical Name
Choose a Formula Alias. In our example: PS check.
EE community Network
23‘Sy Properties
Name of Planning Sequence
BRF Adapter for Check Amounts
‘Technical Name of Planning Sequence
JERPIFCOM 494 P04
Formula Alias
PS check
(i Process Changed Data
‘Aggregation Level [As Defined for Each Step lx
Definition of the Selection Parameter Mapping
‘The Planning Sequence, when called, expects a number of input parameters. The expected parameters are
displayed in the "Components" window. You may provide values to these parameters either by specifiying
the values directly (Source = Member) or by specifying a cell which is filled by calling the SAPGetVariable
function,
‘As an example, you can pass the value of the selection parameter Material Group to the Planning Sequence
as follows:
In the table Variables of Planning Sequence, set:
[Variables of Planning Sequence
Name
Material or Product Group
Members
[ef stenarsasio
And on the sheet “Sheet2" of your Workbook, in the cell $A$10, enter this:
=SAPGetVariable("DS_1™"/ERP/S_MATL_GRPO1":"VALUEASKEY")
Proceed like this with the rest of the parameters, except for “GL Account Hierarchy” which does not need to
be filled.
Combing an Analysis Office push button with the Planning Function Sequence
In order to create @ pushbutton “Check Amounts” in your workbook, go to the “Developer” tab and push
“insert. In the following dropdown, choose the icon for “Pushbutton” and place the pushbutton at the
appropriate place within your workbook:
LAS__DATA REVIEW VIEW ADD-INS Analysis
bf Properties EB import a
22 AI View Code Blbpansion Packs B, fxpo
Insert. Pesign 2 source #1 . Document
Mode [Zi] Run Dialog ! Panel
Controls Modity
EY community Network
24Now go to the Macro editor (pushbutton Macro” in the Developer’ tab) and create a Macro ,CallPS". The
code of the macro consists of only one line:
IResult = Application.Run("SAPExecutePlanningSequence”, "PS_Check")
Finally, mark your new pushbutton, right mouse click onto it, and choose “Assign maero...”. In the popup
window, choose your newly created macro.
You have now created the BRFplus Application, the Planning Sequence and the Analysis Office Workbook
containing a pushbutton for starting the Planning Sequence,
Pushing the pushbutton — with data selected which contain amounts exceeding the limits set in the BRFplus
function- would then lead to a message like this:
Me ns Soe
/ALLIMIT EXCEEDED FOR ACCOUNT 0000400000 . LIMIT = 1
D BRF Adapterfor Check Amounts executed without erors
‘Second Example: Simple Discount
Whereas in the first example the BRFplus function did not modify the data at all (only messages were
returned to the calling Planning Function), we will now present an example in which from the lines of data —
representing revenues per customer group, product group etc - passed to the BRFplus function a new line ~
the discount - is derived and added to the original lines. if a line corresponding to the discount account exists
in the data, it wil be overwritten.
To keep the example as simple as possible, we set the revenue account number and discount account
numbers to fx values, 800000 and 810000, respectively.
‘The BRFplus function logic then, isto read from each group of data, the line with account number = 800000,
calculate from its amount field the discount — one tenth of the amount, times -1 — and include the discount
line in the lst of data. Ifthe lst of data does not contain a revenue account line, the BRFplus function does
nothing.
“The emphasis here is on those parts ofthe scenario which need to be implemented differently (with respect
to the first example) in order to allow for new lines of data to be generated by the BRFplus function. The
“business logic" Is “simple” (fixed discount factor, fixed discount GL account) and is not intended to model a
real world business scenario,
‘The two objects which need to be implemented differently in this example are
+ The Planning Function
~The BRFplus function
The description of the scenario in this How-To Guide is restricted to these two objects.
EY community Network
25‘The Planning Function
We create a new Planning Function (/ERP/FCOH_A94_PF02"), as explained in the first example, The
Planning Function Type and the Aggregation Level are the same as in the first example.
Set the Planning Funetion parameters as follows:
[BD Phrnng function Eat Goto System Heb
°o *}«S @@@\e Sree
OTs Behaactetcumge >
8FApplaton ie sterae_oTScomT
Message Contest *
Different from the first example, we mark the InfoObject /ERP/GL_ACCT as “to be change
Fields to be changed Fields for Conditions
OOOO O OO @O|O\O|O|O|O
OOOO OD OO O/O/O|O|O|O|O
‘Save the Planning Function. Since the BRFplus application and function do not exist at this point, you will get,
an error message. You may safely ignore the message.
We have to set /JERP/GL_ACCT as “to be changed’, because we want the BRFplus Function to be able to
generate and return a new line as part of the list of data transferred originally to the BRF plus Function,
Marking JERP/GL_ACCT as “to be changed’ also has the desired effect that the lines of data are grouped
with each group having identical characteristics values except for /ERP/GL_ACCT.
For this new Planning Function create its corresponding Planning Sequence, with Filter and Aggregation
Level the same as in the first example.
‘The BRFplus Function
We are going to create the BRFplus Function and the basic BRFplus Data Elements using the ABAP
program RSPLS_BRFplusBRFplus_TOOL.
Ey” community Network
26For this, first create the BRFplus application “IP_SIMPLE_DISCOUNT". At this point, do not create any
objects within this new application,
Run the ABAP program RSPLS_BRFplusBRFplus_TOOL with the following input:
ns ORE eel
@
(Analyse Planning Function
© Geeate BRFplus Function
Planning Function
BF plus Appicaton Name {_SIMPLE_DTSCOWNT
BRFplus Function Name \SIMPLE_DISCOUNT
Ocheck Consistency for Function
| Check consstency between planning function and BRFpIs function
@ check Consistency
Planning Function
Octheck Consistency
Function Type
As in the first example, the program will create a number of objects within the application
IP_SIMPLE_DISCOUNT, which we now need to enhance with the desired logic.
‘The BRFplus function SIMPLE_DISCOUNT has a slightly different signature than in the frst example — the
field S_GL_ACCT was moved from the structure | § BLOCK VALUES to the table structure S_DATA:
EE” community Network
a'® Function: SIMPLE_DISCOUNT, BRF Plus - Simple Discount
[cack || [psy || [8 Oreck | save || Actvate || Transport | | [Hf Osete|||[ wor,
General
‘Smulaton | Debvoger ||| Trees ||| Generate || Crest Coos Tempe ||| Asvaned Gres,
Mose: | Event Moge v
FEDIEssioresRutesets cove Generation
Context
2 Aas Existing Data Object || [73 Add New Data Object ,|| | [3 Remove ||| dy || D™
"Ey, Component Name Text Type
IERPECOH AO Tabi
S.DATA ‘Structure
efs.cL Acct i Account Benen Tex)
ef S.ANOUNT JERPIAMOUNT ‘lement Nnber
8 S.QUANTY JERPROUANTY Element (number)
7 see1.8_BLOCK VALUES 1.8 BLOCK VALUES ‘Sructve
We now create the Rule Set RS_DISCOUNT and assign it to the function SIMPLE_DISCOUNT:
© Function: SIMPLE_DISCOUNT, BRF Plus - Simple Discount
(eck) [centr | [se cee ][ 8 sore | [5k Acne ][ Ge Taonoe }|[ ose | [Mee]
General
Detail
‘Smuiaton || Debugger ||| Tares ||| Generate ||| Crate Cove Tenost ||| Advanced Chels,
woce- | Event ooe .
Sonate EC BE 6202 Generator
Ruleset
Name Tet Proty «Enabled “Precondition —=—Stahs—Exautatle
GRS_OSCOUNT Calle ascoutanupca. (undstnes) Yer . 7
‘Within the rule set, we create two rules:
EE community Network
28‘© Ruleset: RS_DISCOUNT, Calculate discount and upd.
‘task Ges ||| Gch | hse | [+ Att | Tonat | [ose woe,
General o
Detail =
‘Sow Raw Hae” ||| Cand Ovevew
Rules OL
‘owt Rae | aot Gorton,
© [DRS5E RG] cy ue cac acount rt ns ind cone, 7%
(sonar ons 0874 ater procesing RAD REVENUE ACCOUNT UNE
(2) Change 8° 947A AUNT ate roewoNg f CALCULATE. DISCOUNT
cota 2%
Unies Vat
0 [is | ae: set Saco
(11 Cnan vate of 85 OATS GL ACCT to o00010000|
(2) Change FECT ONTA amar procesing 7 O=LETE O1SCOUNT LINE
(9) sort values into EC. OATA tome 04TH
Rule “Calculate discounts”
In a table operation - READ_REVENUE_ACCOUNT_LINE - we try reading the line from C_TH_DATA with
account number = 800000, store the result in the structure data abject $_DATA. If no such line exists, we stil
proceed, with a result value of 0:
© Table Operation: READ_REVENUE_ACCOUNT_LINE, Read Revenue Account line
a) |) | EI
General
Detail
‘Context Overview | | Stat Sutton |
Description: From table FEC™TH_OATS get the first row and return the result in 21» C_TH_DATA'S DATA,
‘win selection conditions: @ s ci ACCT is equal to © Sez) 600000
We then calcutate the discount using a BRF Formula - *CALCULATE_DISCOUNT’:
EE community Network
29® Formul -ALCULATE_DISCOUNT, Calculate discount
|< Back ||| @p Display || | ZB cneck || GB save || | Acwate |/ Gy Transport | || fi] Dette ,| || More,
General
Detail
‘Switch to Expert Mode || | Context Overview ||| Start Simulation
Resut Data Object
af LN DISCOUNT:
LN_DISCOUNT =-1 = HI( C_TH_DATA-S_AMOUNT / 10 )
‘@ Move Cursor || Move Cursor => | | | <2 Move Token | Move Token «> || fi Delete Token
Rule “Insert discount
In this rule, we fill the account field of the structure S_DATA with the fixed discount account number 810000.
We then delete the discount account line from the input data, if such a line exists:
® Table Operation: DELETE_DISCOUNT_LINE, Delete Discount Account lit
[e-Back | | [dp Dispay || | £8 Check || GQ Save | |[ + Actvate || Gp Transpor | || fi] Ostet ||| More
General
Finally, we insert the new discount account line into the table C_TH_DATA.
Execution of the BRFplus Function SIMPLE_DISCOUNT
‘The result of the execution of the BRFplus Function SIMPLE_DISCOUNT is illustrated by the following two
pictures.
EE community Network
30Before execution of SIMPLE_DISCOUNT:
[amount —[Quaniy|
(Moterial Group | ___Customer G/L Account \Unitof Measure| EUR] Pc]
fe Services fon evenves inter 1f6s000 [Piece 200.00 | 0.00
seis revenuee-dom, {000000 [Pcs e000) 000
lz Revenues inter. 1 [50000 [Piece so.c0 | 0.00
everves inter. 1 [05000 [Pece 000.00 | 0.00
soles revenuee-dom, [200000 [Piece 0.00 | 0.00
After execution of SIMPLE_DISCOUNT:
T [aroune_quoniy
‘Material Group
to
Technical Prerequisites
To use the BRFplus Planning Function Type, you need at least SAP NetWeaver Version NW 7.40 SP.
Current front-end technologies such as Bex Web, Analysis Office und EPM Add-in provide unrestricted
Support for the functionality; Analysis Office as of Version 1.4x and EPM as of Version 10.0 SP20.
https:/Mhelp sap.com/saphelp_nw70ehp* /helpdata/en/43/8b85cSdb216 14fe10000000a1553/7/content.htm?fra
meset=/en/d8/38bb4006d9c¢38e 100000008155 106/frameset him¤t_toc=/enidc/38bb4006d9cc38e 100,
000004155106/piain.him&node id=103&show_children=true#jump103,
https://en.wikipedia.orq/wikV/BRF plus
bttp:stwwy.sdn.sap.com/irj/scn/go/portaliprtrootdocsilibrary/uuid/30965164-efea-2b10-b7a7-
{262d1688b78?overridelayout=true&38012403731278
EE community Network
31EY community Network
32Copyright
© 2015 SAP SE SE or an SAP SE affliate company. All rights reserved
No part ofthis publication may be reproduced or transmitted in any
form of for any purpose without the express permission of SAP SE-
The information contained herein may be changed without prior notice,
‘Some software products marketed by SAP SE and its distributors contain proprietary software components
of other software vendors, National product specifications may vary.
“Those materials are provided by SAP SE and its affliated companies ("SAP SE Group’) for informational
purposes only, without representation or warranty of any kind, and SAP SE Group shall not be liable for
terrors or omissions with respect to the materials. The only warranties for SAP SE Group products and
services are those that are set forth in the exoress warranty statements accompanying such products and
services, if any. Nothing herein should be construed as constituting an additional warranty.
‘SAP SE and other SAP SE products and services mentioned herein as well as their respective logos are
trademarks or registered trademarks of SAP SE in Germany and other countries.
Please see
hitp:/Iwny. sap com/corporate-en/legalicopyrighVindex.epxiitrademark
‘for additional trademark information and notices.
EY community Network