R_MatlStockReportOverview

DDL: R_MATLSTOCKREPORTOVERVIEW Type: view_entity TRANSACTIONAL Package: ODATA_MM_IM_STOCKOUTPUT

Stock Reporting

R_MatlStockReportOverview is a Transactional CDS View that provides data about "Stock Reporting" in SAP S/4HANA. It reads from 1 data source (I_MaterialStockReport) and exposes 23 fields with key field MaterialStockReportUUID. It has 5 associations to related views. Part of development package ODATA_MM_IM_STOCKOUTPUT.

Data Sources (1)

SourceAliasJoin Type
I_MaterialStockReport I_MaterialStockReport from

Associations (5)

CardinalityTargetAliasCondition
[0..1] P_MatlStkLastRepSubsLog _SubsLog $projection.MaterialStockSubscriptionUUID = _SubsLog.MaterialStockSubscriptionUUID and $projection.MaterialStockSubscriptionItem = _SubsLog.MaterialStockSubscriptionItem and $projection.MaterialStockReportUUID = _SubsLog.MaterialStockReportUUID
[0..*] I_MaterialStockReportStepT _MatDocItmSetStepT $projection.MaterialStockReportStep = _MatDocItmSetStepT.MaterialStockReportStep
[0..*] I_MatlStkReportStepStatusT _MatDocItemSetStatusT $projection.MaterialStockReportStepStatus = _MatDocItemSetStatusT.MaterialStockReportStepStatus
[1..1] R_MatlStkSubscrpnItemTP _Subscription $projection.MaterialStockSubscriptionUUID = _Subscription.MaterialStockSubscriptionUUID and $projection.MaterialStockSubscriptionItem = _Subscription.MaterialStockSubscriptionItem
[0..1] R_MatlStkSubscrpnHeaderTP _SubscriptionHeader $projection.MaterialStockSubscriptionUUID = _SubscriptionHeader.MaterialStockSubscriptionUUID

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Stock Reporting view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #TRANSACTIONAL view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
ObjectModel.sapObjectNodeType.name MaterialStock view

Fields (23)

KeyFieldSource TableSource FieldDescription
KEY MaterialStockReportUUID MaterialStockReportUUID Stock Report ID
MaterialStockReportNumber MaterialStockReportNumber Stock Report Nr.
MaterialStockReportYear MaterialStockReportYear Stock Report Year
MaterialStockSubscriptionUUID MaterialStockSubscriptionUUID Collection Subs. Id
MaterialStockSubscriptionItem MaterialStockSubscriptionItem Stock Reporting Subscription Id Item
MatlStkSubscrpnItemIteration _SubsLog MatlStkSubscrpnItemIteration
EmptyMatlStkReportsAreSent _Subscription EmptyMatlStkReportsAreSent Send Empty Reports
UserID _SubsLog UserID User Name
CreationDateTime _SubsLog CreationDateTime Timestamp
MaterialStockDocumentItemSetID MaterialStockDocumentItemSetID Document Set Id
MaterialStockQuantitySetID MaterialStockQuantitySetID Stock QuantitySet
FirstGoodsMovementPostingDate _SubsLog FirstGoodsMovementPostingDate Period Start
LastGoodsMovementPostingDate _SubsLog LastGoodsMovementPostingDate Period End
MaterialStockReportStep _SubsLog MaterialStockReportStep
MaterialStockReportStepStatus _SubsLog MaterialStockReportStepStatus
MatlStockReportStepMessageText _SubsLog MatlStockReportStepMessageText
Supplier _Subscription Supplier Supplier
CompanyCode _Subscription CompanyCode Receiver Company Code
Plant _Subscription Plant Valuation Area
_MatDocItmSetStepT _MatDocItmSetStepT
_MatDocItemSetStatusT _MatDocItemSetStatusT
_SubscriptionHeader _SubscriptionHeader
_Subscription _Subscription

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_MatlStockReportOverview.
-- 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_MatlStockReportOverview AS
SELECT
  MaterialStockReportUUID,
  MaterialStockReportNumber,
  MaterialStockReportYear,
  MaterialStockSubscriptionUUID,
  MaterialStockSubscriptionItem,
  _SubsLog.MatlStkSubscrpnItemIteration AS MatlStkSubscrpnItemIteration,
  _Subscription.EmptyMatlStkReportsAreSent AS EmptyMatlStkReportsAreSent,
  _SubsLog.UserID AS UserID,
  _SubsLog.CreationDateTime AS CreationDateTime,
  MaterialStockDocumentItemSetID,
  MaterialStockQuantitySetID,
  _SubsLog.FirstGoodsMovementPostingDate AS FirstGoodsMovementPostingDate,
  _SubsLog.LastGoodsMovementPostingDate AS LastGoodsMovementPostingDate,
  _SubsLog.MaterialStockReportStep AS MaterialStockReportStep,
  _SubsLog.MaterialStockReportStepStatus AS MaterialStockReportStepStatus,
  _SubsLog.MatlStockReportStepMessageText AS MatlStockReportStepMessageText,
  _Subscription.Supplier AS Supplier,
  _Subscription.CompanyCode AS CompanyCode,
  _Subscription.Plant AS Plant
FROM I_MaterialStockReport
LEFT OUTER JOIN P_MatlStkLastRepSubsLog AS _SubsLog ON MaterialStockSubscriptionUUID = _SubsLog.MaterialStockSubscriptionUUID AND MaterialStockSubscriptionItem = _SubsLog.MaterialStockSubscriptionItem AND MaterialStockReportUUID = _SubsLog.MaterialStockReportUUID  -- association [0..1]
LEFT OUTER JOIN I_MaterialStockReportStepT AS _MatDocItmSetStepT ON MaterialStockReportStep = _MatDocItmSetStepT.MaterialStockReportStep  -- association [0..*]
LEFT OUTER JOIN I_MatlStkReportStepStatusT AS _MatDocItemSetStatusT ON MaterialStockReportStepStatus = _MatDocItemSetStatusT.MaterialStockReportStepStatus  -- association [0..*]
LEFT OUTER JOIN R_MatlStkSubscrpnItemTP AS _Subscription ON MaterialStockSubscriptionUUID = _Subscription.MaterialStockSubscriptionUUID AND MaterialStockSubscriptionItem = _Subscription.MaterialStockSubscriptionItem  -- association [1..1]
LEFT OUTER JOIN R_MatlStkSubscrpnHeaderTP AS _SubscriptionHeader ON MaterialStockSubscriptionUUID = _SubscriptionHeader.MaterialStockSubscriptionUUID  -- association [0..1]
;