You are on page 1of 88

Contents:

Data Extraction from ECC:


Data Extraction
Infocubes and Multiprovider
How Actual Data is brought into BW and what changes we need to do
User Entry of Data at YTD level and to distribute for all the months
BEX:
1. Input Ready Query
2. BEx query differences between using Posted Values, Char Rel and Master Data
3. Inverse Formulas
4. Difference between BEx Filter and Planning Filter
5. Characteristic Relationships
6. SAP BPC Static vs Dynamic Filter
7. BEx customer Exit info

FOX Formulas
8. Allocations Examples
9. Standard Planning Functions
a. Copy Function
b. Repost Function
c. Forecast Function
d. Write Back Function
e. Currency Translation Function
f. Distribution by Reference Data
10. Custom Planning Functions
11. Call Function Module from FOX Formula
12. Calling Process Chain from FOX Formulas
13. AMDP Interfaces, CLASS and Super Class
14. FOX – Fields to be changed vs Fields for Condition
15. Ref Data
16. Planning Sequences

Settings in RSPL1 and RSPLSE


17. Data Slices
18. Difference Between Data Slices and Work Status
19. Retraction
20. Data Lock by Users and how to handle it

AO – Analysis for Office


21. Creating Master Data on the Fly
22. SAP BPC Comments in AO
23. Analysis for Office Custom Menu
24. Butterfly Reports in EPM Addin and AO
25. Rolling Forecast – EPM Add-In
26. Rolling Forecast – 10.1 - Embedded
27. Setting to run default Planning Sequence on saving Data in AO:

Others
28. SAP BPC Audit
29. Performance Tuning – 10.1 Embedded
30. Performance Tuning – 10.0 Standard

Data Structures
1. ACDOCA – Actual Data in the Table
2. Creation of Views on ACDOCA Table
3. Creation of Actual and Plan DSO
4. Non S4 HANA Datasources
5. BW HANA Modeling

BEX Query and Planning Functions:


Input Ready Query: CONTENTS
Things to do to make BEx query an Input enabled query:

a. Change the Real time cube / ADSO to Planning mode


b. Set the Query property to “Start Query in Change Mode”
c. Each of the Key Figure that need to be Input enabled to set in Planning tab as “Input Ready”
d. Check that all combinations of all the characteristics that are valid only be available in the query selection.
e. See that all Characteristic members are base Members.

BEx query differences between using Posted Values, Char Rel and Master Data CONTENTS
We use the following for Characteristics members’ selection when:
Posted Values – When we want to use only the Characteristic members that are available in the Actual
Cube/DSO
Characteristic Relationships – When we want only particular combinations of the Characteristics that as per
the requirements are valid.
Master Data Values – We use this selection when we want the values of the Characteristic members that are
available as Master Data for that particular characteristic.

Inverse Formulas in BEx for Driver Based Planning CONTENTS


Inverse Formulas

Difference between BEx Filter and Planning Filter CONTENTS


BEx filter is used to restrict a Data set from the Cube data so that the Input Form will have only the selected
Characteristic values that are relevant for the working of the Input Form.
Planning Filter that is created in RSPLAN for each of the Planning Function will work in a way that the logic
that is created for the planning function will be restricted on the characteristic members that are in the Filter.
This filter generally contains the Target values for eg the values that will be changed in the Target
Characteristics that actually change during the execution of the Planning Function.
Eg: Of all the GL Accounts, we may restrict the BEx filter to show only for eg: Cash and Cash Equivalent Node
on the GL Hierarchy. When it comes to Planning Filter, the GL Account may be required to work on only a
single GL Account under the Cash and Cash Equivalent Node.

What are the different Standard Planning Functions CONTENTS


Standard Planning Functions
Custom Planning Functions Examples CONTENTS
Custom Planning Functions are of 2 types:
a. Using FOX Formulas FOX Formulas
b. Using AMDP (with or without SQL script) AMDP

How to call Function Module from Planning Function CONTENTS

Triggering a Process Chain in FOX Formulas CONTENTS

Planning Function Fields to be changed/Fields for Conditions CONTENTS


In Planning Function, Fields to be changed are the ones that will be changed when the Planning Function is
executed i.e. the ones that are actually affected based on the source data. For eg: If a Agg level contains
several characteristics but Price changes with Fiscal Period and Material, we need to take only these as fields
to be changed.
In case of Fields for Conditions, condition is to be applied on characteristic(s), when we want some values of
that characteristic to be treated differently. For eg: We can use MATL_GROUP for conditions if say the
calculation of discount is based on particular values of the MATL_GROUP.

What is Ref Data and when do we use it CONTENTS

Reference data is the data a planning function needs to read, which is outside the selection of the filter under
which the function is currently running. So for the same function, reference data can change when running
under different filters. Reference data can only be read, not modified - I am sure that is already clear. And also,
the selection corresponding to reference data is not locked by planning.

Whenever you put any selection (inside the curly braces - {}) on the right hand side of the equal sign (talking
about Fox), and if this selection is not contained in the filter, this data will be read as reference data. Also,
statement like FOREACH in REFDATA will read reference data. Regarding the amount of data that is read
(and hence the performance impact), it depends on factors like master data (for eg, in the Foreach statement in
your code, it must be slow becuase of the huge master data that CCODE might be having), and number of
records in cube, that are being read. You cannot really "define" reference data using code - it will be
determined at run-time.
Reference Data is that part of the Data Subset that is formed because they have been selected in the Fields to
be changed.
So in case we use Key Word IN REFDATA in the FOREACH statement, the characteristic that is mentioned in
the FOREACH statement takes data only from that Characteristics Source Data but not from the Master data
of that characteristic.

Planning Sequences CONTENTS


Planning Sequences can be used to trigger a series of Planning Functions when different Planning Functions
are needed to be executed one by one.
In Planning Sequence, we need to mention the Agg level, Planning Filters for each of the Planning Function in
the Planning sequence.

Creation of Data Slices CONTENTS

Differences between Work Status and Data Slices CONTENTS


If you have levels of approval that follow hierarchy of some Dimension, say Cost center, then Work status can be more
suitable for your purpose. If you need to lock data based on some other criteria then Data slice can be better for you.

Characteristic Relationships creation and Usage CONTENTS

Retraction CONTENTS
We have used the Retraction process using BAdI. The step by step process is:

1. In BPC 10.1 Embedded we used the Retraction process to retract some of the Planned expenses, planned at the
the HQ level to be Allocated in ECC using the Assessment cycles process. This is becaue the Users wanted to run
Assessment cycles in ECC on the same conditions that are created for the Actual Data allocation and the
allocated data is saved for the same Budget version. Then this data is extracted back to BPC so that these costs
will be available at the required Cost Centers. The tales to which data was extracted was to some T811 tables, if
I remember correctly.

2. In AO input form from which the user needs to trigger the Retraction Process, we create a button and link the
Macro to trigger a Planning Function.

Sub retract()
Dim lResult As Long
lResult = Application.Run("SAPExecutePlanningSequence", "PS_4")

3. We created a Custome Planning Function Type providing with the CLASS name we create as follows:

Steps:
a. In SE18, create an Enhancement Spot and we can see the Interface, Filter and Implementations
b. Under Implmentations, we create a new BADi Implementation with a new Enhancement
Implemantation
c. Under the BADi Implementation name we can create new Implementation Class and Filter
d. Under Filter, we can create a new Filter combination
e. Under Implementations, we can assign a super class. This super class will provide us with the
inherited Methods which are used for writing the actual logic code. We can even redefine the
inherited Methods to suit your implementation needs.
f. We can define the method IF_UJD_RETRACT  RETRACT to implement out logic.
4. We provide the Parameter as “Structure” ------ Steps

Rolling Forecast config in BEx


Master data from S/4 HANA in HANA modeling:
Master Data in S/4 HANA is either got from the following:

a. BW Content delivered S/4 HANA related master data infoobjects with /ERP/ eg: /ERP/COSTCNTR
b. Any non BW delivered or Custom Infoobjects to be based on S/4 HANA tables, custom HANA views need to be created on
tables from S/4 HANA with the needed Master Data Infoobject structure
c. If any Local Infoobjects (that are not from S/4 HANA but needed for some purpose in BPC), we can create them as
Infoobjects with Generic Access and populate them directly from ‘Maintain Master Data’ in HANA. Eg: VERSION as a
Custom Infooject

 Each ERP master data field has a corresponding BW field in the delivered BW content for SAP S/4HANA. The BW
master data field is called Info Object in BW.
 Both fields communicate using a delivered SAP HANA view which points to the source data table in ERP.
 Master data is read at runtime from the ERP source.
 The corresponding BW Info Object is included in the virtual provider for Actual data in BW, in the plan provider and in
the content Multi Provider /ERP/SFIN_M01.
Data Structures: CONTENTS
For HANA view on ACDOCA and Customization

Actual Data that ACDOCA table will contain:


One Database – ACDOCA
The ACDOCA Table helps to keep Reports and tables in one database itself. It does not need to store balanced and open
items separately.

However, this was not the same way in SAP’s ECC model. In ECC, the system stores SAP General Ledger (G/L), customer
and vendor balances and open items in various database tables to support reporting.
All the fields from sub-modules of S/4HANA Finance are available in the table ACDOCA. These Sub-modules are:
 Controlling (CO)
 Asset Accounting (FI-AA)
 Material Ledger (ML)
 Profitability Analysis (CO-PA) and more.

Secondary Cost Element in S/4HANA


Now in SAP S/4HANA Finance, we can create secondary cost elements as G/L accounts. Consequently, it allows the
financial statements version as well to include and show secondary cost elements.
However, in the earlier version of SAP (ECC), the FI (i.e. the financials) does not include secondary cost elements. As a
result, the financial statements could not display the secondary cost elements.

Advantages of ACDOCA table:


a. One Line Item table with full details of many applications
b. Secondary Cost Elements are GL Accounts
c. No Data redundancy and no reconciliation needed
d. BW can consume this data without need for extraction in case if S4 HANA and BW are on the same system. Else
we need to extract only the ACDOCA table data instead of several Extractors that were used in ECC.
e. Management Accounting, Asset Accounting and Material Ledger are covered in the ACDOCA table. In other
words, we shall have the data belonging to GL, CO, AA, ML and Profitability Analysis in the ACDOCA table.
f. Needed actual data for long running orders/projects from COSP_BAK, COSS_BAK is
stored in table ACDOCA. Currently, COBK is written as before. Target is to replace COBK
through BKPF.
g. For Non Actual Data, Value Types other than “04” and “11” (Actual Value Types) are still available in COEP,
COSP_BAK, COSS_BAK tables.
BSEG – Account Document Segment Data
FAGLFLEXT – General Legder – Totals table (for Leading Ledger)
COSP – Cost Totals for External Postings Data
COEP – CO Object – Line Items by Period Data
COSS – Co Object – Cost Totals for Internal Postings
Note: External Postings – Postings from FI module to CO
Internal Postings – Cost Movement Postings happening between different entities like Cost Center etc in
CO.
Actual Data from ACDOCA – How to create views and Load to an ADSO CONTENTS
There are 3 ways to load data from ACDOCA table to an ADSO:
a. We can also use an Open ODS view or a Data Source between the S/4HANA table/view and the ADSO.
b. We can put the HANA view into a composite provider. Then create a data flow to transfer data from the composite
provider into the ADSO. Trigger the data movement using DTP.
c. Create a "custom planning function type" as AMDP. In the SQL Script, simply select the data from the HANA view
into the e_view. Create a planning function and planning sequence to trigger the data movement.

How to create HANA View on ACDOCA table and creating a Plan Infoprovider under Multiprovider (We can
use ODSO for Actual and ADSO for Plan in a Composite Provider from BW 7.4 SP 10):
CONTENTS
There is a standard delivered Calculation view that is available on the ACDOCA table from S4 HANA,
“FCO_C_IBP_ACDOCA”, which can be used to save data into a delivered Virtual Provider /ERP/SFIN_V01
which reads data in real time from the ACDOCA table.

Customization: In case of customization is required for the Calculation View: “FCO_C_IBP_ACDOCA”, we can
create a new Calculation View by coping this and going in for the required customization.
We can create a Standard Infocube/ODSO/ADSO for the Actual Data. We can also copy the same
Cube/ODSO/ADSO structure to create a Real-Time Infocube/ADSO for the Plan data and create a
Multiprovider/Composite Provider with a Union. We can create an Aggregation Level on this to use it as a
base for creating a BEx query and use it in the Analysis for Office Report/Input Form
How to save Plan Data into ACDOCP table

Non S4 HANA Actual Data Sources CONTENTS


If S4 HANA is not being used a s a source system, we use the normal ECC Extractors for various data from ECC:
GL Accounts: (For Revenue and Cost Planning; Treasury Planning,)

0FI_GL_12 – New GL Balances Data


OPEX Planning - Extractors:

0CO_OM_CCA_20 – Cost Centers: Costs and Allocations Data

This DataSource supplies costs (primary and secondary) and quantities posted to cost centers (actual, plan,
and commitments).These costs could have been posted to the cost centers as primary cost postings or internal
allocations.
CAPEX Planning - Asset Accounting:

0FI_AA_01 – Asset Accounting: Posted Depreciation


The DataSource supplies periodic asset values, including posted depreciation.
0FI_AA_11 – Asset Accounting – Transactions
This DataSource supplies the transaction data and annual plan values for fixed assets
0FI_AA_12 - Asset Accounting: Posted Depreciation
This DataSource supplies the values of depreciation postings by period. Depreciation values are simulated for
periods that were not yet posted.

Difference between BPC 10.1 Embedded and 10.1 NW

Standard Cube, Real Time Cube and Multiprovider Usage

ODSO, ADSO and Composite Provider Usage

HANA Views
How to create Attribute, Analytical and Calculation Views

Standard and Custom HANA views

Data Compression in Infocubes and Delta Merge in HANA

Analysis for Office

Standard Macros and SAP Functions

Calling Planning Seq and Planning Functions from VBA Macros

Custom Cascading Style Sheets

Local Formulas and Saving Data

Custom Class with Interfaces for AMDPs based on ABAP and SQL (HANA) implementations: CONTENTS

A base class or Super Class is needed for the type of Interfaces that will be needed to implement the logic. For
example we can have one super class for Characteristic Relationships, one for the Master Data on the Fly etc.
For HANA related SQL implementations in HANA modeller:
IF_RSPLS_CR_EXIT_HDB – Highlighted part is from the super class
IF_AMDP_MARKER_HDB
For ABAP related implementation in BW:

Locking of Cells
Creating Master Data on the FLY CONTENTS
To achieve this we need to create an AO Input Form where in the Users can enter the names of the New Master Data
for any given Characteristic and any Key Figures for which data need to be entered

Procedure:

a. Switch on Master Data Table and Hierarchy to the Characteristic that we need to create Master Data on the Fly.
b. We create a Direct Update DSO/ADSO with the Characteristic and with the KFs and also any other
characteristics that are necessary.
c. We then create an Aggregation Level on this DSO.
d. We create an Input-ready BEx query.
e. We create a Custom Planning Function Type in RSPLF1 and in the CLASS, we create a Custom CLASS.

f. 3 Parameters are created as below:

g. the class ZCL_RSPL_INPUT_MD, we have implemented both interface below

 IF_RSPLFA_SRVTYPE_IMP_EXEC – For ABAP implementation


 IF_RSPLFA_SRVTYPE_TREX_EXEC – For SQL code implementation

In class  EXECUTE method, UPDATE_MD method will be called.


h. Create a Planning Function using the Custom Planning Function Type and in it assign the Characteristic
for which we need to create Master Data to I_IOBJ
i. Create Variables for the Master data Node and Member so that the Users can enter them.
j. Create a new button and assign macros to it to execute the Planning Function. Use the following
macros code:
lResult = Application.Run(“SAPExecutePlanningFunction”, “PF_1”)
lResult = Application.Run(“SAPExecuteCommand”, “Restart”, “ALL”)
k. In our Project we created Master Data on the Fly for the characteristic “0PROJECT” with all other
attributes without any hierarchy. Variables are created for the Characteristic and all the attributes and
these variables are assigned in the Planning Function as follows:
Miscellaneous

Security
RSCADMIN
PFCG
BPC Web Teams, Task Profile, Data Access Profile

Transports – in 10.1 Embedded and BPC 11

BPFs – Calling them in AO

Work Status Config and Calling from AO


Standard Planning Functions: CONTENTS
Copy Function: CONTENTS
Fields to be changed:

Parameters:
From:

To

KFs selection:
Repost: CONTENTS
The REPOST function is used to create new records in the Target selection while deleting the source records.
There are 3 places where this repost can be applied:
a. Repost
b. Reposting by Characteristic relationships maintained in a DSO or as an Attribute.
c. Reposting DSO data while physically deleting the reposted source data in the DSO

a. Repost
In this simple Repost Planning Function, Data from the Source selections are deleted and reposted to the
Target selections
Then we create Source selections and Target selections in the Parameters tab. When we run this Planning
Function, the source records will be deleted and the target records will be created.
You use function type Repost DSO Data and Physically Delete Source Data to post the key figures of existing
characteristic combinations to other combinations. All source data from a DataStore object is deleted which
means that the selected combinations of the Characteristic values will be reposted to another set of selected
Characteristic values while deleting the original selected records.

Planning Function Configuration


Same as Copy Function

Forecast: CONTENTS
This Planning Function is used to create Forecast Data for a selected Time Characteristic that can be applied
to any or all Key Figures based on the selected Historic Time Period to be applied for the selected Forecast
period and based on the Forecast Parameters/Forecast Strategy such as:

Configuration:
Time Characteristic selection for change

Forecast Configuration in “Parameters”


In Forecast Time Frame, we can select the Periods for which the Forecast is to be done.
In Historic Time Frame, we can select the Periods based on which the Forecast is to be done.
In Selection of Historic Data, we can select for eg Fiscal Year and select values for the historic Data, for eg:
2018 for the forecast of FY 2020

Write Back Planning Function: CONTENTS


This is used to save back data from the AO Input Form where certain logic has to be applied before saving the
data to the Plan ADSO/Cube. For eg: Data entered at the parent level that needs to be distributed to the base
level members before saving to the ADSO/Cube.
Changes to code has to be done here:

Currency Translation Planning Function: CONTENTS


This Planning Function is used to save the data planned in the AO Input Form in one Currency (say for eg
Company code Currency) to another currency (for eg Group Currency) before saving to the Plan ADSO/Cube.
Configuration
Select the CURRENCY KEY (0CURRENCY) and any other Characteristics if you want to have any conditions on
other Characteristics

In “Parameters”
Select and fix the Target Key Figure, Source Key Figure and the Currency Translation Type.
And similarly the Source Key Figure and Currency Translation Type.
For Configuring the Currency Translation Type, use already existing one or create a new one in the T Code
RSCURR.

We can set the Exchange Rate Determination to be taken dynamically or from an Infoobject
Fix Source Currency and Target Currency from the following options
In our case, as the translation will be required to convert amount from any Local Currency to the Group
Currency. So the Source Currency will be the Currency of the amount to be converted and the Target
Currency will be that of the Group Currency.
Save and use this in the “Currency Translation Type” in the Currency Translation Planning Function.
We can create a button in the AO Form to trigger the Currency Translation and the currencies of the amounts
in the AO Form will be translated to the desired currency.

FOX Formulas: CONTENTS


FOX Formulas are defined in the Planning Function Type “FORMULA”. We can have a simple FOX code to
complete some logic/calculation to be performed on the source data and also a Function Module can be used
to perform some logic through a predefined Function Module
Types of FOX:
a. Simple FOX Code Simple FOX
b. FOX Code calling a Function Module FOX Calling FM

FOX Formulas, in general, contain initial page where we can select


a. Fields to be Change
b. Fields for Conditions
The FOX Code generally contains 2 parts:
a. Data Declarations
DATA <variable name> TYPE <Datatype>
Eg: DATA FISCPER TYPE 0FISCPER
b. Operations
{Keyfigurename, Infoobject1, Infoobject2…..}
Important Points to be noted when using FOX Formulas:
a. Planning Filter contains the Target Values to be achieved and everything pertaining to “FROM” will be
in the Formula.
b. Fox formulas run on the Fields to be changed and this creates BLOCKS when the code is run, such that
the code runs once for values of each of the Fields that are marked for to be changed. So if we want to
run the code only once for all values, we can select all the Fields that are available. Even in ABAP or
AMDP codes, in TCODE: RSPLF1, we can maintain as “WITHOUT BLOCKS”.
c. TO be able to run the Planning Function as soon as we SAVE data in the AO Input Form, we provide
the Planning Sequence that needs to be run in the Infoprovider ‘Central Settings” under “Save Plan
Data”.
Simple FOX
Example Code with explanation (for DO, VARC, VARV and VARI):

Data Declarations:
We have declared the 2 variables each for source ad Target for VERSION and FISCAL YEAR. Remember these
are the 2 characteristics that were selected as “fields to be changed”.
We have declared 2 INTEGER type variables one each for the Control (for Fiscal Year) and the other for the
Number of the Control values to be taken in the execution of the code (how many Fiscal years to be taken)
and we initialize C to 1.
Operations:
We get Source and Target versions entered by Users from the Variable Entry screen by using the Key Word
“VARV” (variable value) and providing the variable name.
Similarly we get the values for the Fiscal Years.
To get the Number of Fiscal Years for this operation we use the Key Word “VARC” to count the Number of
times and store in variable N.
We use Key word “DO” to loop the code for a certain number of times and in this case, the value returned by
the variable N.
Inside the Loop we get the Fiscal year values, one by one, we use the Key Word “VARI” to get the Nth value of
the variable (LINE 30)
LINE 33 is the operation/calculation that need to be performed within the loop.
Note: Each Keyfigure will be having the Fields to be changed accompanying it (OPERAND).
Eg: {0PRICE, TRG_FISCALYEAR, TRG_VERSION}
Finally we change C value to the next number by adding 1.
Example Code with explanation (FOREACH, IN REFDATA)
We are here calculating the Average Price the different prices for different Material Groups in the Source
Data.

Here we are calculation the Sum of Prices for several Material Groups (based on the Data that we have in the
source)
MATL_GROUP is the only field taken for Change and so only this is declared from the fields.
We also declare the SUM and N as FLOATING and INTEGER respectively and initialize them to 0.
FOREACH MATL_GROUP IN REFDATA
This command considers the values of the Field MATL_GROUP from the source data and Loops it one by one
at a time.
“IF” command is used to apply some conditions on the Source data. Here we are using it to not consider the
MATL_GROUP values that are “0” and NOT EQUAL to “#”.
IF NOT MATL_GROUP IS INITIAL AND MATL_GROUP <> “#”
SUM is calculated by deriving the Price as below and adding to SUM so the SUM gets added when the loop
gets executed.
SUM = {0PRICE, MATL_GROUP} + SUM
TO get the Number of times the loop has been run, we calculate the value of N by adding 1 for each loop run.
N=N+1
Then we calculate the Average price and save it against the MATL_GROUP: “#”.
Formula is: {0PRICE, #} = SUM/N
Example Code with explanation (INTERNAL TABLE, BREAK-POINT)

This code’s function is similar to the above code and does the same calculations but this uses the Internal
Table to store the MATL_GROUPs from the source data and then uses this to loop on to calculate the SUM
and subsequently the Average Price.
The initial declarations are the same but we additionally add the Internal Table declaration.
TABLE ITAB { L_MATL_GROUP TYPE 0MATL_GROUP KEY, L_PRICE TYPE F}
We need to declare an Internal Table with a Name and Type of the Characteristics to be considered and
declared it as KEY. This Internal Table also should contain at least one Key Figure.
Here ITAB is used to say that this is an Internal Table.
Name of the Internal Table is: L_MATL_GROUP
TYPE of Internal Table is: 0MATL_GROUP (Characteristic to be considered here)
Key Figure Name: L_PRICE
KEY FIGURE TYPE: F
For Debugging we use: BREAK_POINT Key word
For looping in the Internal Table to read the Price values for each of the MATL_GROUP we use the command:
FOREACH MATL_GROUP IN ITAB
To calculate the SUM we use the command:
SUM = ITAB. {L_PRICE, MATL_GROUP} + SUM
The Increment and the calculation of the Average Price is same as in the previous code.
Example Code with explanation (TO READ Data saved against fields not in the Fields to be changed:
Requirement: We have Price defined by MATERIAL and MATL_GROUP by FISCAL YEAR PERIOD and also Price
is planned at the MATL_GROUP level, we need to calculate.

Filter Excludes # for 0CURRENCY


We need to calculate Revenue which will have changes in 0CURRENCY and 0UNIT and they are taken in fields
to be changed

Declarations are similar to the previous codes. Here the important thing is how records are saved in the
Infocube:
MATERIA MATL_GROU FISCAL Posting 0CURRENC 0UNI 0QUANTIT REVENU
  L P YEAR PERIOD Y T 0PRICE Y E
Quantit
y F100-G1 YBF02 2016 1 # EA   25  
50002
Price # YBF02 2016 # EUR # 2    
Revenu 1250055
e F100-G1 YBF02 2016 1 EUR #     0
To read 0PRICE which is saved against the Characteristics MATL_GROUP, FISCAL YEAR ONLY, which will have
0CURRENCY of the fields to be changed but not 0UNIT.
So to read the data we use the following command:
PRICE = {0PRICE, CURRENCY, # | 0MATERIAL = #, 0FISCPER3 = #}
Calculation of REVENUE is the normal calculations.

FOX calling Function Module: CONTENTS


You can use the CALL FUNCTION statement to call function modules. To do this, enter the name of the
function module in transaction SM30, in table RSPLF_FDIR.
EXPORTING, IMPORTING and CHANGING parameters can be specified for the function modules. The
parameters have to have simple types ((F, I, D, STRING and types of characteristics and attributes). Class
references, structures, and table parameters are not permitted.
All compulsory IMPORTING parameters of a function module have to have data.
If the function module triggers an exception, you have to work with the MESSAGE ... RAISING construct. Class-
based exceptions are also allowed. The function module notifications are copied to the log.
Example Code:
DATA FISCPER TYPE 0FISCPER.
DATA FISCYEAR TYPE 0FISCYEAR.
DATA RATE TYPE F.
DATA KYF TYPE KEYFIGURE_NAME.
FOREACH FISCYEAR, KYF.
FISCPER = OBJV( ).
CALL FUNCTION UPF_DISTR_RATE_GET
EXPORTING
I_FISCPER = FISCPER
I_VERSION = 'OPTIMISTIC'
IMPORTING
E_RATE = RATE.
{KYF,FISCYEAR} = { KYF, FISCYEAR } * RATE.
ENDFOR.

Example for Calling a Process Chain in the FOX Formula Back

Steps:

1. Create a Process Chain with the required data load process.


2. Enter the name of the function module in transaction SM30, in table RSPLF_FDIR.
3. In RSPLAN in Planning Function Type “FORMULA”, select all the Characteristics in the Aggregation
Level (This Agg Level should have all the Characteristics that are in the Infoprovider).

4. In the Parameters Include the following code:

In case we want to make the calling of the Process Chain dynamic, we can create can User Input
variable to enable the user select the process chain.

AMDP (ABAP Maintained Database Procedures) BACK


Used in our Project: We have NOT used AMDP in our project but ABAP Function Modules.
AMDP is a used to write Database Procedures directly in ABAP and uses the SQL Script.
Using AMDP we can create ABAP Procedures in ABAP environment using ABAP methods and ABAP Data
Types.
Procedure for creating AMDP in BW using ABAP:
1. Create a Custom CLASS in SE80
2. Assign it to Superclass - A base class or Super Class is needed for the type of Interfaces
that will be needed to implement the logic. For example we can have one super class
for Characteristic Relationships, one for the Master Data on the Fly etc. Interfaces will
inherit from the Super class and also if needed, we can add new interfaces
OR

We can add interfaces such as this directly:


IF_RSPLFA_SRVTYPE_IMP_EXEC .
IF_RSPLFA_SRVTYPE_IMP_EXEC_REF – For using REF DATA
It will add the appropriate methods directly
3. Create a Custom Planning Type in RSPLF1 and set it up as per the requirement as
below:
 Add the class created and We can configure the Custom Planning Function Type
as below with Class entered as the CLASS we created and check box tick for
“Reference Data” as we shall we reading the data from some source reference
data and we can also tick check box “Without Blocks” when we want to run the
code in one go instead of basing on BLOCKS.
 In the PARAMETER, we can create NEW Parameters, like REFTAB to get
reference data from which table. We can create another Parameter called
REFSEL for indicating to the code what are the Reference Data selections to be
considered.

4. Set up required things in the Planning Function


 Put the Planning type as the one we created
 In Edit Parameter REFTAB we can provide selections by selecting the necessary
Infoobjects and then giving selection values by manual entry. If we use the User
entry variable in the place of the selection value, we can allow the user enter
the values when prompted from the AO work book.
5. We can create the needed code for the logic implementation in the code in SE80.
6. When we run the Planning function, the code wil be executed and will produce the
desired results
Procedure for AMDP using HANA SQL:
1. Create a Custom CLASS in SE80
2. Assign it to Superclass - A base class or Super Class is needed for the type of Interfaces that will
be needed to implement the logic. For example we can have one super class for Characteristic
Relationships, one for the Master Data on the Fly etc.
Interfaces will inherit from the Super class and also if needed, we can add new interfaces
3. Based on the need, on what we want to achieve in the logic, if needed, we need to create a
Structures where the logic can be implemented with the nedded BW Infoobjects.
4. Add AMDP Marker Interface: IF_AMDP_MARKER_HDB in code in HANA eclipse
5. We can add the required methods
6. Add required code
7. Create a Custom Planning Type in RSPLF1 and set it up as per the requirement
8. Set up required things in the Planning Function

Example and Procedure of creating an AMDP:


Requirement: Revenue (ERLOS) needs to be calculated based on the formula:
REVENUE = PRICE*QUANTITY
The Quantity and Price are either User entered or read from some source data and is available as Reference
Data.
We create a CLASS to have this calculation

Steps to create Planning Function as AMDP:


1. In SE80, we create the Class

2. After creating and saving CLASS, we can Add Interfaces in either INTERFACES tab or under Source
Code-Based which we have done in the next slide:

3. When we add the Interfaces and Activate them, we can see the Methods available as below:
4. We shall create now a Custom Planning Function Type in the T code RSPLF1 with Planning Function
Name same as the Class:

5. We can configure the Custom Planning Function Type as below with Class entered as the CLASS we
created and check box tick for “Reference Data” as we shall we reading the data from some source
reference data and we can also tick check box “Without Blocks” when we want to run the code in one
go instead of basing on BLOCKS
6. We now create the Parameter for the Custom Planning Function Type which will be a Parameter Type
of “Structure” and ticking the check box “Parameter is Tabular”
7. We now create another Parameter under the previous Parameter for Data selection as parameter
Type “Data Selection” as follows:

Explanation on “Without Blocks”: When we generally run the Planning Function, based on the method, any of
the below highlighted methods can be used based on the requirement such as INIT_EXECUTION,
END_EXECUTION etc but in this case we will go in for EXECUTE and also want to execute this in one go
without blocks as mentioned above we check the box Without Blocks in the Planning Function Definition

8. We

create a Planning Function using the Custom Planning Function we have created previously as follows:
As we have used WITHOUT BLOCKS, we see no “Fields to be Changed”

9. Now we create “Table for Reference Data” by clicking on EDIT

Then selecting the variables for the required fields, in this case, for VERSION and FISCAL YEAR.
10. We now create code for the different methods. For the CLASS: GET_REF_DATA_SEL we create as
below under “Protected Section”:

And Under the Method create the code as follows:


For EXECUTE method just add the CLEAR Statement to clear the Data table as below:

11. To we need to see that this Logic is directed towards the SQL code and for that the steps are:
a. Create a CLASS in Eclipse in HANA studio, under the ABAP Project:

b. Create an INTERFACE as follows under PUBLIC section. This will contain all the fields that are in the
Info cube:
c. We also add METHOD to this where i_t_data will have our source data, ref_data will have the
reference data and e_t_data will have the result data.
In the CLASS IMPLEMENTATION zcl_amdp_prod_all_erlos, we add the following method

d. Now we need to add the Connection between the CLASS we have created to be executed in the
Planning Function to the SQL CLASS and so in the CLASS for the Planning Function we add the
following METHOD in the place of the METHOD for the EXECUTE

From the highlighted 2nd and 3rd Lines, we can call the SQL CLASS from the Planning Function CLASS.

Inverse Formulas Creation and usage: CONTENTS


Inverse Formulas can be used where there is a calculation that is to be performed when you enter one values
or more than one value and the calculation gives the calculated values based on the formula and in cases
where you want to change the result and based on the formula want to calulate one of the values. All the
entered and calculated values can be saved to the system based on a Planning function.
Eg:
1. We want to enter a Bonus rates and simulate the amounts for different Grades based on the
basic salary of the particular Grades.
2. We want to enter a Interest rates and simulate the amounts for different types of Loans based
on the Principal Amount of the particular Loan.

Inverse Formulas are used to do what-If-Analysis where a forward formula (Carrier Group) components can
be used to be given desired values (for any one of the components at a time) and this will calculate the
original forward formula result based on the changed components.
Amount = Qty * Price
When Inverse formulas are configured, for eg, if we change the Qty, for the same Price, Amount would be
configured.
Refer to the following link:
https://blogs.sap.com/2014/11/07/cell-locking-and-inverse-formula-in-sap-bpc-101-unified-model/
Important Points:
We can use the following in the Inverse Formulas:
i. Basic or restricted Key Figures
ii. Constants or reporting formulas – these formulas do not change if even manual change is made
during server round trip.
iii. Other Forward (Carrier) formula group
iv. We need to create Inverse formulas in query designer for Input Ready forward formula group
related components.
v. All elements in the formula group should either be in the Key Figure structure or in Exception cells
(only when query has 2 structures)
Others:
vi. Exception: %GT (“Percentage of Grand Total”) - If you want to calculate the percentage of the
grand total, choose formula F= %GT. Only one operand is allowed in this case. This operand must
be a basic key figure or a restricted key figure with disaggregation activated. You do not need to
define an inverse formula.
vii. Formulas can use a formula of type Replacement Path but they cannot be nested.
viii. Inverse formulas are always hidden.
Configuration:
a. Create a new Calculated Key Figure with the required formula as below

b. In HANA Query Designer, in General tab under the Planning settings, check box the option
“Symmetrical Calculation mode” and this option sets the Inverse formulas for the components of the
original formula as follows (we need to also change the Option for this CKF as Input Ready)
c. Edit this newly created Inverse Formula as per the requirement and the priority for calculation of the
Inverse formulas is from top to bottom ie. The original forward formula is first priority followed by the
inverse formulas

Characteristic Relationships and their Usage: Contents


Char Relationships are generally used for the following:

Characteristic Relationships are used to get the valid combinations of the relevant characteristics that are
permissible by the Business Requirement.
Eg: Material - Material Group
Cost Center - Profit Center
HR Position - Payroll Area
Scenarios for Characteristic Relationships:
You can define characteristic relationships for the master data of a characteristic
a. Attribute (Type attribute)
b. hierarchy (type hierarchy),
c. DataStore object (type DataStore)
d. an exit class (type exit).
Configuration of Characteristic Relationships with Derivation – Type ATTRIBUTE:
In this example we have Material in the Agg Level but the Material Group, though present in the Infoprovider
is not available in the Agg Level.

So, when we save data against the Material in the AO Input Form, we shall not be populating the Material
Group in the Infoprovider.
We can configure this characteristic derivation of Material Group, by using the Chacteristic Relationships as
follows:
In the RSPLAN, Infoprovider tab, we can configure the characteristic relationships in the following way

After the config, if the data is entered for the Material again and saved the Material Group would have been
derived as below:
Configuring the Characteristic Relationships to display only Valid Combinations:
When we are not using Characteristic Relationships for any characteristic that is in the Input-Ready Query, all
invalid combinations may be seen in the AO Input form and except the valid ones, all the other invalid
combinations will not be input ready.

So to avoid invalid combinations, we configure the required characteristic in BEx query designer to take from
Characteristic Relationships which are configured in the RSPLAN Infoprovider (as shown in above slides)

Then in AO we get only the valid combinations that are inputtable


Configuring the Characteristic Relationships using a DSO:
>>>>Eg from Toyota Project: In ECC they had only Product as a basic Master Data but users would want to see
the other only BW/BPC related attributes combinations while planning the data, such as:>>>>>
When the characteristic doesn’t have the other characteristic as an Attribute and also in cases where we
cannot derive the relationship from the Master data, we can maintain the valid combinations of the
characteristics in a DSO and this can be used to read data from, when the query is deriving the valid
combinations.
1. Maintain the valid combinations in a DSO and save
2. In RSPLAN, in the Characteristic Relationship tab, we select the Characteristic Relationship Type as
DSO and provide the source and the Target characteristics in it.
3. In BEx query, we configure the Target Characterstics to take data from the Characteristic Relationships

When we run the query, only valid combinations read from the DSO will appear in the AO input form.
4. To trigger the “Load Characteristics Combinations” from AO, we can create a Button, which can be
linked to a Planning Sequence, which in turn will trigger a Planning Function which will run a Process
Chain that triggers the load of the Characteristics Relationships combinations from a flat file
maintained by the Users, This flat file can also be placed in the SAP Directories in T code AL11 and the
path can be maintained in the related Infopackage.
Characteristic Relationship using EXIT:
This Exit type Characteristic Relationship can be useful to derive relations when the derivation is complex and
may involve some sort of lookup.
We can also use characteristic relationships using EXIT which can be configured similarly in the Infoprovider in
RSPLAN under the Characteristic Relationships tab.

Data Slice based LOCK/UNLOCK CONTENTS


We can Lock/Unlock data based on certain characteristics combination that determines the dataset to be
locked. We can use the Planning Function Type “FORMULA” for this and set the FLAG value for this
combination to 1 (for LOCK) and save it to a DSO from which the Data Slice based EXIT will read this value and
LOCK the Dataset.
Configuration of LOCK/UNLOCK using Data Slice:
1. We create an Aggregation level with the Characteristics on which the LOCK function is to be based.

2. We create a Planning Filter to have values for only the Target Characteristics (if variables are created
for eg for Fiscal Year and Version)
3. We create a Planning Function of Type “FORMULA” and in the Fields to be selected select all the
Characteristics that are required to Lock the Dataset.
4. In the Parameter section we add code to set the FLAG to 1 so that this will be saved to a DSO for
Locking the Data and ‘0” for unlocking the data. Two Planning Sequences will be created to run either
LOCK or UNLOCK and these Planning Sequences will be linked to the LOCK or UNLOCK Buttons in the
Analysis for Office Input Form in the VBA Macros.

This FLAG value saved in the DSO will be called in the Data Slice EXIT to Lock/Unlock the data.
5. On the Infoprovider on which we have created our Plan Agg Level, we configure the EXIT in the
Infoprovider in RSPLAN under DATA SLICE.
The EXIT CLASS that is triggered will have the following components:

The code for the Method is to be as follows:


The e_noinput = rs_c_true or false will lock and unlock the selected data set through
data slice

SAP BPC Audit on Multiprovider/Composite Provider: CONTENTS


On the ADSO which we need to have audit, check box the special Type: All Characteristics are Key

Create a new Composite Provider for the Audit:

Add the ADSO to this composite provider:


Tick check box “show audit characteristics in query”

Put the created Audit characteristics in the BEx query and use this in the AO:
SAP BPC Static and Dynamic Filters in BEx query: CONTENTS
Static filters are those which are hardcoded and cannot be changed by the users during the query run time.
Dynamic filters are the filters with variables that users can select just before the Query execution.

Comments in SAP BPC Analysis for Office: CONTENTS

STEPS INVOLVED FOR ENABLING COMMENTS IN BPC EMBEDDED

STEP 1: CREATE AN INFOOBJECT

An Infoobject ZCOMMENT2 is created as CHAR data type and of length 250 (maximum allowed)
STEP 2: CREATE AN ADSO

Create an ADSO (ZCOMM in the example below) use “Planning in Direct Update” template and
apply it. This will make the ADSO as the direct update ADSO.

Add infoobjects for G/L Account, Cost Center and ZCOMMENT2 to the ADSO created and click
on the ZCOMMENT infoobject and enable the check box “Use Characteristic as Key Figure”.
Additionally note that you should make all the non-key figure info objects participating in direct-
update-ADSO to be Key. This can be done by using the “manage keys” option in the screen
above.

STEP 3: ADD THE COMMENT ADSO TO THE COMPOSITE PROVIDER

Add the comment ADSO to the Composite Provider along with the other cubes/ADSOs.

Map the source infoobjects to the target infoobjects under scenario tab and activate the
Composite Provider.

STEP 4: CREATE AN AGGREGATION LEVEL ON TOP OF THE COMPOSITEPROVIDER


Create an aggregation level on top of the Composite Provider “ZACTPL_CP”

Add InfoProvider fields to the “Output” tab of the Aggregation Level.

STEP 5: CREATE A QUERY ON TOP OF AGGREGATION LEVEL


Check the check box “Start Query in Input Mode” under General tab.

Map the infocube to the infoobject under selection details under sheet definition tab for
“General” Properties.
Select Input-Ready under Planning properties under sheet definition tab for Plan, Amount and
Comment Infoobjects.

Select Master Data for G/L Account under Extended category under sheet definition tab.
 
STEP 6: ANALYSIS FOR OFFICE

Now you should be able to open the query in analysis for Office and save comments from it.
SAP BPC Analysis for Office (AO) Customize Menu in Menu Ribbon CONTENTS
Creating a profile
This customized ribbon typically looks like the default Analysis ribbon
Select File à Analysis à Customize Analysis à Customize User Interface
Using the dialog box Customize User Interface, you can create a profile by clicking Save As and then entering a
name for your profile in the dialog box that appears..
 Here is what the Customize User Interface dialog box looks like when customizing the Ribbon:

Customize Ribbon
On left side, click on Ribbon to select what is required to show in Analysis Ribbon.

Arrange

To arrange the groups or commands of a tab, Use the buttons to move up, move down and move to group. Use
the drag-and-drop to move an element inside or outside a node element, and into any level. Select to create a
new user profile and enter name as shown below (test). Save the profile.

 
Show or hide
 To hide or display all the sub-elements of a group or an element, select the group or element, then right
click and use the commands Show all Elements of and Hide all Elements of.
 Select or deselect the checkboxes in the tree view.
Create new tabs
You can create new tabs to customize, add additional element and specify where to position it, before or after
existing tabs amongst the tabs that are natively delivered with Microsoft Excel. In this blog, let us create a new
tab apart from the Analysis tab.

 To create or delete the groups or elements, use the New Group and New Sub-Element.

Add an image to represent the new group. On clicking OK, new group is created as shown below.
 

Now that a group is created, let us add a sub-element by choosing type among the list available.

For buttons, split buttons, and toggle buttons, VBA macros are required to call to perform the
actions.
 

For this blog, element type button is selected and an image has been added to click on it. A macro
has been attached to open website, www.visualbi.com by clicking on it.
 Click on Save and Close the window. To have these changes applied, the application needs to be
restarted.

 Now re-open the application to see applied changes. As highlighted below, Analysis tab is
customized with selected elements and a new tab has been created.

On a New Tab, you see a button to click which directs us to a website.

Dist by ref data CONTENTS


Used in our Project: Distribution of Tax Amounts by GL Account and Fiscal Period while the reference Data is
entered by the Tax Type and by Fiscal Year.
Distribution of Plan Data, planned at a lower granularity level can be done to higher granularity level by using
a Standard Planning Function: Distribution by Reference Data.
Eg: When the Planners want to Plan Quantity data on a Material Group and Fiscal year level but this data has
to be applied on the data at Material and Fiscal Period level apart from the Material Group and Fiscal Year
level, we can use this planning function which will distribute the Planned data to Material and fiscal period
level by using previous periods Material and Fiscal Period data as Reference Data.
Material and Fiscal Period level Reference Data:
Aggregated Plan Data at Material Group and Fiscal Year

When the data is Planned in this template, this is distributed at Material and Fiscal Period based on the data
in the detailed template at Material and Fiscal Period which belongs to previously saved data.
Configuration:

Planning Function:
Reference Data Selection:
From values

To Values – Excluding # for both Fiscal period and Material


Distribution by Keys:
Locking of Data by Users and how to handle it: CONTENTS
Based on the Filter and BW Query definition, locks are generated that allows the first user accessing the data
of the Infoprovider and denies access for the same filter selection to the 2 nd user and other users.
1. The 1st User will get an Exclusive Lock on the data set based on the BEx query definition and
filter in BEx.
2. Locks can be deleted by using the T code SM12.
3. To understand why the lock is happening, we need to go to the T code RSPLSE where we can
check the Locking Conflict entries created between the 1st users and other concurrent users.
4. If we want to configure data set locking for different users for different values of a
characteristic, we need to do the following:
a. In RSPLSE, we need to set any required characteristic(s) as Lock-Relevant and all other
Characteristics of the infoprovider to Lock-Nonrelevant
b. In the BEx we need to create separate queries based on the same query with different
filters for the Lock-Relevant Characteristic(s) and based on the Roles, authorization can
be provided to users to access only his relevant BEx query/AO workbook
c. When Users run their respective queries, they don’t face data Lock because the filter
values for Lock Characteristics are different to each user.
Performance Tuning in SAP BPC 10.1 Embedded: CONTENTS

1. In general, you can have approximately 100 concurrent BPC Users per each Application Server
instance, so if you have a higher number of concurrent users, at the very minimum you would need to
add some additional server dialogue instances. Keep in mind you will need to factor the number
of .NET servers as well, and whether or not you will be sharing any of these resources with other
installations and server components (like the database itself).
2. Data Volume:The data volume can have a significant impacton performance. Here we mean both
transaction and master data. Always remember to properly filter and select the data being operated
on.
Influence:Large volumes of Master Data (Dimension Members) have an impact on performance for
several aspects of BPC functionality, like Logon, MemberProcessing, Report formatting etc... Large
volumes of Transactional Data have a direct impact ondata retrieval times for reports and script logic.
When building reports that need to read large data volumes make sure that you keep your BPC cubes
optimized: we can compress the Infocube Data with Zero Elimination
Recommendation:
a. We recommend only keeping the necessary data in your cubes. Make sure you archive
that data not used anymore in your application.
b. In some case it might be of benefit to split your application into two cubes. For example,
if most of your reporting is based on the current and last year and for only very few
reports you might have to refer to data that is older than 2 years, in this case splitting
that data older than 2 years could be of benefit for the performance of your most used
reports.
c. Do as many calculations that are needed in BW, if it can be done, so that the
performance during the query/form run time will improve.
d. Keep the design of the Infoprovider and the aggregation level to the optimum. Create
as many Agg levels as needed so as to each one of them caters to a specific planning
requirement. But this also depends on the specific requirments as sometimes this may
need a few of the planning requirements to be done using a single Agg level.
e. Minimise the use of Macros in AO.
3. Logic Implementation:
a. Usage of efficient FOX logic:
 Restrict the values of the block characteristics in the filter as much as possible so that not
too many blocks are created.

Performance Tuning for BPC 10.0 Standard NW version: CONTENTS


1. In general, you can have approximately 100 concurrent BPC Users per each Application Server
instance, so if you have a higher number of concurrent users, at the very minimum you would need to
add some additional server dialogue instances. Keep in mind you will need to factor the number
of .NET servers as well, and whether or not you will be sharing any of these resources with other
installations and server components (like the database itself).
2. Data Volume:The data volume can have a significant impacton performance. Here we mean both
transaction and master data. Always remember to properly filter and select the data being operated
on.
a. Influence:Large volumes of Master Data (Dimension Members) have an impact on
performance for several aspects of BPC functionality. Large volumes of Transactional Data
have a direct impact ondata retrieval times for reports and logic implementation. When
building reports that need to read large data volumes make sure that you keep your BPC cubes
optimized: we can compress the Infocube Data with Zero Elimination
Recommendation:
a. We recommend only keeping the necessary data in your cubes. Make sure you archive
that data not used anymore in your application.
b. In some case it might be of benefit to split your application into two cubes. For example,
if most of your reporting is based on the current and last year and for only very few
reports you might have to refer to data that is older than 2 years, in this case splitting
that data older than 2 years could be of benefit for the performance of your most used
reports.

Rolling Forecast in SAP BPC 10.0 EPM Add-In: CONTENTS


1. Create a property like: CURR_MONTHNUM as a property to the TIME Dimension and allow the BPC
ADMIN to populate before going for the month’s Rolling Forecast
2. Create an Input Form with any time periods for 12 months.
3. Provide user selection for selecting the Current YEAR.
4. Use the Dimension Override EPM Function to get the user selected year in a separate cell.
5. Use Excel Formula in a separate cell to add .01 to the YEAR in the cell.
6. Use member offset function to add one month number to the selected cell period and do it for the
next 12 periods.
7. Use the EPM Member Property Function to retrive the maintained current Month Number.
8. Write an Excel Formula below each of the Time Periods in the Excel cells using IF to populate EPM
member ‘Actual’ if the Month Number in the Time period cell is less than or equal to the retrieved
CURR_MONTHNUM property else it would be ‘Forecast’
9. Once all the Version cells are populated, using EPMOLAPmemberO function to get both the Time
periods as well as the Version to the Input Form Data Entry area.
10. We can use the EPM Formatting in the EPM Formatting sheet to apply conditional formatting to either
enable or disable user entry based on the version and also grey out the Actual version cells.
Rolling Forecast – 10.1 Embedded: CONTENTS
1. We can create a Bex query with User Entry for Year and Month to be selected for Rolling Forecast in
AO
2. We can create 12 Restricted KFs which read data for the required 12 months based on the selected
Year and Month so that how many periods of Actual Data and how many periods of Forecast to be
allowed to be entered by the users.
3. To restrict the version for these RKFs, we can use Customer Exit variable using the selected Month and
Year, we can use a customer exit to fill the version as ACTUAL or FORECAST. The logic code reads the
selected Year and Month and by simple comparision of if this value is Less than or Equal to the RKF
Time value, it will return the version value as ACTUAL else as FORECAST.
4. If it is ACTUAL, data will be fetched from the BW cube (ECC data) for all the Actual months and for
Forecast, user input will be allowed.
5. We can have an AO Form where the user selects the Year and Month and the system populates the
appropriate Time and Version values and also the Actual values populated from ECC through BW.
6. We can create a SAVE button and use the Excel based Macro SAP Function to save the Inputted data.

Allocations Examples in BPC Embedded: CONTENTS


1. Allocation of general expenses which are incurred at the HQ level cost center to the other cost
centers.
2.

Customer Exits in BEx: CONTENTS


The used customer-exit has to following interface-definition based on the function module
EXIT_SAPLRRS0_001 and in include ZXRSRU01:

The parameters have the following meaning

 I_VNAM: Name of the Variable


 I_VARTYP: Type of the Variable
 I_IOBJNM: Used InfoObject
 I_S_COB_PRO: Structure with the properties of this InfoObject
 I_S_RKB1D: Structure with the properties of the executed query
 I_PERIV: Current fiscal-period
 I_T_VAR_RANGE: Selected Values of the variablen screen
 I_STEP: Processing Step
 E_T_RANGE: Result-Selection of the variable
 E_MEEHT, E_MEFAC, E_WAERS, E_WHFAC these fields are not used!
 C_S_CUSTOMER: Structure with steering data

e_noinput = rs_c_true or false is used for Data slice based lock and unlock

Regarding STEP in the customer Exit regarding when the particular part of the code needs to be executed:
The idea is quite simple: Just say, every variable is a instance of a class. Every instance must support at least
the following events of the processing-cycle (in Brackets, I write the “old” abbreviation ):

– Initialization

– before Variablescreen ( I_STEP = 1 )

– after Variablescreen ( I_STEP = 2 )

– Authority check ( I_STEP = 3 )

– check  ( I_STEP = 0 ) – checking of a condition

Butterfly Reports in BPC 10.0 EPM Addin and BPC 10.1 Embedded AO: CONTENTS

Creating Butterfly Reports in SAP BPC 10.0 Standard:

Axis sharing report/form in AO


https://answers.sap.com/questions/13224390/calling-data-from-another-query-in-worksheet-workb.html
https://blog.sap-press.com/how-to-group-and-ungroup-reports-with-sap-analysis-for-microsoft-office

Settings to Run a Specified Planning Sequence on saving Data from AO: CONTENTS
In RSPLAN, Infoprovider  Edit central settings, set the Planning Sequence to be run by default when
Data is saved from AO input form we do the following setting:
Data Extraction from ECC: CONTENTS
We extract Actual Data from ECC for different planning Areas like:
a. General Ledger Data – 0FI_GL_10 or 0FI_GL_20.
0FI_GL_10 will have daa from leading ledger while 0FI_GL_20 will have data from all ledgers
These Extractors provide the Totals data that is need for BPC Planning (0FI_GL_12 provides Line item level
Data which is more detailed than required).
b. Cost Center Accounting Data - 0CO_OM_CCA_20.
This Data source extracts data in Full Load mode from tables mainly: COSP (Cost Totals of External
Postings) and COSS (Cost Totals of Internal Postings)

If we need to consider only the Primary Cost Elements for the P&L related items, we can have Cost
Element Category in the extractor (Primary Costs: Cost Element Category = 1)
c. HR Data:
Employee Master Data  0EMPLOYEE_ATTR
This DataSource contains information that concerns the employee's work relationship.
https://help.sap.com/saphelp_crm70/helpdata/en/02/ee6838abce021ae10000009b38f842/frameset.htm
 0EMPLOYEE_ATTR
 0EMPLOYEE_TEXT
 0EMPLOYEE_0016_ATTR
 0EMPLOYEE_0077_ATTR
 0EMPLOYEE_ID_ATTR
 0EMPLOYEE_USER_ATTR

Headcount Transaction Data  0HR_PA_PA_1


We get the Keyfigure: 0HDCNT_VC in the extractor which gives us the headcount change for
employees. It is a cumulative value and is filled by the Headcount InfoSource.
https://help.sap.com/saphelp_snc70/helpdata/EN/f8/fea83a47e21234e10000000a11402f/content.htm?
no_cache=true

Payroll Transaction Data  0HR_PY_1


This DataSource contains information on the cumulated payroll results for each month.
https://help.sap.com/saphelp_crm70/helpdata/en/02/ee6838abce021ae10000009b38f842/frameset.htm
Payroll Datsources  Payroll (Transaction Data)
d. Asset Accounting Data
0FI_AA_002
0FI_AA_11 – Transactions  See Extractor
0FI_AA_12 - Posted Depreciation  See Extractor

BW related Extraction and creation of needed Infocubes:

We extract Actuals data from ECC to BW Standard Infocube or a Virtual Infoprovider. When we use
Virtual Infoprovider, we can get Real Time Data from ECC on Demand.

For the Plan Data we create a Real Time Infocube, with similar structure to the Actuals Infocube.
We create an Multiprovider on both these Infoproviders. Aggegation Levels are created on the
Mltiprovider so that the Bex query to be created for the AO input form or report will have both Actual
and Plan data access.

How Actuals Data comes into BW and its further Configuration: Contents

FI-GL Data – 0FI_GL_10


We get data from the Totals table: FAGLFLEXT. We get FI-GL data as Cummulative Balances along with
the Total Credit and Total Debit Postings. The 0VALTYPE Characteristic will let us know what is the kind of
data record it is, is it a Actual or Plan record. We also have the 0VERSION infoobject which tells us which
version of the data we are looking at.

All GL Accounts will provide only Periodic Data from ECC. For P&L Accounts, such type of Data is OK as
calculations of P&L are only periodic. As most of the Planning Areas like CAPEX, OPEX, Revenue, HR etc
are related to either Expense or Revenue, that will not create any problem.

But for the Balance Sheet Accounts, we need the values in YTD form. Fortunately, most of the BS items
planning is not at a very detailed level (means involving many processes) and in most cases it is just
entering of the plan values directly, we can provide the users Input Forms which will be used to enter
plan values directly.

But in cases where the users want to enter values at an aggregated level, for eg: at an Year level and
they need to be distributed to the 12 months we need to do Data modification in BEx query to convert
periodic values into the YTD values. We can use the “Current Member Variable” in BEx query and use
inverse formula to make these CKFs input ready.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
The general procedure for this is to create a RKF to fetch the periodic value of a BS account and hide it.
We use the “Current Member Variable” to get the aggregated values of the Period values from the

YTD (year to date) analyses: The query shows the aggregated value of a key figure per month starting from the
value for January through to the month in the row. You can define this key figure in Query Designer by defining a
restricted key figure and restricting the month by a range with January of the year in question as the lower limit
and the CURRENT MEMBER variable as the upper limit.

To make this CKF Input Ready:

In case when 2 periods are being added in the CKF, we can use the following method:

To make this calculated key figure input ready we also set it to be input ready and define an inverse formula
to set the current periodic value out of the change of the YTD value.
 

Then we can start planning on the YTD key figures.

One restriciton on this approach is that in this example I only can update one period value per Material and
then a roundtrip to the server is needed. In other words the user needs to press ‘Transfer Data’ before it
updates the next period.

In case where there are like 12 periods being added in cases where we are doing monthly CKFs:

https://blogs.sap.com/2017/02/10/report-and-input-value-with-ytd-in-bpc-embedded-model/
https://wiki.scn.sap.com/wiki/display/BI/Current+Member+Variables

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Asset Accounting Data – 0FI_AA_002, 0FI_AA_11 and 0FI_AA_12:

We get the period wise, Asset and Asset Class wise, Asset acquisition figures and movements
(Transactions) of the new acquisitions etc and also the depreciation values as well as the Book value of
the Assets. We can map the Transactions of Assets to FLOW or similar Dimension in BPC to track all the
movements as well as the closing values within a period. We will also have the information of the Useful
Life of each Asset which can be used to calculate the Planned depreciation values (sometimes when we
have additional CAPEX and we need to recalculate the depreciation values) based on this. We also will
have the Asset Class wise Depreciation Accounts which can be used to integrate the Depreciation
Expenses with the P&L and BS (Depreciation Expenses and Accumulated Depreciation). Periodic
Depreciation goes to the P&L as expense while Accumulated Depreciation goes to BS on the Assets side.

Using HANA for BW Modeling: TOP


1. We need to install BW Modeling Tools in order to be able to create BW objects in HANA studio
(Eclipse software)
2. First we need to create a Project in BW Modeling
3. When we use BW4HANA, we can connect to any source system including ECC or S/4HANA systems
from RSA1.
4. When we talk about S/4 HANA, we can have both same or separate BW systems. When it is same, we
will be having BW system in S/4 HANA system itself and we can have BPC installed on top of it.
5. How source system data is extracted to BPC:
a. If the source system is ECC – If the BW version is 7.4 we can create connection to ECC in BW – the
procedure may be slightly different in these 2 systems. Then we can load data from ECC to BW,
probably by using virtual providers.
For ODP config: https://blogs.sap.com/2017/11/27/data-provisioning-options-for-sap-bw-odp-
with-odp-demo-example/

b. If the source system is S/4 HANA and if we are using BPC optimized for S/4 HANA, then we can
use the /ERP/* objects to extract master data into BW in HANA studio.We can create ADSOs
(ADSO for Actual Data and ADSO with direct update for Plan data) for extracting Transaction Data
using the HANA views that are relevant for eg: SFIN view for extracting ACDOCA table data.

c. If we are using the BW/4 HANA Source system with S/4 HANA as source system, it is again HANA
system with Embedded Technology i.e we can use the standard BW IP related T-Codes, Planning
Functions etc. We can use Standard HANA views based on the S/4 HANA tables like ACDOCA etc
for Transaction Data to load data into an ADSO and also standard views for Master Data based on
standard S/4 HANA Master Data tables to create BW Infoobjects.
If required, we can use these views along with some other sources of Data such as a custom view in
order to customize the transaction data or master data for creating TD ADSOs or BW Infoobjects
respectively.

6. When creating Infoobjects in BW/4hana, we can choose the following:


If we choose, External SAP HANA view for Master Data, it will behave like a dimension calculation
view and can be used as a building block for objects like ADSO etc
If we choose the External SAP HANA view for Reporting, we can use this like any infoprovider
calculation view and will be save similar as a cube.
To do setting for package assignment and other properties, we go to Tcode: RS2HANA_VIEW, where
the default SAP HANA package is: system-local.bw.bw2hana
Configuring the P&L Account Actual and Plan:
P&L Account Data is by period. So for Actuals, we collect all the Data for any given period to check what are the
transactions that are there in that period and arrive at the sum total of all the relevant transactions for that GL Account.

GL Period Period Period Period Period Period Period Period Period Period Period
  Account 1 2 3 4 5 6 7 8 9 10 11 Period 12
1000012
EXP 1 225 240 230 250 210 230 235 215 250 240 270 190
2000043
REV 5 400 410 450 420 380 390 450 420 425 325 435 350
Profit
for each
Period   175 170 220 170 170 160 215 205 175 85 165 160

For PLAN data:

a. All those GL Accounts such as Fixed Costs, HR expenses etc, for which we will be doing the detailed Plan, we
can just transfer the final Plan amounts for each of the GL Accounts from those Planning Areas to a Final Cube
where we will maintain the P&L related data.
b. The same holds good for Depreciation Periodic Amounts
c. For all other GL Accounts for which we are not doing a detailed Plan, generally the final period’s data is copied
to all the subsequent periods and then 2 approaches can be used according to the user agreement:
1. We can ask the users to just add the changes like for eg: for an expense GL account, the user can see what
is the amount already present for the period and add such amount that the users deem would be the
difference amount that can be added to the already existing amount that gives the final to be planned
amount.
2. The users can just overwrite the final Plan amount for the periods as the final Plan figure.

Configuration of the Balance Sheet Accounts:


Balance Sheet Data will be as YTD data. So for Actuals, we have to see what is the opening balance for a particular BS
related GL and also the various transactions within that period which come from the source system and take the net
amounts as the final Actual amounts.

Locking AO workbook
https://blogs.sap.com/2017/05/30/analysis-office-workbook-locking-mechanism/
Rolling Forecast:
https://blogs.sap.com/2017/03/22/bpc-10.1-embedded-how-the-new-exit-for-displaying-structure-
members-can-be-used-for-setting-up-a-rolling-forecast/

https://blogs.sap.com/2016/11/18/bpc-10.1-embedded-how-to-efficiently-realize-a-rollling-forecast/
In Embedded details:
Calling Process Chain:
https://blogs.sap.com/2014/04/01/how-to-trigger-bw-process-chains-from-analysis-for-office/

Currency Translation:
https://archive.sap.com/kmuuid2/a0d5bf96-b19b-2c10-e3b6-e2f12a3de99a/Currency%20Conversion%20in
%20BI%207.0

SAP BPC How to Guides:


https://blogs.sap.com/2016/06/28/sap-how-to-guides-for-bpc-embedded-pakbw-ip-and-analysis-for-office/

Work Status:
https://www.sap.com/documents/2016/08/a0caf406-817c-0010-82c7-eda71af511fa.html

Retraction:
https://www.sap.com/documents/2016/06/1800637d-767c-0010-82c7-eda71af511fa.html

Char Rel with SQL script


https://www.sap.com/documents/2016/12/8e7d5228-9d7c-0010-82c7-eda71af511fa.html

AMDP fetching data from another Agg Level


https://www.sap.com/documents/2014/03/9a9e14e2-537c-0010-82c7-eda71af511fa.html
https://sapinsider.wispubs.com/Assets/Articles/2016/April/BI-An-Introduction-to-AMDPs-for-Integrated-
Planning

File Upload
https://blogs.sap.com/2014/08/13/how-to-load-a-file-into-bw-integrated-planning-version-3/
Local calc and custom ribbon
https://www.sap.com/documents/2015/07/2cdf2f8a-597c-0010-82c7-eda71af511fa.html
Highlighting changed cells in AO
https://www.sap.com/documents/2017/01/a47b71db-a27c-0010-82c7-eda71af511fa.html
Inverse Formulas
http://sapbwmentor.expertise-team.com/post/2014/09/17/sales-planning-with-fox-or-with-inverse-
formula.aspx
Allocation using FOX
http://sapbiwtutorials.blogspot.com/2009/03/sap-bi-ip-allocation-using-fox-formula.html

Notes on FOX
https://docplayer.net/24061620-Fox-formula-in-sap-bi-integrated-planning.html
https://www.techtarget.com/contributor/Nurullah-Battal
https://www.nextlytics.com/search-results?term=FOX+formulas&offset=10
https://help.sap.com/viewer/10a1a5416c531014ab939da09f399311/7.0.37/en-US/
d38057f830a911d4b2be0050dadfb23f.html

BPC Embedded SAP Help


https://help.sap.com/viewer/0ecf5244825c4742a7b062a89d11c2ac/7.5.9/en-US/
4cacf4b354423b9fe10000000a42189b.html
Data Slice
https://blogs.sap.com/2018/11/15/data-slice-concept-can-be-used-bpc-11-embedded-bw4hana/

Local Data save


https://blogs.sap.com/2016/11/17/bpc-10.1-embedded-how-local-plan-data-can-be-
tranferred-back-to-global-infoproviders/
Error for 0QUANTITY in BEx query
https://answers.sap.com/questions/12636826/error-adding-amount-key-figure-to-aggregation-leve.html

Customize AO Menu
https://www.youtube.com/watch?v=X1jXGF8NiFs

Custom style sheets in AO


https://www.youtube.com/watch?v=Chv7UuY-KNs

AO Videos
https://wiki.scn.sap.com/wiki/display/BI/SAP+Analysis+for+Microsoft+Office+-
+Official+Product+Tutorials

You might also like