Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
Showing results for 
Search instead for 
Did you mean: 

Core Data Service Views (CDS) offer the possibility of reporting daily inventory values without the need to set up and fill info structures.

Every company must be able to show and report its inventories and, above all, be able to control them. For some companies, it is also important to be able to see the development of their stock on a weekly or even daily basis. For retail companies in particular, there is also the need to track not only the quantities but also the development of inventory values. In SAP ECC, this was made possible by updating information structures and transferring data to an SAP BW system using so-called 2LIS extractors. In this blog, I would like to discuss the possibilities in S/4HANA systems using CDS views, as in certain scenarios it is no longer possible to update the required info structures. In addition, the approach using CDS views offers the avoidance of non-posting times and the extraction of values without an S-API. This can be used within SAP Datasphere scenarios using CDS-CDC datasources.

General challenge in reporting inventory quantities and values:

In order to be able to display the inventory key figures as time series accurate to the day in the past, the required data was and is loaded into corresponding BW systems (SAP BW, SAP BW on HANA or SAP BW/4HANA) via the 2LIS_03* DataSources. This is done by extracting the current stock via the DataSource 2LIS_03_BX and adding the movements of the materials come via 2LIS_03_BF. These two sources can be used to generate the time series for the quantities. To be able to display the values accurately, we also need all documents that generate price changes. These can be, for example, revaluations for own products or adjustment invoices for third-party products that were not yet known at the time of the actual material movement. We receive these revaluations via the DataSource 2LIS_03_UM (or 2LIS_40_REVAL). The corresponding transactions in ECC, such as MC.5, are based on information structures such as S033, which are maintained via transaction OM09. Without these methods, the reporting of a stock value is only possible at the end of the period.

It is also possible in SAP S/4HANA systems using the options mentioned above. However, challenges arise if SAP Datasphere is to be used instead of an SAP Business Warehouse. This cannot read the above-mentioned DataSources directly but requires the SAP BW Bridge. On the other hand, the S/4HANA source system can no longer manage info structure S033 with data if late locks are to be used when posting goods movements. However, this is particularly required by retailers with a high volume of documents, who in turn often rely on the daily value representations. In the following sections I will describe how this can be done.

Options for data extraction in SAP S/4HANA

The CDS-based extraction of data is the current and future data extraction method to be selected, primarily due to the Change Data Capture procedure.

By now it is possible to extract the goods movements via the CDS view I_GoodsMovementDocumentDEX. However, the revaluations are missing here. There are standard views for extracting the current material valuations. However, these do not enable the creation of valid time series for the stock value. (See First Guidance: Inventory Handling in SAP BW/4HANA)

Possibilities in SAP S/4HANA Embedded Analytics

SAP S/4HANA Embedded Analytics enables real-time reporting within the operational transactional SAP S/4HANA system. This is based on analytical CDS views. For stock evaluations, SAP Virtual Data Model (VDM) offers these two CDS views, among others:

C_StockQtyCurrentValue_3 - Material stock for current valuation

C_MaterialStockTimeSeries - Material stock quantities over time

However, it is not possible to evaluate the stock values over time.

How to get relevant documents for revaluation from ACDOCA

In both scenarios described above,, the standard options provided by SAP do not include the revaluations that 2LIS_03_UM used to provide in order to be able to display daily time series for stock values.

For my customers' initial prototypes, I took the route of selecting the values via ACDOCA.

A corresponding representation of a model in an SAP BW/4HANA system is shown below and is based on the CDS view I_GLAccountLineItemRawData for the ACDOCA postings:

Possible Datamodell in SAP BW/4HANA:
Possible Datamodell in SAP BW/4HANAPossible Datamodell in SAP BW/4HANA

Unfortunately, there is currently no standard view delivered by SAP for selecting the relevant postings. I am currently using the following filters:

Filter Settings Part 1:
Filter Settings Part 2

For reporting in S/4HANA Embedded Analytics, this report could be modeled by implementing the revaluations in an analytical cube, which is combined with the inventory quantities via Union. However, the values of the goods movements would also have to be updated in the standard cube for the quantities.


Core Data Service Views offer the possibility of reporting daily stock values without the need to set up and fill info structures. The selection logic for revaluations may still need to be refined in order to guarantee secure data management. I am hoping for a corresponding view from SAP that reliably selects all necessary postings. This would open up new and more flexible possibilities for inventory controlling.

Until then, I look forward to your feedback! What selections would you make here on the ACDOCA posting documents? Are you already taking the approach of analyzing stock quantities and values via CDS views?

And how do you deal with stock valuation by storage location? (This will be the topic of one of my next blog entries).

How do you rate the topic? What topics are you dealing with along the sales & supply chain analytics? You can find the link to my main topics on my profile.
For which use cases have you found smart solutions for extending the SAP standard?

Labels in this area