7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
1/31
SAP BusinessObjects EPM
How-To Guide
How To Implement the
RUNLOGIC_PH Keyword in SAP
Business Objects Planning &
Consolidation, version forNetWeaver
Applicable Releases:
SAP Business Objects Planning and Consolidation 10.0, version for
NetWeaver, SP06 and higher.
SAP Business Objects Planning and Consolidation 7.5, version for
NetWeaver, SP04 and higher.
Version 1.0
January 2013
7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
2/31
Copyright 2013 SAP AG. All rights reserved.
No part of this publication may be reproduced or
transmitted in any form or for any purpose without the
express permission of SAP AG. The information contained
herein may be changed without prior notice.Some software products marketed by SAP AG and its
distributors contain proprietary software components of
other software vendors.
Microsoft, Windows, Outlook, and PowerPoint are
registered trademarks of Microsoft Corporation.
IBM, DB2, DB2 Universal Database, OS/2, Parallel
Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390,
OS/400, iSeries, pSeries, xSeries, zSeries, z/OS, AFP,
Intelligent Miner, WebSphere, Netfinity, Tivoli, Informix,
i5/OS, POWER, POWER5, OpenPower and PowerPC are
trademarks or registered trademarks of IBM Corporation.Adobe, the Adobe logo, Acrobat, PostScript, and Reader
are either trademarks or registered trademarks of Adobe
Systems Incorporated in the United States and/or other
countries.
Oracle is a registered trademark of Oracle Corporation.
UNIX, X/Open, OSF/1, and Motif are registered
trademarks of the Open Group.
Citrix, ICA, Program Neighborhood, MetaFrame,
WinFrame, VideoFrame, and MultiWin are trademarks or
registered trademarks of Citrix Systems, Inc.
HTML, XML, XHTML and W3C are trademarks or
registered trademarks of W3C, World Wide Web
Consortium, Massachusetts Institute of Technology.
Java is a registered trademark of Sun Microsystems, Inc.
JavaScript is a registered trademark of Sun Microsystems,
Inc., used under license for technology invented and
implemented by Netscape.
MaxDB is a trademark of MySQL AB, Sweden.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP
NetWeaver, and other SAP products and services
mentioned herein as well as their respective logos are
trademarks or registered trademarks of SAP AG in
Germany and in several other countries all over the world.
All other product and service names mentioned are the
trademarks of their respective companies. Data contained
in this document serves informational purposes only.
National product specifications may vary.
These materials are subject to change without notice.
These materials are provided by SAP AG and its affiliated
companies ("SAP Group") for informational purposes only,
without representation or warranty of any kind, and SAP
Group shall not be liable for errors or omissions withrespect to the materials. The only warranties for SAP
Group products and services are those that are set forth in
the express warranty statements accompanying such
products and services, if any. Nothing herein should be
construed as constituting an additional warranty.
These materials are provided as is without a warranty of
any kind, either express or implied, including but not
limited to, the implied warranties of merchantability,
fitness for a particular purpose, or non-infringement.
SAP shall not be liable for damages of any kind including
without limitation direct, special, indirect, or consequential
damages that may result from the use of these materials.
SAP does not warrant the accuracy or completeness of the
information, text, graphics, links or other items contained
within these materials. SAP has no control over the
information that you may access through the use of hot
links contained in these materials and does not endorse
your use of third party web pages nor provide any warranty
whatsoever relating to third party web pages.
SAP NetWeaver How-to Guides are intended to simplify
the product implementation. While specific product
features and procedures typically are explained in a
practical business context, it is not implied that those
features and procedures are the only approach in solving a
specific business problem using SAP NetWeaver. Should
you wish to receive additional information, clarification or
support, please refer to SAP Consulting.
Any software coding and/or code lines / strings (Code)
included in this documentation are only examples and are
not intended to be used in a productive system
environment. The Code is only intended better explain and
visualize the syntax and phrasing rules of certain coding.
SAP does not warrant the correctness and completeness of
the Code given herein, and SAP shall not be liable forerrors or damages caused by the usage of the Code, except
if such damages were caused by SAP intentionally or
grossly negligent.
Disclaimer
Some components of this product are based on Java. Any
code change in these components may cause unpredictable
and severe malfunctions and is therefore expressively
prohibited, as is any decompilation of these components.
Any Java Source Code delivered with this product is only
to be used by SAPs Support Services and may not be
modified or altered in any way.
7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
3/31
Document History
Document Version Description
1.00 Initial version of this guide
7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
4/31
Typographic Conventions
Type Style Description
Example Text Words or characters quoted
from the screen. These
include field names, screen
titles, pushbuttons labels,
menu names, menu paths,
and menu options.
Cross-references to other
documentation
Example text Emphasized words or
phrases in body text, graphic
titles, and table titles
Example text File and directory names andtheir paths, messages,
names of variables and
parameters, source text, and
names of installation,
upgrade and database tools.
Example text User entry texts. These are
words or characters that you
enter in the system exactly as
they appear in the
documentation.
Variable user entry. Angle
brackets indicate that you
replace these words and
characters with appropriate
entries to make entries in the
system.
EXAMPLE TEXT Keys on the keyboard, forexample, F2or ENTER.
Icons
Icon Description
CautionNote or Important
Example
Recommendation or Tip
7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
5/31
Table of Contents
Document History...................................................................................................................... 1Typographic Conventions....................................................................................................... 1Icons1Table of Contents....................................................................................................................... 11. Business Scenario............................................................................................................... 1
1.1 Calling other Scripts and the Push vs. Pull Concept .................................................... 11.2 Improving the Performance of Individual Scripts .......................................................... 2
2. Background Information ..................................................................................................... 42.1 More Information on the RUNLOGIC_PH Keyword ..................................................... 42.2 BPC NetWeaver RUNLOGIC_PH Keyword Algorithm ................................................. 62.2.1 The BAdI DIMENSION Parameter................................................................ 7
2.2.2 The BAdI CHANGED Parameter................................................................... 82.2.3 Nesting RUNLOGIC_PH Statements .............................................................. 92.2.4 Locking Issues ................................................................................................. 9
Call ing Log ic:CAL LING_LOGIC.LGF............................................................................................ 9QUERY = OFF .................................................................................................................................. 9WRITE = ON ..................................................................................................................................... 9Called Log ic:CAL LED_LOGIC.LGF............................................................................................... 9ENTITY_3 = ENTITY_1 + ENTITY_2 ............................................................................................... 9
2.2.5 Background vs. Dialogue Processes ............................................................... 92.2.6 Enhancements to the BPC 7.5 version of RUNLOGIC_PH Keyword ........... 10
2.3 More Information on the BAdI Framework ................................................................. 113. Prerequisites ...................................................................................................................... 124. Step-by-Step Procedure .................................................................................................... 13
4.1 Import the attached ABAP transport ........................................................................... 154.2 Parallel Degree Setup ................................................................................................ 154.3 Parallelize by a Dimension Combination .................................................................... 18
4.3.1 Identify Original Script .................................................................................... 184.3.2 Create a New Script for Testing ..................................................................... 184.3.3 Create the Calling Script (RUNLOGIC_PH) .................................................. 194.3.4 Run the Calling Script (RUNLOGIC_PH) ....................................................... 19
4.4 Parallelize by a Property ............................................................................................. 204.4.1 Create the new Calling Script (RUNLOGIC_PH) ........................................... 204.4.2 Run the Calling Script (RUNLOGIC_PH) ....................................................... 21
4.5 Parallelize by a Hierarchy Node ................................................................................. 224.5.1 Create the new Calling Script (RUNLOGIC_PH) ........................................... 224.5.2 Run the Calling Script (RUNLOGIC_PH) ....................................................... 23
5. Appendix ............................................................................................................................ 24
7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
6/31
NOTE:delivered within an ABAP package named "ZBPC" ..................................................... 24CALC_SALES.LGF from Section 4.3.2 ....................................................................................... 24CAL_SALES_DIM_COMBO.LGF from Section 4.3.3 ................................................................. 24CALC_SALES_PROPERTY.LGF from Section 4.4.1 ................................................................. 24CALC_SALES_HIERARCHY.LGF from Section 4.5.1 ................................................................ 24
7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
7/31
How To Implement the RUNLOGIC_PH Keyword in SAP Business Objects Planning and Consolidation 10.0, version for
NetWeaver
May 2013 1
1. Business ScenarioSAP Business Objects Planning & Consolidation can be installed on either a Microsoft or a NetWeaver
platform. While both platforms offer many of the same features and functionalities, there are a few key
differences. One of these differences is the support of Script Logic Keywords that have been
delivered with the installation. Currently, the RUNLOGIC Keyword is not delivered with SAPBusinessObjects Planning and Consolidation, version for Netweaver (hereafter refered to as: BPC
NetWeaver or BPC).
Fortunately, the BPC NetWeaver Script Logic Business AddIn (BAdI) provides an enhancement option
that allows you to define your own Script Logic Keywords. Using the BAdI implementation in this
guide as an example, we will show you how to define your own custom version of the RUNLOGIC
Keyword in BPC NetWeaver (For more detailed background information about the RUNLOGIC
Keyword, and the SAP BAdI Framework, see Section 2).
1.1Calling other Scripts and the Push vs. Pull ConceptMany businesses already have some type of central script which contains references or includesto
other scripts in the same Modelallowing them to define the exact order of scripts which are
executed in a single run. This is a very useful feature for organizing and controlling which scripts are
to be executed at what time. In fact, the RUNLOGIC_PH Keyword allows you to do this same action
on a more global scale, giving you the powerful capability of calling any script logic file which has been
defined in the BPC NetWeaver system.
The screenshot below represents a very simple illustration of how you can use RUNLOGIC_PH to call
a script defined in another Model (or Environment):
Executing Script Logic from another
BPC ModelDEMAND BPC Model SUPPLY BPC Model
Script Execution takes place
from the SUPPLY context
Outcome of Script Actions
Business
Process
Script
Script
Lets say you have modeled three different BPC Models in BPC NetWeaver; Supply, Demand, and
Finance (a simplified sales and operational planning scenario). In the Supply Model, the data is
modeled by Product, Raw Material and Capacity Asset (for ex: production_line_1). In the Demand
Model, the data is modeled by Product and Customer. Both Models represent valid but different
business views, each affecting the outcome of projected sales and revenue. For the sake of this
example, we can assume the following:In the DemandModel, a planner plans Demand Volume (how much the business sells).
7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
8/31
How To Implement the RUNLOGIC_PH Keyword in SAP Business Objects Planning and Consolidation 10.0, version for
NetWeaver
May 2013 2
In the SupplyModel, a planner plans Production Volume (how much the business produces).
During the Production planning process, the planner analyzes both Production Volume and Inventory
of Product in the Supply Model. Inventory can be defined as a calculation in the Supply Model which
is based on Production Volume and Demand Volume:
Ending Inventory = Beginning Inventory + Production VolumeDemand Volume
In order to obtain an accurate calculation of Inventory, the planner will need to know how muchproduct the business will sell at any point during his/her planning process. It is during this process that
the Production planner would like to pull in the most recent plan of Demand Volume from the Demand
Model in order to review and determine its impact on inventory. Furthermore, the Production Planner
would like to stay in his/her own context while performing this review without any additional steps.
For the purposes of this example, lets say you have already defined a script in the Demand Model
which sends the Demand Volume to the Supply Model. You can then configure the RUNLOGIC_PH
Keyword in the Supply Model to call this script, so that the user can get the latest Demand Volume
without having to change his/her context to the Demand Model and pushing from there. This is a
subtle but useful technique in designing BPC Models which use data from different areas in order to
obtain up to date and holistic views of the entire BPC Data Model.
1.2Improving the Performance of Individual ScriptsIn addition to providing you with the capability to call script logic files from other Models and
Environments, this custom RUNLOGIC_PH Keyword also gives you the advantage of using a new
parallelization technique that can greatly improve the performance of the script you are calling.
Quite often, businesses have defined their calculations to be executed across similar sets of data. By
changing a few members of certain driver based dimensions like Entity, Time, and so on, the business
could perform a calculation that covers a very large set of data but with very similar semantic
operations. In cases when the data from one set will not affect the data from another set these
operations can run in parallel processes (for example if you are performing the same calculation
across all time periods of a given year). While this can also be achieved by scheduling many DataManager Packages to run on different regions of data in parallel, this approach can be tedious and
inflexible.
The screenshot below represents a very simple illustration of how you can use RUNLOGIC_PH to
break up the data sets semantically and execute the script on each one in parallel:
7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
9/31
How To Implement the RUNLOGIC_PH Keyword in SAP Business Objects Planning and Consolidation 10.0, version for
NetWeaver
May 2013 3
This guide will show you how to use the BPC NetWeaver version of the RUNLOGIC_PH Keyword to
specify different data sets automatically while running these scripts in parallel. Using the approach
described in this guide we can greatly improve the performance of individual scripts. While there are
no doubt many different factors that can contribute to performance, proof of concept testing on a
simple example showed an improvement of more than ten times by using just four parallel processes.
Lets assume the sameDemand Volume planning scenario described above, where the Demandplanner is trying to define how much volume of a product the business is trying to sell. Using the
same Demand Model described above of Customers to Products, we can assume that the data will be
spread across multiple Entities or Business Units. During the planning process, the Demand planner
has already created his/her baseline of Demand Volume as well as the projected Price for each
Product. Now the business needs to calculate a baseline Sales Amount for each Customer and
Product. This sales amount can be defined as a calculation in the Demand Model which is based on
the Projected Price and Demand Volume:
Projected Sales = Demand Volume * Projected Price
Unfortunately, if the number of combinations of Customers by Products by Entities is very high (in the
millions range) such a calculation can take hours to complete (in our internal testing it took more than
five hours to calculate a years worth of data across 4 Entities, 50 Customers, and 800 Products).The solution to this problem can be implemented with the custom RUNLOGIC_PH Keyword delivered
in this guide. By using a driver dimension to semantically break up the data sets (such as Entity or
Business Unit) the RUNLOGIC_PH Keyword can execute the script logic file with multiple data sets,
each using its own dialogue process. The number of dialogue processes used by the new
RUNLOGIC_PH Keyword is determined by a BPC Parameter set either at the Environment level or the
Model level (Note that in case both are set the model parameter prevails). Special care should be
taken when setting this number since using too many processes can be detrimental to overall system
performance (see Section 4.1).
You should be careful when defining the driver/s for parallel execution because incorrect usage of this
feature can lead to negative system impacts. It is highly recommended that you study the algorithm
that this new RUNLOGIC_PH Keyword uses (See Section 2.2).Be advised that this guide is only intended to provide you with a solution to create the RUNLOGIC_PH
Keyword and is not intended to fix all of your particular performance problems. Individual results will
always vary, and while this guide will show improvement in many different use cases, it may not be the
answer to your exact scenario.
7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
10/31
How To Implement the RUNLOGIC_PH Keyword in SAP Business Objects Planning and Consolidation 10.0, version for
NetWeaver
May 2013 4
2. Background Information
2.1More Information on the RUNLOGIC_PH KeywordBPC provides the powerful option of using a built in Script Logic Engine to perform calculations on
BPC Application data. The Script Logic Engine is a very powerful piece of functionality within BPC.
The Engine is what reads the script written by a BPC Architect/Administrator and transforms it into
Application Logic that is executed on real BPC Model Data. For more detailed documentation of the
supported syntax and Keywords within the BPC NetWeaver Script Logic Framework, please refer to
the SAP Help Site for BPC Script Logic (See Section 3Additional Documentation).
Businesses choose to configure various scripts which can run either at the time of input or via the BPC
Data Manager Interface, depending on the business process and the functionality that is desired.
These scripts can be fashioned to perform many different combinations of calculations and formulas,
based on the Keywords and syntax that you use in the scripts. It is important to note that this guide isonly intended to cover a single Script Logic Keyword RUNLOGIC_PH.
SAP BusinessObjects Planning & Consolidation can be installed on either a Microsoft or a NetWeaver
platform. While both platforms offer many of the same features and functionalities, there are a few key
differences. One of these differences is the support of Script Logic Keywords that have been
delivered with the installation.
On the BPC Microsoft platform, the RUNLOGIC_PH Keyword gives you the ability to keep your
business users logged into their representative Application and run script logic files defined in other
Applications. They can execute these other scripts without changing their context to the other
Application model/view.
As described above, the primary function of the RUNLOGIC_PH Keyword gives you the ability to
redirect the execution of a script logic file. You can configure the RUNLOGIC_PH Keyword to call
another script logic file which has already been set up within BPC. This is useful, for example, if you
need to call a script logic file located in a different Model, or even a different Environment altogether.
This functionality allows you to perform your own string of logic calls or even design a push vs. pull
concept within your application architecture (See Section 1 for a business example).
In addition to changing where the execution of the script actually happens, the BPC Microsoft version
of the RUNLOGIC_PH Keyword also allows you to manipulate the data region passed to that scriptlogic file. This means you can potentially execute the script on a different data region for which the
logic was originally configured.
With the help of the Script Logic BAdI included in this guide, we can mimic the functionality of the BPC
Microsoft version of RUNLOGIC and also add our own enhancement for breaking up the script into
smaller data sets which can be run in parallel. For a detailed description of the algorithm used in the
custom BAdI version of the RUNLOGIC_PH Keyword, please refer to the next section (See Section
2.2). As in the Microsoft version, all Keyword parameters are optional except LOGIC. Note, however
that in the BPC NetWeaver implementation of RUNLOGIC, QUERY = OFF is highlyrecommended for
performance purposes (there should be no reason to set QUERY to any other value when using
RUNLOGIC_PH Keyword).
7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
11/31
How To Implement the RUNLOGIC_PH Keyword in SAP Business Objects Planning and Consolidation 10.0, version for
NetWeaver
May 2013 5
The benefits of using this customized approach within BPC NetWeaver center around two key points:
The new Keyword will allow you to execute logic from various applications without logging
onto each one of them individually (i.e. same functionality as Microsoft version)
o This allows you to group and order your business calculations in a simplified and
centralized fashion using various push vs. pull designs.
The new Keyword can significantly improve the performance of individual scriptso The script is run on smaller semantic data sets in parallel. This parallelization can
potentially drop the script runtimes down to fractions of the time taken for the
individual script execution.
The performance improvement mentioned here can greatly improve the overall perceived value of the
BPC implementation when used within DEFAULT logic (remember that DEFAULT logic is executed for
every save operation in a BPC Input Form/Schedule).
For example: If a calculation defined in DEFAULT logic takes one minute then every save takes
one minute (even if you are only updating one cell for example). Parallelization of the DEFAULT logic
may take this wait time down to several seconds in an optimal scenario. This means the userexperience has been dramatically improvedinstead of waiting one minute for every save, the wait
time has been reduced to several seconds, giving the user a more productive and responsive work
session.
We should also mention that this new version of the RUNLOGIC_PH Keyword in BPC NetWeaver can
be used to speed up batch calculations as well. These batch calculations may take a really long time
to run as data volumes and models change. Normally batch calculations are executed during times
when the system activity is much lower. However, if the business users log in from multiple time
zones the batch time window may be much smaller and harder to meet. Improved script runtimes will
allow the business to schedule batch runs efficiently and in smaller time windows which will help to
increase overall business process efficiency.
7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
12/31
How To Implement the RUNLOGIC_PH Keyword in SAP Business Objects Planning and Consolidation 10.0, version for
NetWeaver
May 2013 6
2.2BPC NetWeaver RUNLOGIC_PH Keyword AlgorithmThis section describes the algorithm used in the Script Logic BAdI delivered with this guide. It is
intended more as a reference for technical readers and may help you to write your own additions and
enhancements to the code.
1. Determine how many parallel processes can be used (the number of parallel processes can
be set at the Environment level as well as the Model level. If both exist the Model setting
prevails)
For example (applies to step 2 and 3): Model parameter was configured for TWO parallel
processes.
2. Determine the data sets used for parallel execution.
a. Based on Step 1 there are two processes availableTherefore the RUNLOGIC_PH
algorithm will only generate two data sets at a time (the data sets are based on the
RUNLOGIC_PH BAdI CHANGED Parameter).
b. This means that the maximum number of data sets that are running in memory at one
time is two.
c. The next data set will only be generated and executed when one of these two
processes becomes available.
For example: The RUNLOGIC_PH BAdI CHANGED Parameter has been configured with the
TIME and ENTITY dimensions. In this example, the RUNLOGIC_PH algorithm finds the first
two combinations of TIME and ENTITY members and will dispatch a process to execute the
script for each of those two data sets.
3. Execute the script for each data set from #2 above with the scope restricted to the
specification of the RUNLOGIC_PH BAdI DIMENSION Parameter.a. The RUNLOGIC_PH BAdI will execute the called logic based on the first (or next)
available data set (from step 2).
b. This process will repeat until there are no more idle processes available (out of a
maximum of two, based on Step 1). When there are no more idle processes the
RUNLOGIC_PH algorithm will wait until another process becomes available. When
another process becomes available, the RUNLOGIC_PH algorithm will generate the
next data set and execute the called logic for that data set.
NOTE:This process will repeat until there are no more data sets available (where the total
number of data sets is the Cartesian product of the members from the dimensions defined in
the BAdI CHANGED Parameter). Keep in mind that the Cartesian product is based on theset of members defined in the BAdI DIMENSION Parameters. If that dimension has not
been defined in the BAdI DIMENSION Parameterthen the Cartesian product is based on the
scope which was passed to the BAdI. When running as a DEFAULT script, the scope is
defined by the current context and preceding *XDIM_... statements. When running the script in
a Data Manager Package, the scope is defined by Data Manager Prompts and preceding
*XDIM_... statements.
7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
13/31
How To Implement the RUNLOGIC_PH Keyword in SAP Business Objects Planning and Consolidation 10.0, version for
NetWeaver
May 2013 7
2.2.1 The BAdI DIMENSION Parameter
The optional BAdI DIMENSION Parameter functionality is similar to the BPC Microsoft
RUNLOGIC_PH Keyword in that it will redefine the scope for the called logic. There is, however one
key difference: In BPC NetWeaver, a BAdI is always called wherever it is defined within the script. In
BPC Microsoft, the RUNLOGIC_PH Keyword is always executed at the en dof the script.
IMPORTANT NOTE:A BAdI in BPC NetWeaver will commit the data before returning to the script
unless the WRITE Parameter is set to OFF in which case no data is written at all.
In BPC Microsoft, since the RUNLOGIC_PH is always executed at the end of the script, you cannot
run any additional logic afterwards. This is different in BPC NetWeaver, because you can run any
logic you want after the RUNLOGIC_PH BAdI call. So, in BPC NetWeaver, if there is additional logic
written after RUNLOGIC_PH, that logic will run on the newly created BAdI records. The scope for this
additional logic is not defined by the BAdI, but by the scope in the script itself.
IMPORTANT NOTE: Any script defined after (or before) the RUNLOGIC_PH BAdI call will behave
as normal (i.e. will run on the scope defined in the script itself and not the scope from the BAdI
Dimension Parameter).
In BPC NetWeaver, each RUNLOGIC_PH BAdI call defines the scope independently. So if you string
multiple RUNLOGIC_PH BAdI calls together they only scope their own calls (not affecting the other
BAdI calls)this is different from BPC Microsoft RUNLOGIC_PH where you can redefine each
RUNLOGIC_PH call with scope from a previous RUNLOGIC_PH call.
In BPC NetWeaver, the BAdI DIMENSION Parameter will force the scope in the called logic for that
dimension. However, any additional scoping commands (such as XDIM_MEMBERSET) which have
been configured for that dimension in the called logic will then override the BAdI DIMENSION
Parameter.
IMPORTANT NOTE: If you want to force the scope of the called logic by using the BAdI
DIMENSION Parameter, you must make sure that you do not redefine the scope on that
dimension in the called script.
In BPC Microsoft, the RUNLOGIC_PH Keyword uses a special case for dimensions which are not in
the target script data area:
DIMENSION dim_name =
In BPC NetWeaver the equivalent of this syntax is the following:
DIMENSION dim_name =
For example, this syntax is used when you are calling logic in a separate Application which does not
contain dim_name. This is similar to the SKIP parameter in the *DESTINATION_APP command.
Syntax examples of the DIMENSION Parameter:
DIMENSION dim_name =
DIMENSION dim_name =
DIMENSION dim_name = bas(node_name)
7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
14/31
How To Implement the RUNLOGIC_PH Keyword in SAP Business Objects Planning and Consolidation 10.0, version for
NetWeaver
May 2013 8
2.2.2 The BAdI CHANGED Parameter
This opt ionalBAdI parameter is only used when running the called script in parallel mode. It is used
to determine the data sets used for parallel execution. For information on how the data sets are
generated, please refer to the RUNLOGIC_PH Keyword algorithm section (See Section 2.2). If you do
not wish to use any form of parallelization then you can remove this BAdI Parameter completely.
The key to optimizing the parallelization of RUNLOGIC_PH is making sure that you split the data sets
up as equally as possible. The new Property and Hierarchy capabilities provide more flexibility in
achieving this goal.
Syntax of the CHANGED parameter:
CHANGED = dim_name
CHANGED = dim_name.property_name
CHANGED = dim_name(node_name)
IMPORTANT NOTEon the CHANGED parameter: You cannot specify a Dimension more than once in the CHANGED parameter unless you are
use the new Hierarchy Node specification
o WARNING: Special care must be taken by the user that the nodes do not overlap
since this condition is not checked!
Allowed:
CHANGED = ENTITY(NODE1), ENTITY(NODE2)
Not Allowed:
CHANGED = ENTITY(NODE), ENTITY.PROPERTY
CHANGED = ENTITY, ENTITY(NODE)
CHANGED = ENTITY, ENTITY.PROPERTY
7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
15/31
How To Implement the RUNLOGIC_PH Keyword in SAP Business Objects Planning and Consolidation 10.0, version for
NetWeaver
May 2013 9
2.2.3 Nesting RUNLOGIC_PH Statements
In BPC Microsoft the RUNLOGIC Keyword cannotbe nested. However, in BPC NetWeaver the
RUNLOGIC_PH BAdI can call other scripts which contain RUNLOGIC_PH BAdI calls. These nested
RUNLOGIC_PH BAdI calls will no tsupport more than one BAdI Changed Parameter and any
attempt to do so may result in unintentional consequences.
NOTE: The technical reason behind this is that each nested call will be competing for the total
number of defined parallel processes without knowing when the original processes actually finish
which could result in performance degradation, locking issues, and incorrect data.
2.2.4 Locking Issues
When dealing with parallelization in the RUNLOGIC_PH BAdI, you must be very careful how you
define the data sets you are sending to the called logic and the data sets you are writing to within the
called logic.
IMPORTANT NOTE: The general rule of thumb is: dont put dimensions in the BAdI CHANGED
parameter if you are collapsing/aggregating on those dimensions in your called logic.
The example given on the next page can help explain when a locking scenario might occur:
Calling Logic:CALLING_LOGIC.LGF
START_BAdI RUNLOGIC_PH
QUERY = OFF
WRITE = ON
LOGIC = CALLED_LOGIC.LGF
APPSET = APSHELL
APP = PLANNING
DIMENSION ENTITY = ENTITY_1, ENTITY_2CHANGED = ENTITY
DEBUG = OFF
END_BAdI
Called Logic:CALLED_LOGIC.LGF
XDIM_ADDMEMBERSET ENTITY = ENTITY_3
//Aggregating/Summarizing data to ENTITY_3 could result in a locking situation:
ENTITY_3 = ENTITY_1 + ENTITY_2
2.2.5 Background vs. Dialogue Processes
In NetWeaver you can choose to kick off a process in the background or in dialogue.
IMPORTANT NOTE:The new RUNLOGIC_PH Keyword delivered in this guide always kicks off
the parallel executions in dialogue modespecifically so that the controlling RUNLOGIC_PH
program knows when the dialogue process has finished executing.
This is an important distinction for Basis administrators, since dialogue processes behave slightly
different than background processes. Most importantly for the readers of this guide, is that dialogue
processes have a timeout setting and background processes do not. For this reason, the
parallelization technique described in this guide should be tested properly on the system so that each
data set will be able to finish its job within the time that has been allocated for a dialogue process in
your system.
7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
16/31
How To Implement the RUNLOGIC_PH Keyword in SAP Business Objects Planning and Consolidation 10.0, version for
NetWeaver
May 2013 10
2.2.6 Enhancements to the BPC 7.5 version of
RUNLOGIC_PH Keyword
The Script Logic Keyword has been renamed to RUNLOGIC_PH (PH stands for Properties
and Hierarchies)
DEBUG = ON/OFFSetting DEBUG to ON now makes a 1 second delay between starts of processes allowing for
analysis of logs that are time stamp based. This can be important for example, when running
the script with parallel processing. When the script is executed within a single process the
entire log will be shown as a single log. When the script is executed in multiple processes,
only the main log will be shown. If you want to see the logs of each separate process you
must locate them in UJFS.
RUNLOGIC_PH can now process Data Manager User Defined Prompts: $...$
CHANGED = dim_name.property_name
(See Section 4.3.4)
CHANGED = dim_name(node_name)
(See Section 4.3.5)
VALIDATION = ON/OFF
The default behavior of RUNLOGIC_PH is to check the syntax of the called script before
running it. Setting this parameter to OFF will turn the validation off. This allows for faster
execution if you have already verified that your script will run. This can be useful if a validation
of the script fails but it can still be executed successfully.
DIMENSION dim_name =
The default behavior of BPC 10 (before SAP Note 1774371) is that even if you dont specify
XDIM_MEMBERSET on a Dimension, all Dimension IDs are still used in the Selection criteria
on the database. After Implementing SAP Note 1774371, only those Dimensions with actual
restrictions are used in the Selection criteria on the database. This improves performance in
general. NOTE: The impact of this change is that you cannot specify these Dimensions in the
CHANGED parameter of the RUNLOGIC_PH Keyword.
The RUNLOGIC_PH Parameter for defining the number of parallel processes can now be set
at either the Model Level or the Environment Level (Note that the Model Parameter always
winsif neither are set or the parameter has a value of 0 or 1, then RUNLOGIC_PH will run
the script in a single process).
RUNLOGIC_PH will always run on the background server defined in the BPC Global
Parameter PARALLEL_SERVER_GROUP (NOTE this was EXECSERVER for the BPC 7.5
Version). If this is not set, the logic will try to run on background server group default, and if
that does not exist and error will be raised.
7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
17/31
How To Implement the RUNLOGIC_PH Keyword in SAP Business Objects Planning and Consolidation 10.0, version for
NetWeaver
May 2013 11
2.3More Information on the BAdI FrameworkSAP Business Add-Ins (BAdIs) are arguably one of the most important technologies used to adapt
SAP software to specific requirements. As of Release 7.0 of the SAP NetWeaver Application Server
ABAP, BAdIs are part of the Enhancement Framework, where they represent explicit enhancement
options. BAdIs are the basis for Object Plug-Insthat can enhance the functions in ABAP programs
without having to make core software modifications. As such, BAdI calls can be integrated into
customer applications (like BusinessObjects Planning and Consolidation, version for SAP NetWeaver
for example) to allow enhanced customization of standard application functionality.
This guide describes the procedure for implementing a BadI for the BPC NW version of the script logic
Keyword RUNLOGIC_PH. The Step-By-Step section will outline the tasks needed in order to create
the BAdI itself in addition to the configuration required within BPC NW to actually execute the BAdI.
The Appendix section contains the ABAP transport that goes along with this guides Business
Scenario. This code is only meant as an example and while it will perform the actions described in
this guide it may not match the exact needs of your own particular Business Scenarioit is only
intended to guide you in the creation of your own BAdI Implementation.
For more detailed documentation of the BAdI Framework, please refer to the SAP Help Site for BAdIs
(see Section 3Additional Documentation).
7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
18/31
How To Implement the RUNLOGIC_PH Keyword in SAP Business Objects Planning and Consolidation 10.0, version for
NetWeaver
May 2013 12
3. PrerequisitesRequired/recommended expertise or prior knowledge
SAP BusinessObjects Planning and Consolidation 10, version for SAP NetWeaver
BPC NetWeaver Script Logic
BPC NetWeaver Script Logic BAdI Framework
ABAP programming skills
Access to SAP NetWeaver transaction codes: SE20, SE19, SE37, SE80, SE24, STMS
Relevant SAP Notes:
SAP Note1774371User specified dimensions in START_BADI is not correct
See Section 2.2.5, (DIMENSION dim_name = )
Additional Documentation:
Other EPM How-To Guides
http://wiki.sdn.sap.com/wiki/display/BPX/Enterprise+Performance+Management+%28EP
M%29+How-to+Guides
SAP Help LibraryBusiness Add Ins (BAdI)
http://help.sap.com/saphelp_nw73/helpdata/en/8f/f2e540f8648431e10000000a1550b0/fr
ameset.htm
SAP Help LibraryBPC NetWeaver Script Logic
http://help.sap.com/saphelp_bpc10_nw/helpdata/en/a6/69182aed2c4df78e3f7b9d58673
5ac/frameset.htm
https://service.sap.com/sap/support/notes/1774371https://service.sap.com/sap/support/notes/1774371https://service.sap.com/sap/support/notes/1774371http://wiki.sdn.sap.com/wiki/display/BPX/Enterprise+Performance+Management+%28EPM%29+How-to+Guideshttp://wiki.sdn.sap.com/wiki/display/BPX/Enterprise+Performance+Management+%28EPM%29+How-to+Guideshttp://wiki.sdn.sap.com/wiki/display/BPX/Enterprise+Performance+Management+%28EPM%29+How-to+Guideshttp://wiki.sdn.sap.com/wiki/display/BPX/Enterprise+Performance+Management+%28EPM%29+How-to+Guideshttp://wiki.sdn.sap.com/wiki/display/BPX/Enterprise+Performance+Management+%28EPM%29+How-to+Guideshttp://help.sap.com/saphelp_nw73/helpdata/en/8f/f2e540f8648431e10000000a1550b0/frameset.htmhttp://help.sap.com/saphelp_nw73/helpdata/en/8f/f2e540f8648431e10000000a1550b0/frameset.htmhttp://help.sap.com/saphelp_nw73/helpdata/en/8f/f2e540f8648431e10000000a1550b0/frameset.htmhttp://help.sap.com/saphelp_nw73/helpdata/en/8f/f2e540f8648431e10000000a1550b0/frameset.htmhttp://help.sap.com/saphelp_nw73/helpdata/en/8f/f2e540f8648431e10000000a1550b0/frameset.htmhttp://help.sap.com/saphelp_bpc10_nw/helpdata/en/a6/69182aed2c4df78e3f7b9d586735ac/frameset.htmhttp://help.sap.com/saphelp_bpc10_nw/helpdata/en/a6/69182aed2c4df78e3f7b9d586735ac/frameset.htmhttp://help.sap.com/saphelp_bpc10_nw/helpdata/en/a6/69182aed2c4df78e3f7b9d586735ac/frameset.htmhttp://help.sap.com/saphelp_bpc10_nw/helpdata/en/a6/69182aed2c4df78e3f7b9d586735ac/frameset.htmhttp://help.sap.com/saphelp_bpc10_nw/helpdata/en/a6/69182aed2c4df78e3f7b9d586735ac/frameset.htmhttp://help.sap.com/saphelp_bpc10_nw/helpdata/en/a6/69182aed2c4df78e3f7b9d586735ac/frameset.htmhttp://help.sap.com/saphelp_bpc10_nw/helpdata/en/a6/69182aed2c4df78e3f7b9d586735ac/frameset.htmhttp://help.sap.com/saphelp_nw73/helpdata/en/8f/f2e540f8648431e10000000a1550b0/frameset.htmhttp://help.sap.com/saphelp_nw73/helpdata/en/8f/f2e540f8648431e10000000a1550b0/frameset.htmhttp://wiki.sdn.sap.com/wiki/display/BPX/Enterprise+Performance+Management+%28EPM%29+How-to+Guideshttp://wiki.sdn.sap.com/wiki/display/BPX/Enterprise+Performance+Management+%28EPM%29+How-to+Guideshttps://service.sap.com/sap/support/notes/17743717/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
19/31
How To Implement the RUNLOGIC_PH Keyword in SAP Business Objects Planning and Consolidation 10.0, version for
NetWeaver
May 2013 13
4. Step-by-Step Procedure
This How-To guide outlines the procedure for implementing the RUNLOGIC_PH Keyword in BPC
10.0, version for NetWeaver. The ABAP code attached to this guide is intended to be implemented on
a BPC 10.0 system. In some cases you may want or need to use this new RUNLOGIC_PH Keywordon a BPC 7.5 system. Therefore, it has been made technically possible to use the same code
delivered in this guide on a BPC 7.5 system.
The step-by-step procedure we describe in this guide shows you how to use the RUNLOGIC_PH
Keyword to execute a single script with three different parallelization techniques. These steps are only
meant to demonstrate the new syntax and functionality of the RUNLOGIC_PH Keyword. The
underlying script we are using represents a simple Sales calculation using Volume and Price as
described in Section 1.2 and Section 4.3.1.
1) Import the ABAP transport from Appendix A into a BPC 10.0, Version for NetWeaver System
2) Set the number of Parallel Processes to be used
3) Parallelize by a Dimension Combination
4) Parallelize by a Property
5) Parallelize by a Hierachy Node
This guide provides you with three different examples of how to use the RUNLOGIC_PH Keyword;
one which was possible in the older version (Dimension Combination), and two which are new
features (Properties and Hierarchy Nodes).
Parallelize by a Dimension Combination
Parallelize by a Property Parallelize by a Hierarchy Node
Note that in this newer updated guide for BPC 10.0 we are only showing the new syntax examples for
using the RUNLOGIC_PH Keyword. To analyze the results, you may want to refer to the previous
version of this How To Guide (BPC 7.5 version) where we walk you through a simple series of
benchmark tests you can perform using different Script syntaxes and different parallelization drivers.
Using the examples provided in both of these guides, you can easily set up your own benchmark tests
to demonstrate the performance benefits you can acheive using the RUNLOGIC_PH Keyword
parallelization technique.
One can experiment with different Dimensions and even multiple Dimensions for splitting Data. Whenrunning such trials it makes sense to set the WRITE Parameter to OFF, in which case all the
calculations are executed but the data is not written back to the Application (unless of course, the
script calls a BADI that itself writes data). In this way we can see which data split works more
efficiently and use that configuration for the final RUNLOGIC script.
In general, parallelization is the most efficient when each piece of data takes approximately the same
time for processing.
IMPORTANT NOTE: The general rule of thumb is: dont put dimensions in the BAdI CHANGED
parameter if you are collapsing/aggregating on those dimensions in your called logic. For moreinformation, see Section 2.2.4 on Locking Issues.
7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
20/31
How To Implement the RUNLOGIC_PH Keyword in SAP Business Objects Planning and Consolidation 10.0, version for
NetWeaver
May 2013 14
As always, it is important to remember that all performance results will depend on many different
factors. One suggestion when analyzing your results and adjusting configuration are the number of
combinations for the distinct data sets, the volume of data calculated, and the number of processes
available. Remember that in some cases the overhead of splitting up and dispatching the calculations
into smaller sets may outweigh the benefit of breaking them up in the first place. In that situation, youmay want to consider using less combinations and bigger sets of data. In most cases there will be an
optimal configuration but it is very important to keep in mind that a proper amount of testing and
benchmarking should be completed before deploying system-wide: If you are not careful you could
potentially cause too many processes to be consumed in a high user load setting, so you should be
very cautious with defining the proper number of parallel processes to be used and the number of
users executing the actual script.
7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
21/31
How To Implement the RUNLOGIC_PH Keyword in SAP Business Objects Planning and Consolidation 10.0, version for
NetWeaver
May 2013 15
4.1Import the attached ABAP transportMake sure you import the transport from Appendix A into a BPC 10.0, Version for NetWeaver system.
Follow the standard procedure for importing an ABAP transport.
IMPORTANT NOTE:The ABAP code delivered with this transport belongs to a Package named"ZBPC".
4.2Parallel Degree Setup...
1. Log onto the BPC 10.0, version for NetWeaver system with SAP Gui:
2. Navigate to transaction SPROand click on the SAP Reference IMG button:
3. First verify that the RFC Server Group has been configured correctly in the BPC Global
Parameters. This parameter is called PARALLEL_SERVER_GROUP . You can use this
parameter to designate a specific Server Group you want the processes to be executed on.
7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
22/31
How To Implement the RUNLOGIC_PH Keyword in SAP Business Objects Planning and Consolidation 10.0, version for
NetWeaver
May 2013 16
4. Typically, the default value is parallel_generators which can be changed in transaction RZ12:
5. Now go back to the SAP Customizing IMG screen and find the Environment/Model combinationyou want to set the PARALLELSCRIPT parameter for. This parameter will control the total
number of processes the RUNLOGIC_PH Keyword can run at one time per Environment/Model
combination. (NOTE: If both parameters exist the Model setting prevails)
6. Create the PARALLELSCRIPT parameterand set the number of desired Parallel Processes in
the box labeled Value as shown below.
NOTE:This number will depend on many different factors related to the system hardware, such
as the available number of CPUs and RAM, in addition to how many other processes will berunning at the same time and how many active users in the system at the time of script
execution.
7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
23/31
7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
24/31
How To Implement the RUNLOGIC_PH Keyword in SAP Business Objects Planning and Consolidation 10.0, version for
NetWeaver
May 2013 18
4.3Parallelize by a Dimension CombinationThe script used in this example attempts to reflect the business scenario described in Section 1.2. It
multiplies a Volume account by a Price account and stores the result in a Sales account using a
*WHEN/*REC/*ENDWHEN based syntax in the BPC NetWeaver Script Logic editor. Lets assume
that we want to run it with a combination of ENTITY and TIME, with all the other dimensions remaining
the same as they were in the original script.
4.3.1 Identify Original Script
We assume the business has already defined this calculation, lets take a look at an example script
named CALC_SALES_ORIG.LGF
NOTE:This script assumes that Volumes are populated for some Customer-Product combination
and that the Price is populated for all Products where Customer = NO_CUSTOMER. It will multiply
Volume by Price per Product and places the result on an account named SALES.
4.3.2 Create a New Script for TestingNow lets copy CALC_SALES_ORIG.LGF to a new script that will be called by RUNLOGIC_PH andsplit across data sets provided by the RUNLOGIC_PH CHANGED Parameter.
Name the new script CALC_SALES.LGF (See APPENDIX B for the Script used in this Step):
NOTE:The only thing we changed in this new script is the XDIM specification for TIME andENTITY, using the special keys %TIME_SET% and %ENTITY_SET%, i.e. members providedthrough the current view. The RUNLOGIC_PH Keyword will provide these values to the callingscript based on the DIMENSION and CHANGED parameters.
7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
25/31
How To Implement the RUNLOGIC_PH Keyword in SAP Business Objects Planning and Consolidation 10.0, version for
NetWeaver
May 2013 19
4.3.3 Create the Calling Script (RUNLOGIC_PH)
Now we create the calling script CALC_SALES_DIM_COMBO.LGF (See APPENDIX C for the Script
used in this Step). This script calls RUNLOGIC_PH and specifies the script to be called in addition to
the data set (DIMENSION Parameter) and on what dimension to split the data set (CHANGED
Parameter). For the CHANGED Parameter, we want to run it with a combination of ENTITY and
TIME, with all the other dimensions remaining the same as they were in the original script. This
specification means that the data set (base members of TIME for 2011 and 2012 and base
members of ENTITY for the AMER node) will be split according to unique combinations of TIME and
ENTITY.
4.3.4 Run the Calling Script (RUNLOGIC_PH)
Execute the calling script (CALC_SALES_DIM_COMBO.LGF) from a Data Manager Package. You
can monitor the backend server activity by using transaction SM50,where you can see 1
background process (running the BAdI) and 4 dialog processes (each running a different combination
of ENTITY and TIME).
NOTE:In order to make the run times comparable, you must delete all postings from the targetSales Account first.
7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
26/31
How To Implement the RUNLOGIC_PH Keyword in SAP Business Objects Planning and Consolidation 10.0, version for
NetWeaver
May 2013 20
4.4Parallelize by a PropertyLets rewrite thecalling Script from Section 4.3 using the CHANGED syntax for Properties. The new
syntax will still perform the same calculation of multiplying a Volume account by a Price account and
storing the result in a Sales account, but will group the data sets to be executed based on a Property
in TIME (such as Year). Here we show you the TIME dimension member list used in this example:
When would this work better than splitting the data by ID?
This might work better in cases when you have a significant difference in the number ofrecords for each month (seasonal activity), but the number of records year over year is
pretty stable. Instead of running the script in each process by month, you would run thescript in each process by year. This allows the parallelization to take place on evenamounts of data per process instead of too much data in one process and not enoughdata in others.
4.4.1 Create the new Calling Script (RUNLOGIC_PH)
Now we create the calling script CALC_SALES_PROPERTY.LGF (See APPENDIX D for the Script
used in this Step). This script calls RUNLOGIC_PH and specifies the script to be called in addition to
the data set (DIMENSION Parameter) and on what dimension to split the data set (CHANGED
Parameter). For the CHANGED Parameter, we want to run it based on the Property value of TIME,
with all the other dimensions remaining the same as they were in the original script. This specificationmeans that the data set (base members for 2011 and 2012) will be split according to unique values of
Property YEAR resulting in two processes executed with a years wo rth of data in each.
7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
27/31
How To Implement the RUNLOGIC_PH Keyword in SAP Business Objects Planning and Consolidation 10.0, version for
NetWeaver
May 2013 21
4.4.2 Run the Calling Script (RUNLOGIC_PH)
Execute the calling script (CALC_SALES_PROPERTY.LGF) from a Data Manager Package. You can
monitor the backend server activity by using transaction SM50, where you can see 1 background
process (running BAdI) and 2 dialog processes (running one years worth of dataeach).
NOTE:In order to make the run times comparable, you must delete all postings from the target
Sales Account first.
7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
28/31
How To Implement the RUNLOGIC_PH Keyword in SAP Business Objects Planning and Consolidation 10.0, version for
NetWeaver
May 2013 22
4.5Parallelize by a Hierarchy NodeLets rewrite the calling Script from Section 4.3 using the CHANGED syntax for Hierarchy Nodes. The
new syntax will still perform the same calculation of multiplying a Volume account by a Price account
and storing the result in a Sales account, but will group the data sets to be executed based on a
Hierarchy Node.
For this example, its important to know what the Hierarchy looks like. Lets assume the following
Hierarchy for ENTITY:
4.5.1 Create the new Calling Script (RUNLOGIC_PH)
Now we create the calling script CALC_SALES_HIERARCHY.LGF (See APPENDIX E for the Scriptused in this Step). This script calls RUNLOGIC_PH and specifies the script to be called in addition to
the data set (DIMENSION Parameter) and on what dimension to split the data set (CHANGED
Parameter). For the CHANGED Parameter, we want to run it based on a Hierarchy Node of ENTITY,
with all the other dimensions remaining the same as they were in the original script. This specification
means that the data set (base members of ENTITY for the AMER node) will be split according to the
children of the node values specified in the CHANGED parameter. This will result in four processes
being executed (the first with the ch ildren of ENTITY node USA, the second with the children of
ENTITY node CANADA, the third with the children of ENTITY node CHILE, and the forth with the
children of ENTITY node MEXICO).
7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
29/31
How To Implement the RUNLOGIC_PH Keyword in SAP Business Objects Planning and Consolidation 10.0, version for
NetWeaver
May 2013 23
When would this work better than splitting the data by ID?
This might work better in the case when each of the base members (different sizedentities) has a significant difference in the number of records to be processed, but thenumber of records at node level (evenly sized countries) is pretty stable. Instead ofrunning the script in each process by entity, you would run the script in each process bycountry. This allows the parallelization to take place on even amounts of data perprocess instead of too much data in one process and not enough data in others.
4.5.2 Run the Calling Script (RUNLOGIC_PH)Execute the calling script (CALC_SALES_HIERARCHY.LGF) from a Data Manager Package. You can
monitor the backend server activity by using transaction SM50, where you can see 1 background
process (running BAdI) and 4 dialog processes (the first process running for Entities under the USA
node, the second process running for Entities under the CANADAnode, the third process running for
Entities under the CHILEnode, and the fourth process running for Entities under the MEXICO
node).
NOTE:In order to make the run times comparable, you must delete all postings from the target
Sales Account first.
7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
30/31
How To Implement the RUNLOGIC_PH Keyword in SAP Business Objects Planning and Consolidation 10.0, version for
NetWeaver
May 2013 24
5. Appendix
Appendix AABAP Transport for BPC NetWeaver RUNLOGIC_PHKeyword
This ABAP transport contains the Classes / Function Modules / Enhancement Objects needed for theBPC NetWeaver RUNLOGIC_PH Keyword.
NOTE:delivered within an ABAP package named "ZBPC"
(Ask your Basis Administrator to import the R and K files as a transport)
Appendix BCALC_SALES.LGFCALC_SALES.LGF from Section 4.3.2
Appendix CCAL_SALES_DIM_COMBO.LGF
CAL_SALES_DIM_COMBO.LGF from Section 4.3.3
Appendix DCALC_SALES_PROPERTY.LGF
CALC_SALES_PROPERTY.LGF from Section 4.4.1
Appendix ECALC_SALES_HIERARCHY.LGF
CALC_SALES_HIERARCHY.LGF from Section 4.5.1
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e00d1cd3-3148-3010-8f97-fea5e7a1fa6chttp://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e00d1cd3-3148-3010-8f97-fea5e7a1fa6chttp://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e00d1cd3-3148-3010-8f97-fea5e7a1fa6chttp://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e00d1cd3-3148-3010-8f97-fea5e7a1fa6chttp://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e00d1cd3-3148-3010-8f97-fea5e7a1fa6c7/22/2019 How to Implement RUNLOGIC_PH Keyword in SAP BPC Version for NetWeaver
31/31
www.sdn.sap.com/irj/sdn/howtoguides