Professional Documents
Culture Documents
SAP (SAP America, Inc. and SAP AG) assumes no responsibility for errors or omissions in these materials.
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.
1 Business Scenario
You have setup an operating concern and self defined hierarchies for CO-PA in a R/3 system. You want
to use this hierarchy in the reporting of your connected BW system. The R/3 PlugIns provide
DataSources and extraction modules only for the upload of certain hierarchies, e.g. cost center, cost
element, account, customer, material, etc. No DataSources exist for self defined hierarchies in CO-PA.
2 The Result
In order to upload the self defined CO-PA hierarchies, you have to run a report to generate the
corresponding DataSource. After you have replicated this DataSource to the BW system, you can
upload the hierarchy with an InfoPackage and subsequently use it in your query definitions. The
prerequisite for uploading a CO-PA hierarchy to BW is the existence of the Plugin PI 2001.1 or PI-A
2001.1.
In addition to the PlugIn, you also need the report enclosed in the Appendix of this document. It is
planned to incorporate the report in the next version of the PlugIn. The report does not support the
creation of DataSources for compounded InfoObjects, since the compound information for an InfoObject
does not reside in the R/3 system any more (as in the BW release 1.2). The report also does not
perform extensive consistency checks. It is therefore not recommended to adapt the report to fit your
own requirements.
From Plug-In Release PI2004.1 the hierarchy extractor CO-PA was delivered in the standard release.
The new hierarchy extractor in Profitability Analysis (CO-PA) allows you to load into SAP BW
hierarchies for CO-PA characteristics that you have generated using the Define Characteristic Hierarchy
function (transaction KES3). Therefore, from PI2004.1, you no longer have to use program
ZRKEBWHIERARCHY to create the corresponding DataSource. In place of this program, you can use
the new IMG activity Create Hierarchy DataSource (transaction KEB1) in the IMG under Data Transfer
into the SAP Business Information Warehouse ? Setting for Application-Specific DataSources (PI) ?
Profitability Analysis.
Name of DataSource:
User defined name for the
DataSource
Description:
User defined description for the
DataSource
InfoObject:
InfoObject of the hierarchy
(has to be derived from BW)
CO-PA characteristic:
Name of the CO-PA
Operating concern:
Name of the operating concern
3.2
Appendix
REPORT ZRKEBWHIERARCHY MESSAGE-ID RD.
* do not change this program because it updates dictionary
* tables without check of consistency. you have to do the check by
* your own. so avoid to create inconsistencies and ask responsible
TYPE
TYPE
LIKE
TYPE
TYPE
TYPE
TYPE
TYPE
data: g_err
G_FIELDTAB
g_s_FIELDTAB
G_TABNAME
sy-subrc,
RKEA1_FIELDTAB,
RKEA1_FIELDTAB_ENTRY,
DD02L-TABNAME.
like
TYPE
type
LIKE
rsaot_s_osgen,
rsaot_t_osgenfd,
rsgenost,
rsaot_t_osgentext,
rsaot_s_ohiecat,
rsaot_s_ohiecom,
rsaot_t_ohiecom,
rsaot_t_messages.
" DataSource
" Description
" Basis char.
SELECTION-SCREEN
parameters: P_ER
P_C1
selection-screen
start-of-selection.
* DataSource header
clear ls_datasource.
ls_datasource-OLTPSOURCE
ls_datasource-TYPE
ls_datasource-APPLNM
ls_datasource-BASOSOURCE
ls_datasource-EXMETHOD
ls_datasource-EXTRACTOR
ls_datasource-STRUCTURE
ls_datasource-TSTPNM
ls_datasource-TSTPDAT
ls_datasource-TSTPTIM
=
=
=
=
=
=
=
=
=
=
p_ds.
'HIER'.
'CO-PA'.
p_ch.
'F1'.
'RKE_BIW_HIERARCHY_TRANSFER'.
'ROHIEROS'.
sy-uname.
sy-datum.
sy-uzeit.
* DataSource text
ls_datasourcetext-LANGU
= SY-langu.
ls_datasourcetext-OLTPSOURCE = p_ds.
ls_datasourcetext-TXTSH
= p_dp.
ls_datasourcetext-TXTMD
= p_dp.
ls_datasourcetext-TXTLG
= p_dp.
append ls_datasourcetext to lt_datasourcetext.
* Hierarchy information
clear ls_oshiecat.
ls_oshiecat-oltpsource
ls_oshiecat-objvers
ls_oshiecat-typehc
ls_oshiecat-domanm
ls_oshiecat-rollnm
ls_oshiecat-fhcatalog
ls_oshiecat-hietabfl
APPEND 'OLTPSOURCE'
=
=
=
=
=
=
=
TO
p_ds.
'A'.
'EIS'.
g_s_FIELDTAB-domname.
g_s_FIELDTAB-rollname.
'RKE_BIW_HIERARCHY_CATALOG'.
'X'.
lt_datasourcefields.