The loading process of Inventory Management data in BW/4HANA is different than that in the predecessor versions (BW 7.4 and below). This blog will attempt to explain how to load Inventory Management data in BW/4HANA, and also how the data is saved in the BW database tables.
SAP has simplified the loading process substantially by making advanced DSOs Inventory ready, as compared to loading Inventory data in InfoCubes (BW 7.4 and below). Process of Marker Updates has been eradicated.
Inventory DataSources :-
- 2LIS_03_BX – Stock Initialization for Inventory Management
This structure is used to extract the stock data from MM Inventory Management for initialization to a BW system.
- 2LIS_03_BF – Goods Movements from Inventory Management
This structure is used to extract the material movement data from MM Inventory Management (MM-IM) consistently to a BW system.
Base Tables – MKPF and MSEG
- 2LIS_03_UM – Revaluations
This structure is used to extract the revaluation data from MM Inventory Management (MM-IM) consistently to a BW system.
Base Tables – BKPF and BSEG
Usage of 2LIS_03_BX of course depends upon how many years of historical data exists in the S4/HANA MM Inventory Management. Ideally, if up to only 3 years of Historical Data exists, then entire data can be pulled from 2LIS_03_BF and 2LIS_03_UM.
All the pre-requisites before initial load remain the same. For e.g. :-
- All users should be locked in S4/HANA from posting any data.
- Loading sequence
2LIS_03_BX –> 2LIS_03_BF –> 2LIS_03_UM
STANDARD BI CONTENT FLOW – BW/4HANA
MODELLING PROPERTIES OF ADVANCED DSO
General modeling properties of an advanced DSO with non-cumulative key figures :-
Make sure to check the Inventory check-box. Alternatively, Template “Inventory” can be chosen to auto select the required properties.
For advanced DSOs, reference points contain the initialization records i.e. the initial stock balances in our scenario. Unlike for InfoCubes, they are not stored for the fixed date 9999-12-31 (infinity) but for the date as provided in the data record. Furthermore, reference points are updated whenever a request with delta movements is activated. In other words, reference points are the stock values of the initialization plus/minus those of all activated requests with delta movements. Please note that we use the term ‘activate’ instead of ‘collapse’ in the context of advanced DSOs.
It is important to understand the concept of ‘Record Type’ (RECORDTP) in order to identify whether data records have been (semantically) contained in the reference point.
Non-cumulative advanced DSOs use the technical field ‘Record Type’ (RECORDTP) to differentiate between
- The so-called reference points with RECORDTP=‘1’ – This is for the reference point table records. While writing the initial stock balances into the inbound table, BW fills the technical field ‘Record Type’ (RECORDTP) with value ‘1’.
- Records that are not yet (semantically) contained in the reference points with RECORDTP=‘0’ – The delta records that are loaded in the inbound table have RECORDTP=‘0’.
- Records that are already (semantically) contained in the reference points with RECORDTP=‘2’ – Once the Delta Requests (TSNs) are activated, the RECORDTP for those records change to ‘2’ in the active data table. The Historical records that are loaded have RECORDTP=‘2’ in the inbound table, as well as in the Active data table.
INVENTORY ADVANCED DSO – DATABASE TABLES
ADSO Name for example: NCUMADSO
|/BIC/ANCUMADSO2||Active Data Table|
|/BIC/ANCUMADSO5||Reference Point Table|
- Inbound Table – New requests are loaded into the inbound table. For an advanced DSO with property ‘All Characteristics are Key, Reporting on Union of Inbound and Active Table’, the inbound table has very similar semantics to the F fact table of a classic InfoCube.
- Active Data Table – Activating a request transfers the data from the inbound table to the active data table. The activation of requests for an advanced DSO (Non-Cumulative/Inventory type) is semantically very similar to the collapse of requests in InfoCubes. From this point of view, the active data table behaves like an E fact table of a classic InfoCube.
- Change Log – The change log is always created but not written for advanced DSO with property ‘All Characteristics are Key, Reporting on Union of Inbound and Active Table’.
Validity Table – The validity table stores the time interval(s) for which non-cumulative values have been loaded into the InfoProvider.
- Reference Point Table – The reference point table contains reference points for non-cumulative key figures. Unlike for InfoCubes, reference points are stored in a separate table for advanced DSOs.
- Let’s assume the following initial stock balances in S4/HANA system:-
- With the removal of PSAs and InfoPackages in BW/4HANA, DTPs are used for the initial load into advanced DSOs.
- To load data from 2LIS_03_BX, which is a one time load, it is imperative to select the Extraction Mode as “Initial Non-Cumulative for Non-Cumulative Values” in the DTP.
- While writing the initial stock balances into the inbound table by executing the DTP above, BW filled the technical field ‘Record Type’ (RECORDTP) with value ‘1’.
- After loading the initial stock balances, we activate that request. The activation of a request with initial stock balances transfers the data from the inbound table to the reference points table. The reference point table (ending at ‘5’) contains reference points for non-cumulative key figures.
- The record type is still ‘1’ and the values of the most granular time characteristic CALDAY remain as originally loaded.
- Time characteristics other than the most granular one are generated into the reference point table but always filled with initial values.
- To do so we create a simple DTP from DataSource 2LIS_03_BF (or 2LIS_03_UM) into the advanced DSO with a filter on CALDAY > ‘Date for which initial stock is loaded’ (2015-02-22 in this case) and run it.
- Delta movements are loaded for record type ‘0’. Consequently, we see new records in the inbound table with RECORDTP=’0′ after loading the delta movements. Please note that transaction SE16 shows an empty string for RECORDTP instead of the type-related initial value (here: 0) that is stored on the database.
- Content of the reference point table after activating delta movements :-
The system updated the records in the reference point table while activating the delta movements.
Let’s verify that for material A100 in plant S400:
100 reference point before activating the delta movements
-70 goods issue on 2015-02-25
+150 goods receipt on 2015-02-26
180 new reference point value after activating the delta movements
HISTORICAL DATA LOAD
- To load historical movements i.e. those stock changes that occurred before the initialization (on 2015-02-22 in our scenario).
- To do so we create a DTP from DataSource 2LIS_03_BF (or 2LIS_03_UM) into advanced DSO with a filter on CALDAY < ‘2015-02-22’ and check the checkbox for ‘Historical Transactions’ in ‘Data Update Type in the Data Targets’ section.
- Historical movements are loaded for record type ‘2’.
- Consequently, we see new records in the inbound table with RECORDTP=’2′ after loading the historical movements
- The activation of a request with historical movements transfers the data from the inbound table to the active data table. The record type is still ‘2’ and the request information is gone, which is the expected behavior when activating a request in an advanced DSO with the modeling properties shown previously.
- Please note that the reference points were not updated. Historical movements are already (semantically) contained in the reference points. That is why the reference point table is not updated when activating a request with historical movements.