A_MaterialDocumentItem
Document Items
A_MaterialDocumentItem is a Composite CDS View that provides data about "Document Items" in SAP S/4HANA. It reads from 1 data source (I_GoodsMovementDocument) and exposes 93 fields with key fields MaterialDocumentYear, MaterialDocument, MaterialDocumentItem. It has 9 associations to related views. Part of development package ODATA_MM_IM_API_MATERIAL_DOC.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_GoodsMovementDocument | I_GoodsMovementDocument | from |
Associations (9)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | A_MaterialDocumentHeader | _MaterialDocumentHeader | $projection.MaterialDocumentYear = _MaterialDocumentHeader.MaterialDocumentYear and $projection.MaterialDocument = _MaterialDocumentHeader.MaterialDocument |
| [1..1] | E_MaterialDocumentItem | _ProcessExtension | $projection.MaterialDocument = _ProcessExtension.MaterialDocument and $projection.MaterialDocumentYear = _ProcessExtension.MaterialDocumentYear and $projection.MaterialDocumentItem = _ProcessExtension.MaterialDocumentItem and _ProcessExtension.MaterialDocumentRecordType = 'MDOC' |
| [1..1] | E_MaterialDocumentItem_2 | _MaterialDocumentItemExtension | $projection.MaterialDocument = _MaterialDocumentItemExtension.MaterialDocument and $projection.MaterialDocumentYear = _MaterialDocumentItemExtension.MaterialDocumentYear and $projection.MaterialDocumentItem = _MaterialDocumentItemExtension.MaterialDocumentItem and _MaterialDocumentItemExtension.MaterialDocumentRecordType = 'MDOC' |
| [0..*] | A_SerialNumberMaterialDocument | _SerialNumbers | $projection.MaterialDocument = _SerialNumbers.MaterialDocument and $projection.MaterialDocumentItem = _SerialNumbers.MaterialDocumentItem and $projection.MaterialDocumentYear = _SerialNumbers.MaterialDocumentYear |
| [0..1] | A_Supplier | _AuthSupplier | $projection.Supplier = _AuthSupplier.Supplier |
| [0..1] | A_Customer | _AuthCustomer | $projection.Customer = _AuthCustomer.Customer |
| [0..1] | I_SupplierCompanyByPlant | _SupplierCompanyByPlant | $projection.Supplier = _SupplierCompanyByPlant.Supplier and $projection.Plant = _SupplierCompanyByPlant.Plant |
| [0..1] | I_CustomerCompanyByPlant | _CustomerCompanyByPlant | $projection.Customer = _CustomerCompanyByPlant.Customer and $projection.Plant = _CustomerCompanyByPlant.Plant |
| [0..1] | I_Batch | _Batch | $projection.Plant = _Batch.Plant and $projection.Material = _Batch.Material and $projection.Batch = _Batch.Batch |
Annotations (14)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.lifecycle.contract.type | #PUBLIC_REMOTE_API | view | |
| AbapCatalog.preserveKey | true | view | |
| AbapCatalog.sqlViewName | AMATDOCITEM | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| EndUserText.label | Document Items | view | |
| VDM.viewType | #COMPOSITE | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.createEnabled | false | view | |
| ObjectModel.updateEnabled | false | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
Fields (93)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | MaterialDocumentYear | MaterialDocumentYear | Material Document Year | |
| KEY | MaterialDocument | MaterialDocument | Material Doc. | |
| KEY | MaterialDocumentItem | MaterialDocumentItem | Material Document Item | |
| Material | Material | Vehicle Model | ||
| Plant | Plant | Valuation Area | ||
| StorageLocation | StorageLocation | StorageLocation | ||
| Batch | Batch | Lot No. | ||
| BatchBySupplier | _Batch | BatchBySupplier | Supplier Batch | |
| GoodsMovementType | GoodsMovementType | Movement Type | ||
| InventoryStockType | InventoryStockType | Stock Type | ||
| InventoryValuationType | InventoryValuationType | Valuation Type | ||
| InventorySpecialStockType | InventorySpecialStockType | Special Stock Type | ||
| Supplier | Supplier | Supplier | ||
| Customer | Customer | Sold-to Party | ||
| SalesOrder | SalesOrder | SD Document | ||
| SalesOrderItem | SalesOrderItem | Sales Order Item | ||
| SalesOrderScheduleLine | SalesOrderScheduleLine | SOrder schedule | ||
| PurchaseOrder | PurchaseOrder | Purchasing Document | ||
| PurchaseOrderItem | PurchaseOrderItem | Purchasing Document Item | ||
| WBSElement | _WBSElement | WBSElement | WBS Internal ID | |
| ManufacturingOrder | ManufacturingOrder | Order | ||
| ManufacturingOrderItem | ManufacturingOrderItem | Manufacturing Order Item | ||
| GoodsMovementRefDocType | GoodsMovementRefDocType | Reference Doc. Type | ||
| GoodsMovementReasonCode | GoodsMovementReasonCode | Reason for Mvmt | ||
| Delivery | DeliveryDocument | Outbound Delivery | ||
| DeliveryItem | DeliveryDocumentItem | Outb. Delivery Item | ||
| AccountAssignmentCategory | AccountAssignmentCategory | Acct Assgmt Cat | ||
| CostCenter | CostCenter | Cost Center | ||
| ControllingArea | ControllingArea | Controlling Area | ||
| CostObject | CostObject | Cost Object | ||
| GLAccount | GLAccount | General Ledger | ||
| FunctionalArea | FunctionalArea | Sendr Fctl Area | ||
| ProfitabilitySegment | ProfitabilitySegment_2 | Profit. segment | ||
| ProfitCenter | ProfitCenter | Profit Center | ||
| MasterFixedAsset | MasterFixedAsset | Fixed Asset | ||
| FixedAsset | FixedAsset | Sub-number | ||
| MaterialBaseUnitISOCode | ||||
| MaterialBaseUnitSAPCode | ||||
| MaterialBaseUnit | MaterialBaseUnit | Valuation Unit | ||
| QuantityInBaseUnit | QuantityInBaseUnit | Quantity | ||
| EntryUnitISOCode | ||||
| EntryUnitSAPCode | ||||
| EntryUnit | EntryUnit | Unit of Entry | ||
| QuantityInEntryUnit | QuantityInEntryUnit | Quantity in Unit of Entry | ||
| CompanyCodeCurrency | CompanyCodeCurrency | Local Currency | ||
| GdsMvtExtAmtInCoCodeCrcy | GdsMvtExtAmtInCoCodeCrcy | Ext. Amount LC | ||
| FiscalYear | FiscalYear | G/L Fiscal Year | ||
| FiscalYearPeriod | FiscalYearPeriod | Period/Year | ||
| FiscalYearVariant | FiscalYearVariant | FY Variant | ||
| IssgOrRcvgMaterial | IssgOrRcvgMaterial | Transfer Material | ||
| IssgOrRcvgBatch | IssgOrRcvgBatch | Transfer Batch | ||
| IssuingOrReceivingPlant | IssuingOrReceivingPlant | Transfer Plant | ||
| IssuingOrReceivingStorageLoc | IssuingOrReceivingStorageLoc | Receiving SLoc. | ||
| IssuingOrReceivingStockType | IssuingOrReceivingStockType | |||
| IssgOrRcvgSpclStockInd | IssgOrRcvgSpclStockInd | Special Stock | ||
| IssuingOrReceivingValType | IssuingOrReceivingValType | Val. Type Tfr. | ||
| IsCompletelyDelivered | IsCompletelyDelivered | Is completely delivered | ||
| MaterialDocumentItemText | MaterialDocumentItemText | Text | ||
| GoodsRecipientName | GoodsRecipientName | Recipient Name | ||
| UnloadingPointName | UnloadingPointName | Unloading Point Name | ||
| ShelfLifeExpirationDate | ShelfLifeExpirationDate | SLED/BBD | ||
| ManufactureDate | ManufactureDate | Date of Manuf. | ||
| SerialNumbersAreCreatedAutomly | SerialNumbersAreCreatedAutomly | SerialNo. auto. | ||
| Reservation | Reservation | Reservation | ||
| ReservationItem | ReservationItem | Reservation Item | ||
| ReservationItemRecordType | ReservationItemRecordType | Reservation Record Type | ||
| ReservationIsFinallyIssued | ReservationIsFinallyIssued | Res Final Issue | ||
| SpecialStockIdfgSalesOrder | SpecialStockIdfgSalesOrder | Stock Ident Header | ||
| SpecialStockIdfgSalesOrderItem | SpecialStockIdfgSalesOrderItem | Stock Ident Item | ||
| SpecialStockIdfgWBSElement | _SpecialStockIdfgWBSElement | WBSElement | WBS Internal ID | |
| IsAutomaticallyCreated | IsAutomaticallyCreated | Is Automatically Created | ||
| MaterialDocumentLine | MaterialDocumentLine | Line ID | ||
| MaterialDocumentParentLine | MaterialDocumentParentLine | Parent ID | ||
| HierarchyNodeLevel | HierarchyNodeLevel | Hierarchy Node Level | ||
| GoodsMovementIsCancelled | GoodsMovementIsCancelled | Is Item Cancelled | ||
| ReversedMaterialDocumentYear | ReversedMaterialDocumentYear | Reversed Doc Year | ||
| ReversedMaterialDocument | ReversedMaterialDocument | Reversed Mat Doc | ||
| ReversedMaterialDocumentItem | ReversedMaterialDocumentItem | Reversed Doc Item | ||
| ReferenceDocumentFiscalYear | ReferenceDocumentFiscalYear | Year Cur.Period | ||
| InvtryMgmtRefDocumentItem | InvtryMgmtRefDocumentItem | Ref. Doc. Item | ||
| InvtryMgmtReferenceDocument | InvtryMgmtReferenceDocument | Reference Doc. | ||
| MaterialDocumentPostingType | MaterialDocumentPostingType | Type of posting | ||
| InventoryUsabilityCode | InventoryUsabilityCode | Stock Type | ||
| EWMWarehouse | EWMWarehouse | Warehouse No. | ||
| EWMStorageBin | EWMStorageBin | Storage Bin | ||
| HandlingUnitExternalID | HandlingUnitExternalID | Handling Unit | ||
| DebitCreditCode | DebitCreditCode | Single-Character Flag | ||
| _SerialNumbers | _SerialNumbers | |||
| _MaterialDocumentHeader | _MaterialDocumentHeader | |||
| _AuthSupplier | _AuthSupplier | |||
| _AuthCustomer | _AuthCustomer | |||
| _SupplierCompanyByPlant | _SupplierCompanyByPlant | |||
| _CustomerCompanyByPlant | _CustomerCompanyByPlant |
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 A_MaterialDocumentItem.
-- 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: AMATDOCITEM
CREATE VIEW A_MaterialDocumentItem AS
SELECT
MaterialDocumentYear,
MaterialDocument,
MaterialDocumentItem,
Material,
Plant,
StorageLocation,
Batch,
_Batch.BatchBySupplier AS BatchBySupplier,
GoodsMovementType,
InventoryStockType,
InventoryValuationType,
InventorySpecialStockType,
Supplier,
Customer,
SalesOrder,
SalesOrderItem,
SalesOrderScheduleLine,
PurchaseOrder,
PurchaseOrderItem,
_WBSElement.WBSElement AS WBSElement,
ManufacturingOrder,
ManufacturingOrderItem,
GoodsMovementRefDocType,
GoodsMovementReasonCode,
DeliveryDocument AS Delivery,
DeliveryDocumentItem AS DeliveryItem,
AccountAssignmentCategory,
CostCenter,
ControllingArea,
CostObject,
GLAccount,
FunctionalArea,
ProfitabilitySegment_2 AS ProfitabilitySegment,
ProfitCenter,
MasterFixedAsset,
FixedAsset,
cast(_MaterialBaseUnit.UnitOfMeasureISOCode as mm_im_matdoc_base_uom_iso_code preserving type) AS MaterialBaseUnitISOCode,
cast(_MaterialBaseUnit.UnitOfMeasureSAPCode as mm_im_matdoc_base_uom_sap_code preserving type) AS MaterialBaseUnitSAPCode,
MaterialBaseUnit,
QuantityInBaseUnit,
cast(_EntryUnit.UnitOfMeasureISOCode as mm_im_matdoc_entr_uom_iso_code preserving type) AS EntryUnitISOCode,
cast(_EntryUnit.UnitOfMeasureSAPCode as mm_im_matdoc_entr_uom_sap_code preserving type) AS EntryUnitSAPCode,
EntryUnit,
QuantityInEntryUnit,
CompanyCodeCurrency,
GdsMvtExtAmtInCoCodeCrcy,
FiscalYear,
FiscalYearPeriod,
FiscalYearVariant,
IssgOrRcvgMaterial,
IssgOrRcvgBatch,
IssuingOrReceivingPlant,
IssuingOrReceivingStorageLoc,
IssuingOrReceivingStockType,
IssgOrRcvgSpclStockInd,
IssuingOrReceivingValType,
IsCompletelyDelivered,
MaterialDocumentItemText,
GoodsRecipientName,
UnloadingPointName,
ShelfLifeExpirationDate,
ManufactureDate,
SerialNumbersAreCreatedAutomly,
Reservation,
ReservationItem,
ReservationItemRecordType,
ReservationIsFinallyIssued,
SpecialStockIdfgSalesOrder,
SpecialStockIdfgSalesOrderItem,
_SpecialStockIdfgWBSElement.WBSElement AS SpecialStockIdfgWBSElement,
IsAutomaticallyCreated,
MaterialDocumentLine,
MaterialDocumentParentLine,
HierarchyNodeLevel,
GoodsMovementIsCancelled,
ReversedMaterialDocumentYear,
ReversedMaterialDocument,
ReversedMaterialDocumentItem,
ReferenceDocumentFiscalYear,
InvtryMgmtRefDocumentItem,
InvtryMgmtReferenceDocument,
MaterialDocumentPostingType,
InventoryUsabilityCode,
EWMWarehouse,
EWMStorageBin,
HandlingUnitExternalID,
DebitCreditCode
FROM I_GoodsMovementDocument
LEFT OUTER JOIN A_MaterialDocumentHeader AS _MaterialDocumentHeader ON MaterialDocumentYear = _MaterialDocumentHeader.MaterialDocumentYear AND MaterialDocument = _MaterialDocumentHeader.MaterialDocument -- association [1..1]
LEFT OUTER JOIN E_MaterialDocumentItem AS _ProcessExtension ON MaterialDocument = _ProcessExtension.MaterialDocument AND MaterialDocumentYear = _ProcessExtension.MaterialDocumentYear AND MaterialDocumentItem = _ProcessExtension.MaterialDocumentItem AND _ProcessExtension.MaterialDocumentRecordType = 'MDOC' -- association [1..1]
LEFT OUTER JOIN E_MaterialDocumentItem_2 AS _MaterialDocumentItemExtension ON MaterialDocument = _MaterialDocumentItemExtension.MaterialDocument AND MaterialDocumentYear = _MaterialDocumentItemExtension.MaterialDocumentYear AND MaterialDocumentItem = _MaterialDocumentItemExtension.MaterialDocumentItem AND _MaterialDocumentItemExtension.MaterialDocumentRecordType = 'MDOC' -- association [1..1]
LEFT OUTER JOIN A_SerialNumberMaterialDocument AS _SerialNumbers ON MaterialDocument = _SerialNumbers.MaterialDocument AND MaterialDocumentItem = _SerialNumbers.MaterialDocumentItem AND MaterialDocumentYear = _SerialNumbers.MaterialDocumentYear -- association [0..*]
LEFT OUTER JOIN A_Supplier AS _AuthSupplier ON Supplier = _AuthSupplier.Supplier -- association [0..1]
LEFT OUTER JOIN A_Customer AS _AuthCustomer ON Customer = _AuthCustomer.Customer -- association [0..1]
LEFT OUTER JOIN I_SupplierCompanyByPlant AS _SupplierCompanyByPlant ON Supplier = _SupplierCompanyByPlant.Supplier AND Plant = _SupplierCompanyByPlant.Plant -- association [0..1]
LEFT OUTER JOIN I_CustomerCompanyByPlant AS _CustomerCompanyByPlant ON Customer = _CustomerCompanyByPlant.Customer AND Plant = _CustomerCompanyByPlant.Plant -- association [0..1]
LEFT OUTER JOIN I_Batch AS _Batch ON Plant = _Batch.Plant AND Material = _Batch.Material AND Batch = _Batch.Batch -- 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