R_MatlStkDetCsgnmtDocItem

DDL: R_MATLSTKDETCSGNMTDOCITEM Type: view_entity COMPOSITE

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 20 fields with key fields MaterialStockDocumentItemSetID, MatlStkDocumentItemSetElement. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
I_MatlStockDocumentItemSet I_MatlStockDocumentItemSet from

Associations (1)

CardinalityTargetAliasCondition
[1..1] I_MatlStockReportConsignment _Report $projection.MaterialStockDocumentItemSetID = _Report.MaterialStockDocumentItemSetID

Annotations (9)

NameValueLevelField
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 (20)

KeyFieldSource TableSource FieldDescription
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
Plant Plant Valuation Area
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,
  Plant,
  _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]
;