P_MaterialDocumentItem_2
RAP Material Document Item
P_MaterialDocumentItem_2 is a Composite CDS View that provides data about "RAP Material Document Item" in SAP S/4HANA. It reads from 1 data source (I_MaterialDocumentRecord) and exposes 151 fields with key fields MaterialDocumentYear, MaterialDocument, MaterialDocumentItem. It has 7 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_MaterialDocumentRecord | I_MaterialDocumentRecord | from |
Associations (7)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_MaterialDocumentYear | _MaterialDocumentYear | $projection.MaterialDocumentYear = _MaterialDocumentYear.MaterialDocumentYear |
| [1..1] | I_MaterialDocumentHeader_2 | _MaterialDocumentHeader | $projection.MaterialDocumentYear = _MaterialDocumentHeader.MaterialDocumentYear and $projection.MaterialDocument = _MaterialDocumentHeader.MaterialDocument |
| [0..1] | I_MaterialDocumentHeader_2 | _ReversedMatDoc | $projection.ReversedMaterialDocumentYear = _ReversedMatDoc.MaterialDocumentYear and $projection.ReversedMaterialDocument = _ReversedMatDoc.MaterialDocument |
| [0..1] | I_MaterialDocumentItem_2 | _ReversedMatDocItem | $projection.ReversedMaterialDocumentYear = _ReversedMatDocItem.MaterialDocumentYear and $projection.ReversedMaterialDocument = _ReversedMatDocItem.MaterialDocument and $projection.ReversedMaterialDocumentItem = _ReversedMatDocItem.MaterialDocumentItem |
| [0..1] | I_Product | _Product | $projection.Material = _Product.Product |
| [0..1] | I_ReservationDocumentItem | _ReservationItem | $projection.Reservation = _ReservationItem.Reservation and $projection.ReservationItem = _ReservationItem.ReservationItem |
| [0..1] | I_GoodsMovementReasonCode | _GoodsMovementReasonCode | $projection.GoodsMovementType = _GoodsMovementReasonCode.GoodsMovementType and $projection.GoodsMovementReasonCode = _GoodsMovementReasonCode.GoodsMovementReasonCode |
Annotations (12)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.representativeKey | MaterialDocumentItem | view | |
| ObjectModel.modelingPattern | #ANALYTICAL_DIMENSION | view | |
| Search.searchable | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| EndUserText.label | RAP Material Document Item | view |
Fields (151)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | MaterialDocumentYear | MaterialDocumentYear | Material Document Year | |
| KEY | MaterialDocument | MaterialDocument | Material Doc. | |
| KEY | MaterialDocumentItem | MaterialDocumentItem | Material Document Item | |
| MaterialDocumentLine | MaterialDocumentLine | Line ID | ||
| MaterialDocumentParentLine | MaterialDocumentParentLine | Parent ID | ||
| HierarchyNodeLevel | HierarchyNodeLevel | Hierarchy Node Level | ||
| MaterialDocumentItemText | MaterialDocumentItemText | Text | ||
| Material | Material | Vehicle Model | ||
| Plant | Plant | Valuation Area | ||
| StorageLocation | StorageLocation | StorageLocation | ||
| StorageType | StorageType | Storage Type | ||
| StorageBin | StorageBin | Storage Bin | ||
| Batch | Batch | Lot No. | ||
| ShelfLifeExpirationDate | ShelfLifeExpirationDate | SLED/BBD | ||
| ManufactureDate | ManufactureDate | Date of Manuf. | ||
| Supplier | Supplier | Supplier | ||
| SalesOrder | SalesOrder | SD Document | ||
| SalesOrderItem | SalesOrderItem | Sales Order Item | ||
| SalesOrderScheduleLine | SalesOrderScheduleLine | SOrder schedule | ||
| WBSElementInternalID | WBS Internal ID | |||
| WBSElement | _WBSElement | WBSElement | WBS Internal ID | |
| Customer | Customer | Sold-to Party | ||
| InventorySpecialStockType | InventorySpecialStockType | Special Stock Type | ||
| InventoryStockType | InventoryStockType | Stock Type | ||
| StockOwner | StockOwner | Owner of stock | ||
| GoodsMovementType | GoodsMovementType | Movement Type | ||
| DebitCreditCode | DebitCreditCode | Single-Character Flag | ||
| InventoryUsabilityCode | InventoryUsabilityCode | Stock Type | ||
| QuantityInBaseUnit | QuantityInBaseUnit | Quantity | ||
| MaterialBaseUnit | MaterialBaseUnit | Valuation Unit | ||
| QuantityInEntryUnit | QuantityInEntryUnit | Quantity in Unit of Entry | ||
| EntryUnit | EntryUnit | Unit of Entry | ||
| PostingDate | PostingDate | Posting Date for GR | ||
| DocumentDate | DocumentDate | Journal Entry Date | ||
| TotalGoodsMvtAmtInCCCrcy | TotalGoodsMvtAmtInCCCrcy | |||
| CompanyCodeCurrency | CompanyCodeCurrency | Local Currency | ||
| GdsMvtExtAmtInCoCodeCrcy | GdsMvtExtAmtInCoCodeCrcy | Ext. Amount LC | ||
| InventoryValuationType | InventoryValuationType | Valuation Type | ||
| ReservationIsFinallyIssued | ReservationIsFinallyIssued | Res Final Issue | ||
| PurchaseOrder | PurchaseOrder | Purchasing Document | ||
| PurchaseOrderItem | PurchaseOrderItem | Purchasing Document Item | ||
| ProjectNetwork | ProjectNetwork | Order | ||
| ManufacturingOrder | ManufacturingOrder | Order | ||
| ManufacturingOrderItem | ManufacturingOrderItem | Manufacturing Order Item | ||
| Reservation | Reservation | Reservation | ||
| ReservationItem | ReservationItem | Reservation Item | ||
| OriginalMaterialDocumentItem | OriginalMaterialDocumentItem | Orig. line itm | ||
| SpecialStockIdfgSalesOrder | SpecialStockIdfgSalesOrder | Stock Ident Header | ||
| SpecialStockIdfgSalesOrderItem | SpecialStockIdfgSalesOrderItem | Stock Ident Item | ||
| DeliveryDocument | DeliveryDocument | Outbound Delivery | ||
| DeliveryDocumentItem | DeliveryDocumentItem | Outb. Delivery Item | ||
| ReversedMaterialDocumentYear | ReversedMaterialDocumentYear | Reversed Doc Year | ||
| ReversedMaterialDocument | ReversedMaterialDocument | Reversed Mat Doc | ||
| ReversedMaterialDocumentItem | ReversedMaterialDocumentItem | Reversed Doc Item | ||
| RvslOfGoodsReceiptIsAllowed | RvslOfGoodsReceiptIsAllowed | |||
| GoodsRecipientName | GoodsRecipientName | Recipient Name | ||
| UnloadingPointName | UnloadingPointName | Unloading Point Name | ||
| CostCenter | CostCenter | Cost Center | ||
| GLAccount | GLAccount | General Ledger | ||
| ReferenceDocumentFiscalYear | ReferenceDocumentFiscalYear | Year Cur.Period | ||
| InvtryMgmtRefDocumentItem | InvtryMgmtRefDocumentItem | Ref. Doc. Item | ||
| InvtryMgmtReferenceDocument | InvtryMgmtReferenceDocument | Reference Doc. | ||
| ServicePerformer | ServicePerformer | Service Performer | ||
| PersonWorkAgreement | PersonWorkAgreement | Personnel No. | ||
| AccountAssignmentCategory | AccountAssignmentCategory | Acct Assgmt Cat | ||
| WorkItem | WorkItem | Work Item ID | ||
| ServicesRenderedDate | ServicesRenderedDate | Services Rendered Date | ||
| EWMWarehouse | EWMWarehouse | Warehouse No. | ||
| EWMStorageBin | EWMStorageBin | Storage Bin | ||
| IssgOrRcvgMaterial | IssgOrRcvgMaterial | Transfer Material | ||
| IssuingOrReceivingPlant | IssuingOrReceivingPlant | Transfer Plant | ||
| IssuingOrReceivingStorageLoc | IssuingOrReceivingStorageLoc | Receiving SLoc. | ||
| IssgOrRcvgBatch | IssgOrRcvgBatch | Transfer Batch | ||
| IssgOrRcvgSpclStockInd | IssgOrRcvgSpclStockInd | Special Stock | ||
| IssuingOrReceivingValType | IssuingOrReceivingValType | Val. Type Tfr. | ||
| CompanyCode | CompanyCode | Receiver Company Code | ||
| BusinessArea | BusinessArea | Business Area | ||
| ControllingArea | ControllingArea | Controlling Area | ||
| CostObject | CostObject | Cost Object | ||
| ProfitabilitySegment | ProfitabilitySegment | Profitability Segment | ||
| ProfitCenter | ProfitCenter | Profit Center | ||
| FunctionalArea | FunctionalArea | Sendr Fctl Area | ||
| GoodsMovementIsCancelled | GoodsMovementIsCancelled | Is Item Cancelled | ||
| FiscalYear | FiscalYear | G/L Fiscal Year | ||
| FiscalYearPeriod | FiscalYearPeriod | Period/Year | ||
| FiscalYearVariant | FiscalYearVariant | FY Variant | ||
| GoodsMovementRefDocType | GoodsMovementRefDocType | Reference Doc. Type | ||
| GoodsMovementReasonCode | GoodsMovementReasonCode | Reason for Mvmt | ||
| IsCompletelyDelivered | IsCompletelyDelivered | Is completely delivered | ||
| IsAutomaticallyCreated | IsAutomaticallyCreated | Is Automatically Created | ||
| GoodsReceiptType | GoodsReceiptType | Receipt Ind. | ||
| ConsumptionPosting | ConsumptionPosting | Consumption Posting | ||
| MultiAcctAssgmtOriglMatlDocItm | MultiAcctAssgmtOriglMatlDocItm | |||
| MultipleAccountAssignmentCode | MultipleAccountAssignmentCode | |||
| MaterialDocumentPostingType | MaterialDocumentPostingType | Type of posting | ||
| ProductStandardID | _Product | ProductStandardID | GTIN | |
| SerialNumbersAreCreatedAutomly | SerialNumbersAreCreatedAutomly | SerialNo. auto. | ||
| ReservationEntryUnit | _ReservationItem | EntryUnit | Unit of Entry | |
| ResvnItmRequiredQtyInEntryUnit | _ReservationItem | ResvnItmRequiredQtyInEntryUnit | Quantity in UnE | |
| ReservationBaseUnit | _ReservationItem | BaseUnit | Unit of Measure | |
| ResvnItmWithdrawnQtyInBaseUnit | _ReservationItem | ResvnItmWithdrawnQtyInBaseUnit | Withdrawal Qty | |
| _MaterialDocumentYear | _MaterialDocumentYear | |||
| _MaterialDocumentHeader | _MaterialDocumentHeader | |||
| _Material | _Material | |||
| _IssgOrRcvgMaterial | _IssgOrRcvgMaterial | |||
| _Plant | _Plant | |||
| _IssuingOrReceivingPlant | _IssuingOrReceivingPlant | |||
| _StorageLocation | _StorageLocation | |||
| _IssuingOrReceivingStorageLoc | _IssuingOrReceivingStorageLoc | |||
| _Supplier | _Supplier | |||
| _Customer | _Customer | |||
| _SupplierCompanyByPlant | _SupplierCompanyByPlant | |||
| _CustomerCompanyByPlant | _CustomerCompanyByPlant | |||
| _BPStockOwner | _BPStockOwner | |||
| _InventorySpecialStockType | _InventorySpecialStockType | |||
| _IssgOrRcvgSpclStockInd | _IssgOrRcvgSpclStockInd | |||
| _InventoryStockType | _InventoryStockType | |||
| _InventoryValuationType | _InventoryValuationType | |||
| _GoodsMovementType | _GoodsMovementType | |||
| _GoodsMovementReasonCode | _GoodsMovementReasonCode | |||
| _DebitCreditCode | _DebitCreditCode | |||
| _StockType | _StockType | |||
| _StockType_2 | _StockType_2 | |||
| _MaterialBaseUnit | _MaterialBaseUnit | |||
| _EntryUnit | _EntryUnit | |||
| _GLAccount | _GLAccount | |||
| _CostCenter | _CostCenter | |||
| _BusinessPartner | _BusinessPartner | |||
| _PersonWorkAgreement | _PersonWorkAgreement | |||
| _AccountAssignmentCategory | _AccountAssignmentCategory | |||
| _WorkItem | _WorkItem | |||
| _ReservationItem | _ReservationItem | |||
| _CompanyCode | _CompanyCode | |||
| _BusinessArea | _BusinessArea | |||
| _ControllingArea | _ControllingArea | |||
| _SalesOrder | _SalesOrder | |||
| _SalesOrderItem | _SalesOrderItem | |||
| _SalesOrderScheduleLine | _SalesOrderScheduleLine | |||
| _WBSElement | _WBSElement | |||
| _PurchaseOrder | _PurchaseOrder | |||
| _PurchaseOrderItem | _PurchaseOrderItem | |||
| _ProjectNetwork | _ProjectNetwork | |||
| _ManufacturingOrder | _ManufacturingOrder | |||
| _ManufacturingOrderItem | _ManufacturingOrderItem | |||
| _DeliveryDocument | _DeliveryDocument | |||
| _DeliveryDocumentItem | _DeliveryDocumentItem | |||
| _ReversedMatDoc | _ReversedMatDoc | |||
| _ReversedMatDocItem | _ReversedMatDocItem | |||
| _GoodsMvtTypeBySpclStkIndT | _GoodsMvtTypeBySpclStkIndT | |||
| _Currency | _Currency | |||
| _Product | _Product |
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_MaterialDocumentItem_2.
-- 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 P_MaterialDocumentItem_2 AS
SELECT
MaterialDocumentYear,
MaterialDocument,
MaterialDocumentItem,
MaterialDocumentLine,
MaterialDocumentParentLine,
HierarchyNodeLevel,
MaterialDocumentItemText,
Material,
Plant,
StorageLocation,
StorageType,
StorageBin,
Batch,
ShelfLifeExpirationDate,
ManufactureDate,
Supplier,
SalesOrder,
SalesOrderItem,
SalesOrderScheduleLine,
cast(WBSElementInternalID as nsdm_wbselement_internal_id preserving type) AS WBSElementInternalID,
_WBSElement.WBSElement AS WBSElement,
Customer,
InventorySpecialStockType,
InventoryStockType,
StockOwner,
GoodsMovementType,
DebitCreditCode,
InventoryUsabilityCode,
QuantityInBaseUnit,
MaterialBaseUnit,
QuantityInEntryUnit,
EntryUnit,
PostingDate,
DocumentDate,
TotalGoodsMvtAmtInCCCrcy,
CompanyCodeCurrency,
GdsMvtExtAmtInCoCodeCrcy,
InventoryValuationType,
ReservationIsFinallyIssued,
PurchaseOrder,
PurchaseOrderItem,
ProjectNetwork,
ManufacturingOrder,
ManufacturingOrderItem,
Reservation,
ReservationItem,
OriginalMaterialDocumentItem,
SpecialStockIdfgSalesOrder,
SpecialStockIdfgSalesOrderItem,
DeliveryDocument,
DeliveryDocumentItem,
ReversedMaterialDocumentYear,
ReversedMaterialDocument,
ReversedMaterialDocumentItem,
RvslOfGoodsReceiptIsAllowed,
GoodsRecipientName,
UnloadingPointName,
CostCenter,
GLAccount,
ReferenceDocumentFiscalYear,
InvtryMgmtRefDocumentItem,
InvtryMgmtReferenceDocument,
ServicePerformer,
PersonWorkAgreement,
AccountAssignmentCategory,
WorkItem,
ServicesRenderedDate,
EWMWarehouse,
EWMStorageBin,
IssgOrRcvgMaterial,
IssuingOrReceivingPlant,
IssuingOrReceivingStorageLoc,
IssgOrRcvgBatch,
IssgOrRcvgSpclStockInd,
IssuingOrReceivingValType,
CompanyCode,
BusinessArea,
ControllingArea,
CostObject,
ProfitabilitySegment,
ProfitCenter,
FunctionalArea,
GoodsMovementIsCancelled,
FiscalYear,
FiscalYearPeriod,
FiscalYearVariant,
GoodsMovementRefDocType,
GoodsMovementReasonCode,
IsCompletelyDelivered,
IsAutomaticallyCreated,
GoodsReceiptType,
ConsumptionPosting,
MultiAcctAssgmtOriglMatlDocItm,
MultipleAccountAssignmentCode,
MaterialDocumentPostingType,
_Product.ProductStandardID AS ProductStandardID,
SerialNumbersAreCreatedAutomly,
_ReservationItem.EntryUnit AS ReservationEntryUnit,
_ReservationItem.ResvnItmRequiredQtyInEntryUnit AS ResvnItmRequiredQtyInEntryUnit,
_ReservationItem.BaseUnit AS ReservationBaseUnit,
_ReservationItem.ResvnItmWithdrawnQtyInBaseUnit AS ResvnItmWithdrawnQtyInBaseUnit
FROM I_MaterialDocumentRecord
LEFT OUTER JOIN I_MaterialDocumentYear AS _MaterialDocumentYear ON MaterialDocumentYear = _MaterialDocumentYear.MaterialDocumentYear -- association [1..1]
LEFT OUTER JOIN I_MaterialDocumentHeader_2 AS _MaterialDocumentHeader ON MaterialDocumentYear = _MaterialDocumentHeader.MaterialDocumentYear AND MaterialDocument = _MaterialDocumentHeader.MaterialDocument -- association [1..1]
LEFT OUTER JOIN I_MaterialDocumentHeader_2 AS _ReversedMatDoc ON ReversedMaterialDocumentYear = _ReversedMatDoc.MaterialDocumentYear AND ReversedMaterialDocument = _ReversedMatDoc.MaterialDocument -- association [0..1]
LEFT OUTER JOIN I_MaterialDocumentItem_2 AS _ReversedMatDocItem ON ReversedMaterialDocumentYear = _ReversedMatDocItem.MaterialDocumentYear AND ReversedMaterialDocument = _ReversedMatDocItem.MaterialDocument AND ReversedMaterialDocumentItem = _ReversedMatDocItem.MaterialDocumentItem -- association [0..1]
LEFT OUTER JOIN I_Product AS _Product ON Material = _Product.Product -- association [0..1]
LEFT OUTER JOIN I_ReservationDocumentItem AS _ReservationItem ON Reservation = _ReservationItem.Reservation AND ReservationItem = _ReservationItem.ReservationItem -- association [0..1]
LEFT OUTER JOIN I_GoodsMovementReasonCode AS _GoodsMovementReasonCode ON GoodsMovementType = _GoodsMovementReasonCode.GoodsMovementType AND GoodsMovementReasonCode = _GoodsMovementReasonCode.GoodsMovementReasonCode -- association [0..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