P_MatDocHavingRetOrCancel

DDL: P_MATDOCHAVINGRETORCANCEL SQL: PMATDOCRETCANCL Type: view CONSUMPTION

Material document returned or cancelled

P_MatDocHavingRetOrCancel is a Consumption CDS View that provides data about "Material document returned or cancelled" in SAP S/4HANA. It reads from 2 data sources (I_MaterialDocumentRecord, I_GoodsMovementType) and exposes 12 fields with key fields MaterialDocument, MaterialDocumentItem, MaterialDocumentYear.

Data Sources (2)

SourceAliasJoin Type
I_MaterialDocumentRecord _MatDoc from
I_GoodsMovementType GoodsMovement inner

Parameters (2)

NameTypeDefault
P_StartDate bedat
P_EndDate bedat

Annotations (9)

NameValueLevelField
AbapCatalog.sqlViewName PMATDOCRETCANCL view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
EndUserText.label Material document returned or cancelled view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view
VDM.private true view
AccessControl.personalData.blocking #NOT_REQUIRED view

Fields (12)

KeyFieldSource TableSource FieldDescription
KEY MaterialDocument I_MaterialDocumentRecord MaterialDocument Material Doc.
KEY MaterialDocumentItem I_MaterialDocumentRecord MaterialDocumentItem Material Document Item
KEY MaterialDocumentYear I_MaterialDocumentRecord MaterialDocumentYear Material Document Year
PurchaseOrder I_MaterialDocumentRecord PurchaseOrder Purchasing Document
PurchaseOrderItem I_MaterialDocumentRecord PurchaseOrderItem Purchasing Document Item
QuantityInBaseUnit I_MaterialDocumentRecord QuantityInBaseUnit Quantity
GoodsReceiptQtyInOrderUnit I_MaterialDocumentRecord GoodsReceiptQtyInOrderUnit
PostingDate I_MaterialDocumentRecord PostingDate Posting Date for GR
DebitCreditCode I_MaterialDocumentRecord DebitCreditCode Single-Character Flag
IsReversalMovementType I_MaterialDocumentRecord IsReversalMovementType RevMvmtTypeInd.
InvtryMgmtReferenceDocument I_MaterialDocumentRecord InvtryMgmtReferenceDocument Reference Doc.
InvtryMgmtRefDocumentItem I_MaterialDocumentRecord InvtryMgmtRefDocumentItem Ref. Doc. Item

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 P_MatDocHavingRetOrCancel.
-- 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.
-- SQL view name: PMATDOCRETCANCL
-- Parameters: P_StartDate : bedat, P_EndDate : bedat

CREATE VIEW P_MatDocHavingRetOrCancel AS
SELECT
  _MatDoc.MaterialDocument AS MaterialDocument,
  _MatDoc.MaterialDocumentItem AS MaterialDocumentItem,
  _MatDoc.MaterialDocumentYear AS MaterialDocumentYear,
  _MatDoc.PurchaseOrder AS PurchaseOrder,
  _MatDoc.PurchaseOrderItem AS PurchaseOrderItem,
  _MatDoc.QuantityInBaseUnit AS QuantityInBaseUnit,
  _MatDoc.GoodsReceiptQtyInOrderUnit AS GoodsReceiptQtyInOrderUnit,
  _MatDoc.PostingDate AS PostingDate,
  _MatDoc.DebitCreditCode AS DebitCreditCode,
  _MatDoc.IsReversalMovementType AS IsReversalMovementType,
  _MatDoc.InvtryMgmtReferenceDocument AS InvtryMgmtReferenceDocument,
  _MatDoc.InvtryMgmtRefDocumentItem AS InvtryMgmtRefDocumentItem
FROM I_MaterialDocumentRecord AS _MatDoc
INNER JOIN I_GoodsMovementType AS GoodsMovement ON /* join condition not captured in parsed metadata */
;