This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
3.1 BPC Model ............................................................................................................................................. 5
Related Content ................................................................................................................................................ 44
Plans are always made with a goal in mind, and financial plans, budgets and forecasts are no different. That goal might be the Revenue or Contribution target that you have been set by the Sales Director, for example. The target you are aiming for might be the result of a complex set of inter-related variables, for example:
You are a divisional sales head targeted on Trade Spend and Contribution
Contribution is dependent on, amongst other things, upon:
o the volume of each type of the many products you sell
o the price you sell them at, and how much they cost to make and distribute
o the additional volume you will sell if you run promotions or offer discounts
o the cost of those promotions or discounts
To put together a realistic plan that meets your objectives within the constraints of this model requires a planning solution that supports efficient and accurate goal-seeking, with the ability to quickly try different scenarios and receive fast feedback. The characteristics of such a system need to include:
The ability to quickly make alternative versions of a plan, amend them, and compare the results
against the original plan, and other alternative versions – so-called “What-If Planning”.
The ability to change fundamental assumptions such and immediately see the effect of this on the
target KPIs. For example, upon changing a product price you want to immediately be able to see
the effect on Contribution across all customers.
The ability to quickly change a large number of data points in a consistent manner. For example, in
a new scenario you want to increase the total volume of a product sold to all customers over all
months, and have the difference distributed over the customers and months using the same ratios
that those data already display, or by referring the ratios found in historical data.
The ability to make those changes to large volumes of data whilst locking down certain data points.
For example, you want to test an alternative scenario where the overall volume is 2% more than
your existing scenario, but sales for to a certain customer are not increased because they have
already signed up to a fixed volume deal for the year.
2. Details and Usage
This section will detail how our distribution with locking solution works from the user’s point of view.
Log in to EPM Office Add-in Excel
How to Perform Distributions that Respect Locked Cells in SAP Business Planning and Consolidation
After logging in, click on “EPM” ribbon, then, click on “Open” in the next menu, and press on “Open Server Input Form Folder”.
Then, click on “01_PLAN” in the left pane, and “IS02_SALES_VOLUME” in the right pane.
The base Plan for 2013 has not been initialized yet.
You could initialize the base Plan based on the reference to other data.
To do that, double click on the cell for TOTAL_CUSTOMER and 2013 Total, input an amount, tick the third option “Reference to other data”, and select members. Press on “OK”.
Then, press on the refresh button, the data of the template will be updated.
How to Perform Distributions that Respect Locked Cells in SAP Business Planning and Consolidation
After having created your “what ifs” scenario based on the Base Plan, you would to modify the amount to distribute and to freeze some cells, you could use the break-back functionality.
To do that, select the cell(s) to lock, then, click on “Lock selection” into the Simulation ribbon.
Then, right click on the cell for TOTAL_CUSTOMER and the time 2013, input an amount, tick the second option “Existing Distribution”. Press on “OK”.
To finish, press on the refresh button, the data of the template will be update except your cells locked.
3. Step-by-step Instructions
3.1 BPC Model
This demo has been created on the latest version EPM 10 NW SP12 Patch 1.NET4.
The technical name of the environment is DEMO_SAP, it is made up of one model: SALES_PLANNING : Sales planning process (Financial Model) ;
The model SALES_PLANNING comprises 8 dimensions: BF_ACCOUNT (Account type);
BF_CATEGORY (Category type);
BF_COUNTRY (Entity type);
BF_CUSTOMER (No type);
How to Perform Distributions that Respect Locked Cells in SAP Business Planning and Consolidation
In the Options tab, you could define the placement of total members ( e.g. Top or Bottom), if it is an input form or a report (Use an Input Form), if you want calculate automatically all parents in hierarchy before saving data, or remove empty rows and columns.
Then, press on the button “Ok”
The EPM – Report Editor will hide, and your template will be created.
To modify the formatting you can use the default formatting sheet called “Format Input”.
How to Perform Distributions that Respect Locked Cells in SAP Business Planning and Consolidation
To use this formatting, you need to go back to the EPM – Report Editor, so, click on Edit Report into the “EPM” ribbon.
In the Options tab, you will define the tab “Format INPUT” as the default formatting sheet.
Then, press on the button “Ok”
On the next screen you can see that the template has been updated with the formatting.
3.2 BAdI
In order to provide the distribution logic that respects locked cells in the NetWeaver backend, we will implement a BAdI using the UJ_CUSTOM_LOGIC Enhancement Spot. The BAdI implementation as well as the supporting code (class ZCL_UJLOGIC_DISTRIBUTION_LOCK) are provided in the attached transport files. You should ask your BASIS consultant to import the transport into your NetWeaver environment in the usual way, via transaction STMS.
How to Perform Distributions that Respect Locked Cells in SAP Business Planning and Consolidation
UJ_CUSTOM_LOGIC implementation ZBPC_DISTRIBUTION_WITH_LOCK – you can view this in
transaction SE19.
ABAP Class ZCL_UJLOGIC_DISTRIBUTION_LOCK – this contains the logic.
Please note that the code has been designed to work for the demonstration Environment and will require full testing/ amendment if it is to be used in a productive solution. This is intended as a demonstration of this approach to fulfilling the distribution with locking functionality only.
3.3 Script Logic to Call BAdI
In this step, we will develop the script to call the BADI which we created in the previous section.
Log to the Planning and Consolidation Administration.
Navigate to the Rules menu, select Logic Scripts and the right model.
How to Perform Distributions that Respect Locked Cells in SAP Business Planning and Consolidation
Concerning the structure of Script Logic, a script can be broken down into 3 components:
Scoping- What am I running the data on? *XDIM_Memberset
Body/Code – What do I want to do with the scoped records? Custom BADI
Writing the record *Commit
To manage the distribution, an ABAP custom logic called “DISTRIBUTE_WITH_LOCK” has been created. So, to pass parameters to the ABAP custom logic The START_BADI and END_BADI syntax has to be used.
There are two optional parameters you can use within a *START_BADI / *END_BADI instruction.
QUERY=ON/OFF //optional; default is OFF WRITE=ON/OFF //optional; default is OFF
Query performs a default query and Write automatically writes back the data.
Set QUERY parameter to OFF if you want to perform your own read inside the BADI implementation;
Set WRITE to OFF to not write back query results automatically. You may code to write to another application from the BADI.
In the DISTRIBUTION logic script, four more parameters have been added:
DISTRIBUTE_AMOUNT = $DISTRIBUTION_AMOUNT$
This parameter is used to save the amount input into the Distribute pop up.
DISTRIBUTION_METHOD = $DISTRIBUTION_METHOD$
The interest of this parameter is to save the type of distribution selected into the Distribute pop up (Equal distribution, Existing distribution, or Reference to other data).
LOCKED_CELLS = $LOCKED_CELLS$
This parameter is used to save all locked cells by the user into the Sales Volume Input Schedule.
REFERENCE_DATA = $REFERENCE_DATA$
Latest parameter is only used when the third distribution method is selected by the user. The category and Time members chosen will be used with this parameter.
How to Perform Distributions that Respect Locked Cells in SAP Business Planning and Consolidation
The interest of this parameter is to define the amount to distribute.
%DISTRIBUTION_METHOD%
This parameter is used to define which type of distribution.
%LOCKED_CELLS%
This parameter is used to define all locked cells.
%REFERENCE_DATA%
This parameter is used only when the third distribution method is selected by the user. The category and Time members chosen will be used with this parameter.
%DESTINATION%
The interest of this parameter is to define the type of distribution selected into the Distribute pop up (Equal distribution, Existing distribution, Reference to other data).
In the second part of the dynamic script, has been used the INFO, and TASK instructions:
There are two INFO statements here. The parameter “EQU” is used as the splitter between parameter and value (e.g.in A=B, EQU is just “=”). The parameter “TAB” is used to separate whole parameter & value sets (e.g. for A=B;C=D, the TAB is “;”). You can see how these two variables are used in the final TASK line of this dynamic script file.
The following tasks except the last are usually used to know whish user launches the package, for which environment and model, and which logic script will be used.
The latest task allows you to save all the previous parameters.
If this package was not automatically launched by the Distribution pop up, the user should define the following information to launch the distribution:
%DISTRIBUTE_AMOUNT%
How to Perform Distributions that Respect Locked Cells in SAP Business Planning and Consolidation
Asking the user to enter the long string to identify the locked cells is clearly not an elegant solution. In this solution we will describe how to use visual basic to:
(a) Allow the user to specify which cells they wish to lock by selecting the cells and clicking on a “lock”
button.
(b) Execute the Data Manager package, bypassing the prompt pop-up, and passing through the
required variables, including the locked cells.
First, we’ll create the function to lock the cells the user has selected. Note that we won’t be able to execute this code until we’ve create the custom Excel ribbon in the next section.
How to Perform Distributions that Respect Locked Cells in SAP Business Planning and Consolidation
Copy the Visual Basic code in the following two Appendices:
Visual Basic for Locking/ Unlocking Cells
Visual Basic for Excel Custom Ribbon
Next, we’ll create the pop-up that allows the user to specify the distribution amount, the distribution method and, in the case the user choses “reference to data”, the Category and Year of the reference data.
How to Perform Distributions that Respect Locked Cells in SAP Business Planning and Consolidation
Copy and paste the code from the following Appendices into the module:
Calculate Locked Cells String
Return range of a report
Determine if cell is locked
Return the cell context in lock format
Get the context of a report cell
Return a formatted tuple
Create answer prompt xml file
Add a StringList pair to the xml file
Add a StringList pair parent to the xml file
Add a single selection parameter to the xml file
Get the current view member for a specified dimension
3.6 Custom Excel Ribbon
It is possible to trigger some standard BPC Functions such as expand, refresh, send data, run a package … with the EPM or Data Manager ribbons.
But in some cases, the user would like to execute directly a specific task like an allocation, a copy, … without to multiply the click to find the right package in the DM ribbon, or to use some dumpy buttons.
The following part will explain how to add easily the custom Ribbon “Simulation” in order to use the break back functionality using the tools Custom UI Editor for Microsoft Office.
Firstly, you need to download and install Custom UI Editor for Microsoft Office. It is available from the link below:
Save your template with “.xlsm” extension, and close the file.
Start the Custom UI Editor and go to File menu and click on Open button, then, select your file.
Right-click on the file name in the left pane, and then, select “Office 2007 Custom UI Part”.
Note:
Office 2007 Custom UI Part will be recognize by Office 2007 and 2010, it is not the case for Office 2010 Custom UI Part which it is only recognize by Office 2010
How to Perform Distributions that Respect Locked Cells in SAP Business Planning and Consolidation
This code loops through all cells in the report and, when it finds a cell that is locked, it adds its context information to the return string. The format for a single locked cell is:
Set rngReport = ActiveSheet.Range(strUpperLeft & ":" & strLowerRight)
End Function
4.6 Visual Basic to determine if cell is “locked”
This function returns a Boolean indicating when a cell is locked or not. It determines this by interrogating the format conditions and determining whether there are any.
Private Function isCellLocked(rngCell As Range) As Boolean
If rngCell.FormatConditions.Count = 0 Then
isCellLocked = False
Else
isCellLocked = True
End If
End Function
How to Perform Distributions that Respect Locked Cells in SAP Business Planning and Consolidation
4.8 Visual Basic to get the context of a report cell
When passed a cell reference (type Range) and the name of a dimension, this function returns the dimension member of that cell’s context (assuming that the dimension in question is defined in the rows or columns).
Public Function strContextSpecifiedDimension(rngCell As Range, strDimension) As String
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, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.
IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation.
Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.
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 Oracle Corporation.
JavaScript is a registered trademark of Oracle Corporation, used under license for technology invented and implemented by Netscape.
SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, 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 other countries.
Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects S.A. in the United States and in other countries. Business Objects is an SAP company.
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 with respect 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.