P_MatDocHavingRetOrCancel
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)
| Source | Alias | Join Type |
|---|---|---|
| I_MaterialDocumentRecord | _MatDoc | from |
| I_GoodsMovementType | GoodsMovement | inner |
Parameters (2)
| Name | Type | Default |
|---|---|---|
| P_StartDate | bedat | |
| P_EndDate | bedat |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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 */
;
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