Back to the CDS view extraction..
After the Overview in part I and Delta deep dive in part II, I would like to spend the final blog on some miscellaneous points regarding CDS view based extraction.
The topic of hierarchy extraction deserves a small section, as some things have changed here in contrast to the classical extractors. You will need to make some changes to your hierachy bearing characteristics in order to work with the hierarchy CDS views. This is due to the fact that the node texts are not delivered by the actual hiercharchy CDS view, but a separate one.
We’ll use the Cost Center hierarchy as example. You will need the following three CDS views for getting the complete picture for a cost center hierarchy across:
◉ Cost Center Hierarchy Node (I_COSTCENTERHIERARCHYNODE)
◉ Cost Center Hierarchy Node Text (I_COSTCENTERHIERARCHYNODET)
◉ Cost Center Text (I_COSTCENTERTEXT)
You will need to equip a characteristic Cost Center, ZCOSTCTR in our case, with two additional external characteristics in the hierarchy:
After the Overview in part I and Delta deep dive in part II, I would like to spend the final blog on some miscellaneous points regarding CDS view based extraction.
Hierarchy extraction
The topic of hierarchy extraction deserves a small section, as some things have changed here in contrast to the classical extractors. You will need to make some changes to your hierachy bearing characteristics in order to work with the hierarchy CDS views. This is due to the fact that the node texts are not delivered by the actual hiercharchy CDS view, but a separate one.
We’ll use the Cost Center hierarchy as example. You will need the following three CDS views for getting the complete picture for a cost center hierarchy across:
◉ Cost Center Hierarchy Node (I_COSTCENTERHIERARCHYNODE)
◉ Cost Center Hierarchy Node Text (I_COSTCENTERHIERARCHYNODET)
◉ Cost Center Text (I_COSTCENTERTEXT)
You will need to equip a characteristic Cost Center, ZCOSTCTR in our case, with two additional external characteristics in the hierarchy:
One characteristic for the Cost Center Hierarchy ID (ZCOCTRHID) type CHAR40.
One characteristic for the Cost Center Hierarchy Node Text (ZCOCTRHNT) type CHAR50, compounded to the Cost Center Hierarchy ID
The hierarchy transformation between a DataSource based on CDS view Cost Center Hierarchy Node (I_COSTCENTERHIERARCHYNODE) and the cost center characteristic needs to be mapped as follows (Segment 0003):
The hierarchy node texts will be delivered via a DataSource based on CDS view Cost Center Hierarchy Node (I_COSTCENTERHIERARCHYNODE) and loaded into the characteristic Cost Center Hierarchy Node Text (ZCOCTRHNT)
The cost center texts will be delivered via a DataSource based on CDS view Cost Center Text (I_COSTCENTERTEXT) directly into the cost center characteristic as usual:
Just for completenes, please note that the two additional characteristics needed as external hierarchy characteristics can have different lengths according to a particular hierarchy characteristic (e.g. GL Accounts, Profit Centers etc.). Please make sure to check them in the respective hierarchy node CDS view first.
Testing CDS view extraction
With classic extractors the Extractor Checker S-API (transaction RSA3) is your friend on source system side. No need replicate a DataSource to BW side etc. Bad news, you cannot use RSA3 to test your extraction enabled CDS views.
How can you test CDS view extraction? The good news, you can use report RODPS_REPL_TEST.
Before sharing the details, please consider the warning on top (Warning: Not Simulated): Initializing a delta and/or running a delta extraction with the report will trigger a real subscription in the ODQ frame work. This is no dummy run.
When starting the report RODPS_REPL_TEST you will need to fill the fields as shown in the screen shot below.
The ODP Name equals the @AbapCatalog.sqlViewName again and is suffixed by the data category classification in the CDS view:
◉ $P for master data attributes
◉ $T for texts
◉ $H for hierarchies
◉ $F for facts/transaction data
◉ $E for other/without dataCategory
After you are done with testing please make sure to press Reset Delta so your ODQ subscription can be cleaned.
One speciality for the hierarchy extraction test. For being able to see the extracted hierarchy data you will need to check the hierarchy segement that you would like to see, i.e. use F4 value help for Projections
While in RSA3 you can navigate to the different segements via a drop-down
in RODPS_REPL_TEST you can double-click on the figures to jump to these segment entries.
Units, Currencies, Fiscal Year Variants via CDS
In SAP BW and SAP BW/4HANA you will most likely also want to work with the units of measurement, currencies, currency conversion rates and fiscal year variants as they are maintained in your SAP S/4HANA system. In the on-premise world, this means a right click on your source system, choosing options
◉ Transfer Exchange Rates
◉ Transfer Global Settings
This is the same for a SAP S/4HANA Cloud source sytem in the ODP_CDS context:
In case you do not see these menu entries for your SAP S/4HANA Cloud source system, please check SAP note 2792996.
Alternatively after implementing the SAP note you can call up the reports RSIMPCUST (currencies, units of measurement and fiscal year variants) and RSIMPCURR (exchange rates) and trigger the replication manually or scheduled via process chain.
No comments:
Post a Comment