9 hours ago
Using ALV abap code I want to extract backadated inventory stock report
| Table | Purpose |
| MARDH | Historical storage location stock (Previous period stock, Monthly historical stock) |
| MBEWH | Historical valuation data(Historical Stock value, Std Price history) |
| MCHBH | Historical batch stock(Historical batch quantities) |
| MKPF | Material document header |
| MSEG | Material document items (ECC) |
| MATDOC | Material movements (S/4HANA) |
| MARA | General Material Data |
| MAKT | Material Description |
6 hours ago
Hello @vanajakshi_raghavendra
As you have mentioned MATDOC in your question, let me assume you are on S/4HANA already.
MARDH, MBEWH, MCHBH, MKPF, MSEG are not really DB tables anymore. They are simulated by replacement objects with MATDOC data. See the note 2206980 - Material Inventory Management: change of data model in S/4HANA So at the end of the day you get your data from MATDOC, even if you select from MKPF, MSEG, etc.
MARDH, MBEWH, MCHBH provide historical stock on monthly basis. You could get stock level at the end of a month from there and then calculate back to the exact date with MATDOC movement types.
You could also use Material Stock at Posting Date C_MaterialStockByKeyDate CDS view to get the data for your report.
Also consider SAP standard Stock for Posting Date report, transaction MB5B.
Best regards
Dominik Tylczynski