You are on page 1of 60

SAP BOBJ Planning &

Consolidation (BPC),
version for NetWeaver
How-To Guide

How To... Retract data from BPC 7.5


NetWeaver to SAP ERP Cost Center
Accounting, Part I

Applicable Releases:
SAP BusinessObjects Planning and Consolidation 7.5, version for SAP
NetWeaver, SP01 and higher.
SAP Enterprise Resource Planning Central Component 6.0 and higher
(Financials/Controlling/Cost Center Accounting)

Version 1.0
July 2010

Copyright 2010 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 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.
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 for
errors 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.

Document History
Document Version

Description

1.00

Initial version of this guide

Typographic Conventions

Icons

Type Style

Description

Icon

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 and


their 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.

<Example
text>

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, for


example, F2 or ENTER.

Description
Caution
Note or Important
Example
Recommendation or Tip

Table of Contents
1.

Business Scenario ..........................................................................................................1

2.

Background Information .................................................................................................2


2.1
2.2
2.3

More information on Cost Center Planning ................................................................2


More Information on the BAPI Framework .................................................................4
More Information on the BAdI Framework .................................................................4

3.

Prerequisites....................................................................................................................5

4.

Step-by-Step Procedure ..................................................................................................6


4.1
4.2
4.3
4.4
4.5
4.6
4.7
4.8

5.

Import the attached ABAP transport ..........................................................................6


Create the BPC BAdI Implementation .......................................................................6
Create a copy of APSHELL to test the Retractor ..................................................... 18
Add the required BPC Dimension Properties and values for mapping to the ERP
system ....................................................................................................................24
Add a Web Admin Parameter for the ERP System you will be retracting to .............. 29
Create a Data Manager Package and Transformation File for executing the
Retraction BAdI.......................................................................................................33
Test/Execute the Retraction Data Manager Package............................................... 41
Log onto the ERP System and verify your results .................................................... 49

Appendix........................................................................................................................ 53

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

1. Business Scenario
When creating plans and budgets within planning applications such as SAP BusinessObjects Planning
and Consolidation, version for SAP NetWeaver (hereafter referred to as BPC NW) there is often a
need to retract or transfer this data back into the underlying operational systems (such as SAP ERP).
Data retraction is the technical means of creating a connection between the planned data created in
BPC NW and the plan and actual data stored in the operational system. You can use data retraction
to transfer the planned data generated in BPC NW (for example; Primary Costs, Activity Inputs,
Activities/prices, and Statistical Key Figures or Cost Drivers) to your SAP ERP System. The BPC NW
Retraction BAdI provides an enhancement option, allowing you to accomplish this integration. (For
more detailed background information about the SAP BAdI Framework, see Section 2.3)
One important scenario which might require this retraction is cost center planning. Imagine an
organization with various different working versions of a budget that have been created using BPC
NW (modeled at a cost center / summary account level, for instance). Once a final budget has been
approved within BPC NW, the organization decides to retract or transfer the approved numbers back
into SAP ERP so that it can leverage additional operational planning capabilities (such as automatic
budget control to prevent budget overruns). While there are no doubt many different ways that an
organization might want to perform data retraction; this guide only focuses on retracting data to Cost
Center Accounting (CO-OM-CCA). For more detailed background information on Overhead Cost
Controlling and Cost Center Planning on the SAP ERP side, see Section 2.1.
In this guide, we will show you how to use the BPC NW Retraction BAdI to post primary costs back to
SAP ERP Cost Center Planning with a Cost Center Planning BAPI. There are four main entry points
(BAPIs) for posting planned data into Cost Center Accounting (CO-OM-CCA); Post Primary Costs,
Post Key Figures, Post Activity Output, and Post Activity Input. The BAPI we are using is called Post
Primary Costs (See APPENDIX H) and is well documented in the SAP ERP System you will be
retracting to. (For detailed background information about the SAP BAPI Framework, see Section 2.2).
Within BPC NW, you can execute a data manager package to call the Retraction BAdI (See Section
4.7). In the data package execution parameters, you can filter the data set you want to retract, as well
as provide a transformation file to manipulate the data before it is sent to the Retraction BAdI. For this
example guide, we are not performing any transformations to the data before it reaches the Retraction
BAdI.
The mapping of data from the BPC NW data model to the SAP ERP Cost Center Accounting model is
done primarily through the use of properties which have been defined on three specific dimensions
(See Section 4.4):

In order to test this retraction scenario, example data was generated for this guide (See Sections 4.7
and 4.8). The screen shot below represents a very simple model on both sides (BPC NW and SAP
ERP) and is primarily intended to give you an idea of what is possible it is NOT intended to cover all
business scenarios of retracting BPC NW planned data to SAP ERP Cost Center Accounting.

March 2014

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

IMPORTANT NOTES for this How To Guide:


This guide only supports Periodic measures on a Periodic BPC Application
This guide only supports retraction of one years data from a single controlling area and into
one SAP ERP planning version
This guide only shows an example of posting primary costs to Cost Center Planning within
SAP ERP. In order to do more complex retraction scenarios you will need to evaluate your
BPC data model and how it can be designed for mapping back to the ERP module of your
choice.
This paper assumes that in your BPC model you are explicitly budgeting by Activity Type. If
you dont plan by Activity Type you can set up a dummy one in ERP.
If you have modeled your BPC data on a higher level summary account then you will need to
handle the disaggregation logic yourself in the BAdI so that it appropriately matches up with
the detailed accounts within SAP ERP.

2. Background Information
The following sections go into more detail and background on some of the areas of knowledge which
are desirable for using this How To Guide.

2.1 More information on Cost Center Planning


Planning enables organizations to set goals in cooperation amongst its stakeholders. By comparing
actual events (such as those stored within SAP ERP) with those anticipated in planning, you can
identify variances that serve as navigation signals for correcting internal processes.
The SAP Business Suite contains a planning framework for integrating organizational plans across the
entire enterprise from purchasing to manufacturing to sales and distribution, along with all the other
functions which support the organizations efforts. Enterprise Resource Planning (ERP) software
helps to manage the planning process for personnel, for materials, and for the inputs and outputs of
activities and resources. It further serves to record the financial impact of the plans to determine the
resulting revenues, costs, assets, liabilities and cash flows of the organization.

March 2014

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

Within the ERP system, the Overhead Cost Controlling (CO-OM) components are used for planning,
managing and monitoring overhead costs and budgets associated with each of the above. Overhead
Cost Controlling offers various methods for assisting in an organizational planning approach. The
following lists some of those methods.
Planning views can be used for decentralized planning with individual cost elements or cost
centers, or for centralized planning with groups of cost elements or cost centers.
Planning versions can be based on various perspectives or assumptions. For example,
versions for optimistic, realistic, and pessimistic scenarios can be defined.
The ERP system includes standard data entry screens called planning layouts, or custom
layouts can be created to meet specific requirements.
Planner profiles control the process flow in planning and are used to determine which planning
layout is used for each planning area.
The system contains a lock indicator to prevent changes to plan data based on several factors
including version, planning object, period, year, and system transaction.
Finally, planning tools exist which simplify the creation of plan data such as a flexible
parameter based copy functions, planning formulas which perform mathematical calculations,
and revaluation functions to apply percentage changes to plan amounts.
Despite the rich, integrated features of cost planning in the ERP system, increasingly many
organizations are adopting planning software which resides outside of the SAP Business Suite. BPC
NW is attractive to many organizations since it offers some benefits which are not easily achievable
using the planning tools in SAP Controlling. The following lists some of those benefits.
Flexible data models to plan on any object and on any level of detail
Easy setup and administration of the planning environment with reduced reliance on IT
oversight, putting more power in the hands of the users
A modern presentation interface for the planning screens allowing improved personalization
and reduced training requirements
Microsoft Office based data input and reporting with full access to all of the Office productivity
tools
Tight integration with the SAP NetWeaver Business Intelligence solutions
Organizations that use BPC NW often need a means to post their final plan data to the ERP system,
otherwise known as a retraction process which is described with greater detail in Section 1.
In addition to the obvious benefit of providing real-time reporting of plan versus actual costs, there are
at least two other use cases for the BPC NW Retraction BAdI:
Establish planned activity prices, especially for product costing.
o

Planning costs and activity quantities help calculate prices for use in cost allocation.
The planned prices are the basis for valuating internal activities during the current
period, before the actual costs are known. Cost planning is therefore a prerequisite to
standard costing which is handled by the Product Cost Controlling (CO-PC)
application in the ERP system.

Set budgets to use availability control.


o

March 2014

Whereas planning results are created from expected values that are based on
assumptions, the budget determines the maximum values allowed and, if required, the
amounts by which they can be exceeded. The higher levels of an organization set the
budget for lower subareas. Thus budgeting is approved from the top down, while
budgets are managed from the bottom up. Availability Control is a feature in SAP
Controlling that can aid in the budget management process by systematically setting a
limit on future cost expenditures.

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

2.2 More Information on the BAPI Framework


BAPIs (Business Application Programming Interfaces) are the standard SAP interfaces within SAP
Business Suite. They play an important role in the technical integration and in the exchange of
business data between SAP components, and between SAP and non-SAP components. BAPIs
enable you to integrate these components and are therefore an important part of developing
integration scenarios where multiple components are connected to each other, either on a local
network or on the Internet.
BAPIs allow integration at the business level, not the technical level. This provides for greater stability
of the linkage and independence from the underlying communication technology.
BAPIs are implemented as RFC-enabled function modules and are created in the Function Builder of
the ABAP Workbench of the SAP ERP system. You can access the BAPI Library with transaction
code /nBAPI.
For more detailed documentation of the BAPI Framework, please refer to the SAP Help Site for BAPIs
(see Section 3 Additional Documentation).

2.3 More Information on the BAdI Framework


SAP 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-Ins that 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 that allows the end user to retract data to
SAP ERP Cost Center Planning by executing a data manager package from the Excel client for BPC
NW. 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 example ABAP code that goes along with this guides Business Scenario as well
as necessary attachments and references. 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 Scenario it 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 3 Additional Documentation).

March 2014

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

3. Prerequisites
Required/recommended expertise or prior knowledge
SAP BusinessObjects Planning and Consolidation 7.5, version for SAP NetWeaver
ABAP programming skills
SAP ERP CO Module Cost Center Accounting, Cost Center Planning, Activity Type Planning
Access to SAP NetWeaver transaction codes: SE20, SE19, SE38, SE80, SE24, STMS
Access to SAP ERP transaction codes : BAPI, SE37, KP07
Relevant SAP Notes:
SAP Note 192235 WAIT parameter for BAPI_TRANSACTION_COMMIT
SAP Note 450442 BAPI: Data is not updated
SAP Note 420646 EnjoySAP purchase orders via BAPI not updated in SE37
Additional Documentation:
RKT Online Knowledge Product
http://service.sap.com/rkt On the left hand side, navigate to SAP Ramp-Up Knowledge
Transfer -> SAP BusinessObjects EPM Solutions -> SAP BO PC 7.5, version for SAP
NetWeaver
Other EPM How-To Guides
http://wiki.sdn.sap.com/wiki/display/BPX/Enterprise+Performance+Management+%28EP
M%29+How-to+Guides
SAP Help Library Business Add Ins (BAdI)
http://help.sap.com/saphelp_nw70/helpdata/en/8f/f2e540f8648431e10000000a1550b0/fr
ameset.htm
SAP Help Library Business Application Programming Interface (BAPI)
http://help.sap.com/saphelp_erp60/helpdata/en/26/73e5064bde11d192f20000e829fbc6/f
rameset.htm
SAP Help Library Financials
http://help.sap.com/saphelp_erp60/helpdata/en/38/e34434c0df0c6ee10000009b38f83b/fr
ameset.htm
SAP Help Library Controlling
http://help.sap.com/saphelp_erp60/helpdata/en/18/e9293504e1fd77e10000009b38f889/f
rameset.htm
SAP Help Library Cost Center Accounting
http://help.sap.com/saphelp_erp60/helpdata/en/08/513e4243b511d182b30000e829fbfe/f
rameset.htm
SAP Help Library Cost Center Planning
http://help.sap.com/saphelp_erp60/helpdata/en/dd/4298375ae2f84ae10000009b38f8cf/fr
ameset.htm
SAP Help Library Primary Cost Planning
http://help.sap.com/saphelp_erp60/helpdata/en/08/51480843b511d182b30000e829fbfe/f
rameset.htm
SAP Help Library - Activity Type Planning
http://help.sap.com/saphelp_erp60/helpdata/en/08/5147ee43b511d182b30000e829fbfe/f
rameset.htm

March 2014

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

4. Step-by-Step Procedure
This How-To guide outlines the procedure for implementing the BPC 7.5 Retraction capability
according to the Business Scenario described in Section 1. There are several overall steps required
for setting up and implementing the BPC 7.5 Retraction BAdI according to this guide:
1) Import the ABAP transport from Appendix A into the BPC 7.5, Version for NetWeaver System that
this Retraction Scenario should be run on.
2) Create the BAdI Implementation according to Section 4.2. (You will find the main retraction method
example source code in Appendix B).
3) Create a copy of APSHELL for testing according to Section 4.3.
4) Add the required BPC Dimension Properties and values according to Section 4.4.
IMPORTANT: These properties define the underlying ERP mapping back to the Cost Center Planning
Module. In order for this Retraction Scenario to work, these properties must exist and be filled with
values that exist on the ERP system you will be retracting to this dimension property relationship
essentially drives the Cost Object model that you are posting to within ERP.
5) Add a Web Admin Parameter for the ERP System you will be retracting to according to Section 4.5.
6) Create a Data Manager Package and Transformation File for executing the Retraction BAdI
according to Section 4.6.
7) Test/Execute the Retraction Data Manager Package according to Section 4.7.
8) Log into ERP System and verify your results according to Section 4.8.

4.1 Import the attached ABAP transport


Make sure you import this transport into a BPC 7.5, Version for NetWeaver system.
Follow the standard procedure for importing an ABAP transport.

4.2 Create the BPC BAdI Implementation


This guide shows you how to implement the BPC 7.5, Version for NetWeaver Retraction BAdI. The
Retraction BAdI will be defined under the Enhancement Spot UJD_RETRACT which is pre-delivered
with BPC 7.5, Version for NetWeaver.
A BAdI implementation is the term used in the Enhancement Framework for an enhancement
implementation element. A BAdI implementation consists of a BAdI implementation class that
implements the BAdI interface. The BAdI implementation also contains a filter condition which is
specified in the BAdI definition. This filter condition can be used to select and execute the BAdI
implementation at runtime.
The following steps outline the creation of this BAdI implementation and its configuration for execution
from the BPC 7.5, Version for NetWeaver front end Data Manager interface.
1. Log on to the BPC 7.5, Version for NetWeaver system via SAPgui. Enter transaction SE18 and
press Enter.

March 2014

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

2. In the initial screen, enter the name of the corresponding enhancement spot. Enter
UJD_RETRACT, and click Display.

3. On the left side of the screen, expand the BAdI definition tree by clicking on the
should then see the following nodes:

icon. You

Interf

Interface
Filter
Implementations

March 2014

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

4. Right-click on the Implementations node, and choose Create BAdI Implementation.

5. If an enhancement implementation already exists, a dialog listing all implementations will be


displayed. Click the Create button in the lower right hand corner. If this dialog is not
displayed, continue to step 6

March 2014

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

6. In this dialog, enter the name of the enhancement implementation and the short description.
Name it as ZUJ_EI_RTRCT_POSTPRIMCOST with description BPC Enhancement: Post
Primary Costs to ERP. Then click the green check to continue

7. Enter the name of a package name for transporting this BAdI to another system in your
landscape or click Local Object if you do not plan on transporting this BAdI.

8. If you are presented with this dialog, then select your enhancement implementation which was
just created from the previous steps, and click the green check. If there are no other previous
implementations, go directly to the dialog box shown in step 9

9. In this dialog, enter the name of the BAdI Implementation as


ZUJ_BAdI_RTRCT_POSTPRIMCOST, and enter the description BPC BAdI: Post Primary
Costs to ERP. Also, enter the name of the implementing class as
ZCL_UJD_RTRCT_POSTPRIMCOST.

March 2014

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

10. Enter the name of a package for transporting this BAdI to another system in your landscape or
click Local Object if you do not plan on transporting this BAdI.

11. The BAdI Implementation will then be saved. Notice it is not yet active.

March 2014

10

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

12. Click on the icon next to the name of the BAdI Implementation. This will expose the following
nodes below.
Implementing Class
Filter Values

13. Double click on the Filter Val. Node.

14. Click the Change icon.

15. Click on the Combination button from the filter values screen.

March 2014

11

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

16. Now double click the newly created filter combination

17. Enter a filter name for executing this BAdI from the BPC 7.5 Data Manager Interface.
NOTE: This filter name is the trigger for executing this BAdI from within Data Manager. For this
example guide we will use the filter name POSTPRIMCOST_TO_ERP.
Click the Green Check to continue

18. Finally, save and activate by clicking the appropriate buttons (Go to step 19 once you have
clicked these buttons).

March 2014

12

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

19. In the following dialog, first click the Select All button, and then the Green Check button. All
objects should then be active

20. Finally, the code which will be executed by the BAdI implementation can now be inserted into
the implementing class. Double click on the Implementing Class node from the left side of the
screen.

21. Now double-click on the implementing class name.

March 2014

13

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

22. Due to ABAP forward navigation, the implementing class will then be displayed in the class
builder tool (Transaction SE24). Click on the Properties tab, and click the Change icon to
enter change mode.

23. Next, add a Superclass relationship click on the Superclass button:

March 2014

14

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

24. Enter the name of the BPC 7.5 Retraction Superclass (See APPENDIX A) which has been
imported to this system: ZCL_BPC_RTRCT_SUPERCLASS.
NOTE: In order for this step to work you must have already imported the source code which was
attached to this guide. In order to import this source code without errors you will need to have
an ABAP Package named ZBPC in your BPC 7.5, Version for NetWeaver system.

25. Next enter the type groups UJ00 and ABAP to this class by entering it in the box on the right

26. Click on the Methods tab Notice all of the helper methods (in blue) that are part of the
Retraction Superclass
NOTE: Using ABAP Object Oriented Programming, you can redefine these methods individually
within your BAdI Subclass (ZCL_UJD_RTRCT_POSTPRIMCOST) by using the Redefine
Method button (circled in red). This allows you to overwrite and implement your own definition
of code to be executed.

March 2014

15

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

27. Double-Click on the IF_UJD_RETRACT~RETRACT method.


NOTE: This method is delivered as part of the BPC Retraction BAdI Interface. This is where
you write your own custom ABAP to perform the retraction process. In this How To Guide, we
have provided a Superclass for reference utility functions. These utility functions perform the
actions for Posting Primary Costs to ERP (using BAPI

March 2014

16

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

28. An empty method implementation will then be shown. Notice, the method signature is displayed
at the top. If the method signature is not displayed, click the Signature button on the
application toolbar

29. Copy and paste the source code from APPENDIX B into the IF_UJD_RETRACT~RETRACT
method.

March 2014

17

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

30. Save and activate the class by clicking the appropriate buttons

You should now have the BPC 7.5 Retraction BAdI example code installed on the BPC 7.5, Version
for NetWeaver system.

4.3 Create a copy of APSHELL to test the Retractor


This guide uses the Planning Application from the APSHELL Application Set. In order to test this
Retractor we will make a copy of APSHELL into a new Application Set called APSHELL_COPY.
1. Log on to the BPC 7.5, Version for NetWeaver system via the BPC Admin Client. Select the
AppSet APSHELL and press OK.

2. Enter your BPC Front End User ID and Password

March 2014

18

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

3. Select APSHELL from the drop down on the left hand side and click on Add a new Application
Set from the Action Pane

4. Name the new Application Set APSHELL_COPY like so and click Go to next step 2 of 2.

March 2014

19

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

5. Keep the following radio buttons selected by default and click Add a New Application Set

March 2014

20

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

6. Click OK

March 2014

21

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

7. Logon to the newly created Application Set by clicking the APSHELL text

8. Run the Connection Wizard once to refresh the Application Set list (You will need to enter your
BPC Front End credentials)

9. Select your newly created Application Set from the list

March 2014

22

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

10. Click OK

March 2014

23

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

You should now have the Application Set APSHELL_COPY created in your BPC 7.5, Version for
NetWeaver System.

4.4 Add the required BPC Dimension Properties and


values for mapping to the ERP system
We will now add three new Dimension Properties for use in mapping the BPC Data Model to the ERP
Cost Center Accounting Data Model. These new Dimension Properties are described in the Business
Scenario (Section 1).
1. Log on to the BPC 7.5, Version for NetWeaver system via the BPC Admin Client. Select the
AppSet APSHELL_COPY and press OK.

2. Select the Account Dimension (P_ACCT) from the Dimension Library and click Maintain
dimension Property

3. Add the Account Dimension property ERP_CostElem with length 10 and click Modify
Dimension Property

March 2014

24

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

4. Select the Cost Center Dimension (P_CC) from the Dimension Library and click Maintain
dimension Property

5. Add the Cost Center Dimension property ERP_CostCtr with length 10 and click Modify
Dimension Property

6. Select the Activity Dimension (P_Activity) from the Dimension Library and click Maintain
dimension property

March 2014

25

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

7. Add the Activity Dimension property ERP_ActType with length 6 and click Modify Dimension
Property

8. Fill the Account Dimension member sheet with values for the newly created property
ERP_CostElem
Select the Account Dimension (P_ACCT) from the Dimension Library and click on Maintain
dimension members

9. Enter the values as shown below (See APPENDIX C) and click Process dimension:
NOTE: Your values may be different based upon the data model you will be retracting to the
ERP system

March 2014

26

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

NOTE: DO NOT FORGET TO PROCESS THE DIMENSION!


10. Fill the Cost Center Dimension member sheet with values for the created property
ERP_CostCtr
Select the Cost Center Dimension (P_CC) from the Dimension Library and click on Maintain
dimension members

11. Enter the values as shown below (See APPENDIX D) and click Process dimension:
NOTE: Your values may be different based upon the data model you will be retracting to the
ERP system

March 2014

27

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

NOTE: DO NOT FORGET TO PROCESS THE DIMENSION!


12. Fill the Activity Dimension member sheet with values for the newly created property
ERP_ActType
Select the Activity Dimension (P_Activity) from the Dimension Library and click on Maintain
dimension members

13. Enter the values as shown below (See APPENDIX E) and click Process dimension:
NOTE: Your values may be different based upon the data model you will be retracting to the
ERP system

March 2014

28

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

NOTE: DO NOT FORGET TO PROCESS THE DIMENSION!


You should now have the Application Set APSHELL_COPY and the correct properties and values
defined for the dimensions P_ACCT, P_CC, and P_Activity.

4.5 Add a Web Admin Parameter for the ERP System


you will be retracting to
In this step you will be adding a web admin parameter that defines the RFC Destination of the ERP
System you will be retracting data to. This Web Admin parameter is specific to an Application so that
you could potentially execute this same BAdI in a different Application and pointing to a different ERP
server.
1. Log onto the BPC 7.5, Version for NetWeaver system via the BPC Web Client. (Open a web
browser and enter the URL for the OSoft Landing Page). Click on Interface for the Web.
EXAMPLE: For the .NET server usphlrig20.phl.sap.corp, OSoft Landing Page URL is:
http://usphlrig20.phl.sap.corp:1080/Osoft

March 2014

29

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

2. Select your newly created Application Set APSHELL_COPY and click OK. (Enter your
credentials if prompted).

3. Select the Planning Application by clicking on the Application Not Set link in the Action Pane:

March 2014

30

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

4. Select PLANNING from the Application List and click OK

5. Select the Administration link from the Available Interfaces section of the Action Pane

March 2014

31

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

6. Click on the Set application parameters link in the Action Pane

March 2014

32

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

7. Enter a new Web Admin Parameter for the RFC Destination of the ERP System and click the
Update button. This value must be a valid RFC Destination which can connect successfully to
the target ERP System.

IMPORTANT: You must use the KeyID POSTPRIMCOST_ERP_DEST and change the value
to match the RFC Destination of the ERP System where you will be retracting your data to.
You should now have a new Web Admin Application Parameter pointing to the ERP System RFC
Destination.

4.6 Create a Data Manager Package and


Transformation File for executing the Retraction
BAdI
In order to execute this Retraction BAdI, you will need to create a new Data Manager Package in the
BPC for Excel Front End. In addition to creating the Data Manager Package you will also need to
create a transformation file for when you actually execute the package.
1. Log on to the BPC 7.5, Version for NetWeaver system via the BPC Excel Client. Select the
AppSet APSHELL_COPY and the Application PLANNING and press OK.

March 2014

33

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

1. Click on Manage Data in the Action Pane

2. Click on Maintain Data Management in the Action Pane

3. Click on Manage packages (organize list) in the Action Pane

March 2014

34

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

4. In the pop-up screen, select the Financial Process Package Group and click the Add
Package button:

5. In the Add Package pop-up window, select the drop down button for Process Chain:

March 2014

35

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

6. In the selection list of available Process Chains, make sure you are have selected the first App
Group Business Planning & Consolidation: Examples

7. Select the Process Chain /CPMB/EXPORT_TD_TO_BAdI with Description BPC: Export


transaction data to badi and click the Select button

March 2014

36

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

8. Now fill in the rest of the Retraction Data Manager Package details and click Add

NOTE: You can put your own values here as well.


9. Click Save

March 2014

37

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

10. Now we need to add a transformation file for the data export. Click on the Home Icon in the
Action Pane and then click on Manage Data

March 2014

38

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

11. Now click on Maintain transformations in the Action Pane

March 2014

39

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

12. Click on Create new transformation from the Action Pane

13. Leave everything AS IS and click Validate and save transformation definitions

NOTE: Transformation files also allow you to perform powerful data transformations to the data
being sent to the Retraction BAdI. You could perform additional business logic to the data
before it gets to the Retraction BAdI code. This guide however, does not go into detail on that
subject.
14. Save the Transformation file with the name PostPrimaryCosts_Retraction_BAdI under the
EXAMPLES directory.
NOTE: See APPENDIX F for an example transformation file.

March 2014

40

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

You should now have a Data Manager Package available in your system. You are ready to begin
testing this Retraction BAdI.

4.7 Test/Execute the Retraction Data Manager


Package
In this step we will be testing the Retraction Data Manager Package from the BPC for Excel Front End.
When you execute the Data Manager package you will be able to enter Data Manager parameters.
These parameters allow you to use the Retraction BAdI in different ways. You could restrict the data
being retracted back to the ERP system as well as schedule the package for execution. You could
also, for example, specify different transformation files to change the data before it gets to the actual
BAdI code (NOTE: we do not cover additional transformation files apart from the one in this guide).
1. Log on to the BPC 7.5, Version for NetWeaver system via the BPC Excel Client. Select the
AppSet APSHELL_COPY and the Application PLANNING and press OK.

March 2014

41

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

2. Click on Manage Data in the Action Pane

3. Click Run a package in the Action Pane

March 2014

42

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

4. In the pop-up window, select the Financial Processes Package Group and the Post Primary
Costs to ERP Data Manager Package. (This is the package you created in the previous
section). Click on the Run button.

5. In the Run Package pop-up window, click on the drop down for the Transformation File, and
select the Transformation file you created in the previous section. Click the Open button.

March 2014

43

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

6. Fill the rest of the information out on the Run Package pop-up window and click Next:

March 2014

44

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

IMPORTANT: The BAdI Name is actually the FILTER name of the BAdI we created in
Section 4.1. If you changed that filter name to something else, make sure it is reflected
here in the Data Manager Run Package pop-up window.
NOTE: This guide only supports Periodic measures on a Periodic Application at this time.
7. Fill in the dimension member restrictions (See APPENDIX G). You can save the values to a file
on the server like so:

March 2014

45

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

IMPORTANT: These restrictions were based on the data in the system this guide was
created from. The data in your system could be different and if so, you should change
these restrictions to correlate to the data in your system.
8. After you have filled in the Dimension Member restrictions click Next

March 2014

46

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

9. Verify that your selections are correct and click Finish

March 2014

47

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

10. Click Ok

11. View the status of your package

March 2014

48

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

At this point you should have been able to successfully execute the Retraction BAdI.

4.8 Log onto the ERP System and verify your results
In this last step we will log onto the ERP System where you retracted your data and verify that the
records were sent correctly
...

1. Log onto the ERP system where you retracted your data via SAPgui. Enter transaction KP07
and press Enter. (Alternatively you could use the SAP Menu as shown in the screen shot)

March 2014

49

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

2. Choose Controlling Area 1000


NOTE: This value is hardcoded in the BAdI if you have a different Controlling Area you will
have to enhance the Helper method CREATE_HEADERINFO in the class
ZCL_BPC_RTRCT_SUPERCLASS (See APPENDIX A).

3. Enter the correct data as shown in the screenshot below. Click the Overview Screen button:
NOTE: The Controlling Area, Fiscal Year, and Plan Version are all hardcoded in the BAdI if
you want to use the values from your transaction data you will have to enhance the helper
method CREATE_HEADERINFO in the class ZCL_BPC_RTRCT_SUPERCLASS (See
APPENDIX A).

NOTE: This data may also be different depending on the values you entered for the ERP
Properties in Section 4.4. For example we used Cost Elements 416200 and 416300 whereas
you could be using different Cost Elements.
March 2014

50

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

4. Verify that the total values are what you expected from the BPC Planning Application you were
sending the data from

5. Select one row of data and click the Period Screen button as shown in the screenshot:

6. Verify that the period values are what you expected from the BPC Planning Application you
were sending the data from

March 2014

51

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

7. Repeat steps 5 and 6 to verify that all of the data you were sending from BPC matches the data
you are seeing in ERP.
You should now be done verifying that the Retraction BAdI worked according to this guide.
Congratulations!

March 2014

52

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

5. Appendix
Appendix A BPC 7.5 Retraction BAdI Superclass
This ABAP transport contains the Superclass (ZCL_BPC_RTRCT_SUPERCLASS) needed for the
retraction method (Section 4.2). NOTE: delivered within an ABAP package named ZBPC.

ZCL_BPC_RTRCT_SU
PERCLASS.zip

Appendix B IF_UJD_RETRACT~RETRACT example source code


This is a document containing the Retraction Example code (Section 4.2):

IF_UJD_RETRACT~R
ETRACT.doc

Appendix C P_ACC Dimension Member Sheet


This is an attachment of the Account Dimension Member Sheet used in this guide (Section 4.5):

P_ACCT.xls

Appendix D P_CC Dimension Member Sheet


This is an attachment of the Cost Center Dimension Member Sheet used in this guide (Section 4.5):

P_CC.xls

Appendix E P_Activity Dimension Member Sheet


This is an attachment of the Activity Dimension Member Sheet used in this guide (Section 4.5):

P_Activity.xls

Appendix F Retraction Data Manager Transformation File


This is an attachment of the Transformation File used when building the Data Manager Package
(Section 4.6).

Transformation_for_
PostPrimaryCosts_Retraction_BADI.xls

Appendix G Retraction BAdI Data Manager Selection Criteria


This is an attachment of the selection criteria used during the Data Manager Package execution
(Section 4.7)

postprimarycosts_ret
raction_badi_selections.esf

March 2014

53

How To... Retract data from BPC 7.5 NetWeaver to SAP ERP Cost Center Accounting, Part I

Appendix H BAPI Documentation Details


You can browse through all the documentation for the BAPI we use in this guide (Function Module
BAPI_COSTACTPLN_POSTPRIMCOST) by logging onto your ERP System and entering transaction
code BAPI. Navigate to Cost Activity Planning as shown in the screen shot below in order to view
the Post Primary Costs BAPI that we used in this guide:

March 2014

54

www.sdn.sap.com/irj/sdn/howtoguides

You might also like