A_MatlStkInAcctMod
Material Stock
A_MatlStkInAcctMod is a Composite CDS View that provides data about "Material Stock" in SAP S/4HANA. It reads from 1 data source (I_MaterialStock_2) and exposes 15 fields with key fields Material, Plant, StorageLocation, Batch, Supplier. It has 2 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_MaterialStock_2 | I_MaterialStock_2 | from |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | A_MaterialStock | _MaterialStock | $projection.Material = _MaterialStock.Material |
| [1..*] | A_MaterialSerialNumber | _MaterialSerialNumber | $projection.Material = _MaterialSerialNumber.Material and $projection.Plant = _MaterialSerialNumber.Plant and $projection.StorageLocation = _MaterialSerialNumber.StorageLocation and $projection.InventorySpecialStockType = _MaterialSerialNumber.InventorySpecialStockType and $projection.Batch = _MaterialSerialNumber.Batch and $projection.InventoryStockType = _MaterialSerialNumber.InventoryStockType and $projection.Customer = _MaterialSerialNumber.Customer and $projection.Supplier = _MaterialSerialNumber.Supplier and $projection.SDDocument = _MaterialSerialNumber.SDDocument and $projection.SDDocumentItem = _MaterialSerialNumber.SDDocumentItem and $projection.WBSElementInternalID = _MaterialSerialNumber.WBSElementInternalID |
Annotations (13)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | AMATLSTKINACCMOD | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| EndUserText.label | Material Stock | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.lifecycle.contract.type | #PUBLIC_REMOTE_API | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
Fields (15)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Material | Material | Vehicle Model | |
| KEY | Plant | Plant | Valuation Area | |
| KEY | StorageLocation | StorageLocation | StorageLocation | |
| KEY | Batch | Batch | Lot No. | |
| KEY | Supplier | Supplier | Supplier | |
| KEY | Customer | Customer | Sold-to Party | |
| KEY | WBSElementInternalID | WBSElementInternalID | WBS Internal ID | |
| KEY | SDDocumentItem | SDDocumentItem | ||
| KEY | InventorySpecialStockType | InventorySpecialStockType | Special Stock Type | |
| KEY | InventoryStockType | InventoryStockType | Stock Type | |
| WBSElementExternalID | _SpclStkIdfgWBSElmntBasicData | WBSElementExternalID | WBS Element External ID | |
| 3434541MaterialBaseUnit | ||||
| MatlWrhsStkQtyInMatlBaseUnit | ||||
| _MaterialStock | _MaterialStock | |||
| _MaterialSerialNumber | _MaterialSerialNumber |
Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.
-- Derived SQL interpretation of CDS view A_MatlStkInAcctMod.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
CREATE VIEW A_MatlStkInAcctMod AS
SELECT
Material,
Plant,
StorageLocation,
Batch,
Supplier,
Customer,
WBSElementInternalID,
SDDocumentItem,
InventorySpecialStockType,
InventoryStockType,
_SpclStkIdfgWBSElmntBasicData.WBSElementExternalID AS WBSElementExternalID,
sum(MatlWrhsStkQtyInMatlBaseUnit) AS MatlWrhsStkQtyInMatlBaseUnit
FROM I_MaterialStock_2
LEFT OUTER JOIN A_MaterialStock AS _MaterialStock ON Material = _MaterialStock.Material -- association [1..1]
LEFT OUTER JOIN A_MaterialSerialNumber AS _MaterialSerialNumber ON Material = _MaterialSerialNumber.Material AND Plant = _MaterialSerialNumber.Plant AND StorageLocation = _MaterialSerialNumber.StorageLocation AND InventorySpecialStockType = _MaterialSerialNumber.InventorySpecialStockType AND Batch = _MaterialSerialNumber.Batch AND InventoryStockType = _MaterialSerialNumber.InventoryStockType AND Customer = _MaterialSerialNumber.Customer AND Supplier = _MaterialSerialNumber.Supplier AND SDDocument = _MaterialSerialNumber.SDDocument AND SDDocumentItem = _MaterialSerialNumber.SDDocumentItem AND WBSElementInternalID = _MaterialSerialNumber.WBSElementInternalID -- association [1..*]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA