This Data Flow Specification (DFS) defines the end-to-end data flow required to meet the following requirements:
The objective of the Stock Balances Analytical Model is to provide a comprehensive view of Material/Plant/Storage Location/Stock Type values and quantities at a given date, which reconciles to MB52.
Quantities and values are obtained from a combination of Goods Movement (MM) documents and Fi adjustment postings.
Snapshots of monthly and weekly inventories will be created and partitioned (how so it makes sense?)
A persisted/portioned flow, containing aggregated data will also be created. This aggregated view will carry the stock balances for a month by Material/Plant/Storage Location/Stock Type. The current month stock movements will be union-ed to it to get to the current month ending balance.
No differentiation in the handling of EWM managed plants are required. EWM handles the process, but each movement is reflected as a GoodsMovementDocument in table MSEG. This allows for a single process to calculate Closing Inventory.
The standard CDS views for physical stock and plant stock for EWM managed plants will be extracted and made available for reporting (if required for cross instance reporting...).
Need some words here.

| Extractor Name | Build Jira Ref For Extension Information |
|---|---|
No inbound field adjustments are applied. Standard technical fields are retained as delivered
Source: 1TL_S4Hx_I_GOODSMOVEMENTDOCUMENTDEX
Purpose:
Projection:
Add as Key: MaterialDocument
Note, keep keys MaterialDocumentKey1 - 6 for Delta Capture.
Projection:
Source: 2VR_S2HARM_GoodsMovementDocumentDEX & xxxxxxxx

Filters:
Projection:
Accept default union mappings
Source: 3VR_P2FINC_MaterialStock

Calculation:
RecordType
used for Non-Cumulative Key Figures to track inventory balance over time.
Data Type: Integer
Expression: case when 'PostingDate' < '20251231' then 2
when 'PostingDate' = '20251231' then 1
else 0 end
Note: The dates must be parameterised to set the marker based on an input table.
Projection: TBD
Supports:
Includes technical details for:
| Report Field Description | SAP Table-Field Name / process | Comments / Calculation / Formula / Restriction dimensions and values | Aggregation of data | Example SAP field data |
| CurrentStock | MatlStkChangeQtyInBaseUnit | Non-Cumulative Record Type Field: RecordType TimeDimension: PostingDate Earliest Reporting Start Date: TBD LatestReportingEndDate: TBD Set Unbooked Values to 0: X | LAST | 1,000 |
tbd
tbd