R_MatlStkDetCsgnmtDocItem
MatlStk Details Csgmnt MatDocItems
R_MatlStkDetCsgnmtDocItem is a Composite CDS View that provides data about "MatlStk Details Csgmnt MatDocItems" in SAP S/4HANA. It reads from 1 data source (I_MatlStockDocumentItemSet) and exposes 19 fields with key fields MaterialStockDocumentItemSetID, MatlStkDocumentItemSetElement. It has 1 association to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_MatlStockDocumentItemSet | I_MatlStockDocumentItemSet | from |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_MatlStockReportConsignment | _Report | $projection.MaterialStockDocumentItemSetID = _Report.MaterialStockDocumentItemSetID |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| EndUserText.label | MatlStk Details Csgmnt MatDocItems | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | false | view | |
| VDM.lifecycle.contract.type | #SAP_INTERNAL_API | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view |
Fields (19)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | MaterialStockDocumentItemSetID | MaterialStockDocumentItemSetID | Document Set Id | |
| KEY | MatlStkDocumentItemSetElement | MatlStkDocumentItemSetElement | Set Element Id | |
| MaterialStockReportUUID | _Report | MaterialStockReportUUID | ||
| MaterialStockQuantitySetID | _Report | MaterialStockQuantitySetID | ||
| MaterialDocument | MaterialDocument | Material Doc. | ||
| MaterialDocumentYear | MaterialDocumentYear | Material Document Year | ||
| MaterialDocumentItem | MaterialDocumentItem | Material Document Item | ||
| MaterialBaseUnit | _MaterialDocument | MaterialBaseUnit | Valuation Unit | |
| Product | _MaterialDocument | Material | Vehicle Model | |
| StorageLocation | _MaterialDocument | StorageLocation | StorageLocation | |
| ProductName | ||||
| PostingDate | _MaterialDocument | PostingDate | Posting Date for GR | |
| DeliveryDocument | _MaterialDocument | DeliveryDocument | Outbound Delivery | |
| DeliveryDocumentItem | _MaterialDocument | DeliveryDocumentItem | Outb. Delivery Item | |
| Batch | _MaterialDocument | Batch | Lot No. | |
| BatchBySupplier | ||||
| quan133endasMatlStkIncrQtyInMatlBaseUnit | ||||
| quan133endasMatlStkDecrQtyInMatlBaseUnit | ||||
| MatlWrhsStkQtyInMatlBaseUnit | MatlWrhsStkQtyInMatlBaseUnit | Quantity |
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 R_MatlStkDetCsgnmtDocItem.
-- 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 R_MatlStkDetCsgnmtDocItem AS
SELECT
MaterialStockDocumentItemSetID,
MatlStkDocumentItemSetElement,
_Report.MaterialStockReportUUID AS MaterialStockReportUUID,
_Report.MaterialStockQuantitySetID AS MaterialStockQuantitySetID,
MaterialDocument,
MaterialDocumentYear,
MaterialDocumentItem,
_MaterialDocument.MaterialBaseUnit AS MaterialBaseUnit,
_MaterialDocument.Material AS Product,
_MaterialDocument.StorageLocation AS StorageLocation,
_MaterialDocument._Material._Text[1: Language=$session.system_language].MaterialName AS ProductName,
_MaterialDocument.PostingDate AS PostingDate,
_MaterialDocument.DeliveryDocument AS DeliveryDocument,
_MaterialDocument.DeliveryDocumentItem AS DeliveryDocumentItem,
_MaterialDocument.Batch AS Batch,
_MaterialDocument._DeliveryDocumentItem.BatchBySupplier AS BatchBySupplier,
case when ( _MaterialDocument.MatlStkChangeQtyInBaseUnit > 0 ) then _MaterialDocument.QuantityInBaseUnit else cast( 0 as abap.quan(13,3) ) end as MatlStkIncrQtyInMatlBaseUnit AS quan133endasMatlStkIncrQtyInMatlBaseUnit,
case when ( _MaterialDocument.MatlStkChangeQtyInBaseUnit < 0 ) then _MaterialDocument.QuantityInBaseUnit else cast( 0 as abap.quan(13,3) ) end as MatlStkDecrQtyInMatlBaseUnit AS quan133endasMatlStkDecrQtyInMatlBaseUnit,
MatlWrhsStkQtyInMatlBaseUnit
FROM I_MatlStockDocumentItemSet
LEFT OUTER JOIN I_MatlStockReportConsignment AS _Report ON MaterialStockDocumentItemSetID = _Report.MaterialStockDocumentItemSetID -- association [1..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