I_MaterialDocumentHeader_2
Material Document Header
I_MaterialDocumentHeader_2 (Composite)
Package: Explore, extend and adapt the SAP S/4HANA Cloud Private Edition with built-in and side-by-side extension capabilities.
Supply Chain
I_MaterialDocumentHeader_2 is a Composite CDS View (Dimension) that provides data about "Material Document Header" in SAP S/4HANA. It reads from 1 data source (I_MaterialDocumentRecord) and exposes 28 fields with key fields MaterialDocumentYear, MaterialDocument. It has 6 associations to related views.
SAP API Hub
| State | C1 |
|---|---|
| Line of Business | Supply Chain |
| Application Component | MM-IM-VDM-SGM |
| Capabilities | Analytical Dimension, Data Source in SQL Select, Association Target for Defining CDS Entities, Data Source for Defining CDS Entities |
| Package | Supply Chain for SAP S/4HANA Cloud Private Edition |
| Description | <p>This CDS View is the successor view of I_MaterialDocumentHeader which has been deprecated.</p> <p>This CDS view provides the prerequisites for answering the following business question:</p> <ul> <li><p>What is the header data of posted material documents?</p></li> </ul> |
Documentation
- Analytics with CDS Views — Build Analytics for S/4HANA Cloud Private Edition ABAP CDS views replicated to SAP Cloud Platform
- CDS Views on SAP Business Accelerator Hub — Explore SAP S/4HANA Cloud Private Edition Private Edition CDS Views on SAP Business Accelerator Hub
- Create CDS View as API — Create CDS views in SAP S/4HANA Cloud Private Edition and consume them as APIs
- Custom CDS Views — Access data using a Custom Core Data Service view (Custom CDS view)
- Key User Extensibility Tools — The Key User Extensibility Tools of S/4HANA
- SAP Extensibility Explorer for SAP S/4HANA Cloud Private Edition — Explore SAP S/4HANA Cloud Private Edition Extensibility options by leveraging the sample scenarios from SAP
- SAP S/4HANA Extensibility — SAP S/4HANA Extensibility Tutorial
- VDM View Types — The Virtual Data Model in SAP S/4HANA Cloud Private Edition
- View Browser — Search, browse and tag CDS Views
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_MaterialDocumentRecord | I_MaterialDocumentRecord | from |
Associations (6)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_MaterialDocumentYear | _MaterialDocumentYear | $projection.MaterialDocumentYear = _MaterialDocumentYear.MaterialDocumentYear |
| [1..*] | I_MaterialDocumentItem_2 | _MaterialDocumentItem | $projection.MaterialDocumentYear = _MaterialDocumentItem.MaterialDocumentYear and $projection.MaterialDocument = _MaterialDocumentItem.MaterialDocument |
| [0..1] | I_DeliveryDocument | _DeliveryDocument | $projection.DeliveryDocument = _DeliveryDocument.DeliveryDocument |
| [0..1] | I_StorageLocation | _StorageLocation | $projection.StorageLocation = _StorageLocation.StorageLocation and $projection.Plant = _StorageLocation.Plant |
| [0..1] | I_StorageLocation | _IssuingOrReceivingStorageLoc | $projection.IssuingOrReceivingStorageLoc = _IssuingOrReceivingStorageLoc.StorageLocation and $projection.IssuingOrReceivingPlant = _IssuingOrReceivingStorageLoc.Plant |
| [0..*] | E_MaterialDocumentItem | _ItemExtension | $projection.MaterialDocument = _ItemExtension.MaterialDocument and $projection.MaterialDocumentYear = _ItemExtension.MaterialDocumentYear and _ItemExtension.MaterialDocumentRecordType = 'MDOC' -- the |
Annotations (17)
| Name | Value | Level | Field |
|---|---|---|---|
| EndUserText.label | Material Document Header | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.serviceQuality | #B | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.compositionRoot | true | view | |
| ObjectModel.representativeKey | MaterialDocument | view | |
| ObjectModel.modelingPattern | #ANALYTICAL_DIMENSION | view | |
| Search.searchable | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.lifecycle.contract.type | #PUBLIC_LOCAL_API | view | |
| Analytics.dataCategory | #DIMENSION | view | |
| Analytics.internalName | #LOCAL | view | |
| Analytics.technicalName | IMATDOCHEADER2 | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| Metadata.allowExtensions | true | view |
Fields (28)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | MaterialDocumentYear | MaterialDocumentYear | Material Document Year | |
| KEY | MaterialDocument | MaterialDocument | Number of Material Document | |
| DocumentDate | DocumentDate | Document Date in Document | ||
| PostingDate | PostingDate | Posting Date in the Document | ||
| AccountingDocumentType | AccountingDocumentType | Journal Entry Type | ||
| InventoryTransactionType | InventoryTransactionType | Transaction/Event Type | ||
| CreatedByUser | CreatedByUser | User Name | ||
| CreationDate | CreationDate | Day On Which Accounting Document Was Entered | ||
| CreationTime | CreationTime | Time of Change | ||
| MaterialDocumentHeaderText | MaterialDocumentHeaderText | Document Header Text | ||
| DeliveryDocument | DeliveryInMatlDocumentHeader | Delivery Document on Header | ||
| ReferenceDocument | ReferenceDocument | Reference Document Number | ||
| BillOfLading | BillOfLading | Number of Bill of Lading at Time of Goods Receipt | ||
| VersionForPrintingSlip | VersionForPrintingSlip | Version for Printing GR/GI Slip | ||
| ManualPrintIsTriggered | ManualPrintIsTriggered | Print via Output Control | ||
| CtrlPostgForExtWhseMgmtSyst | CtrlPostgForExtWhseMgmtSyst | Control Posting for External WMS | ||
| Plant | Plant | Valuation Area | ||
| StorageLocation | StorageLocation | Storage Location | ||
| IssuingOrReceivingPlant | IssuingOrReceivingPlant | Transfer Plant | ||
| IssuingOrReceivingStorageLoc | IssuingOrReceivingStorageLoc | Receiving/Issuing Storage Location | ||
| _MaterialDocumentYear | _MaterialDocumentYear | |||
| _MaterialDocumentItem | _MaterialDocumentItem | |||
| _User | _User | |||
| _AccountingDocumentType | _AccountingDocumentType | |||
| _InventoryTransactionType | _InventoryTransactionType | |||
| _DeliveryDocument | _DeliveryDocument | |||
| _StorageLocation | _StorageLocation | |||
| _IssuingOrReceivingStorageLoc | _IssuingOrReceivingStorageLoc |
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 I_MaterialDocumentHeader_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 I_MaterialDocumentHeader_2 AS
SELECT
MaterialDocumentYear,
MaterialDocument,
DocumentDate,
PostingDate,
AccountingDocumentType,
InventoryTransactionType,
CreatedByUser,
CreationDate,
CreationTime,
MaterialDocumentHeaderText,
DeliveryInMatlDocumentHeader AS DeliveryDocument,
ReferenceDocument,
BillOfLading,
VersionForPrintingSlip,
ManualPrintIsTriggered,
CtrlPostgForExtWhseMgmtSyst,
Plant,
StorageLocation,
IssuingOrReceivingPlant,
IssuingOrReceivingStorageLoc
FROM I_MaterialDocumentRecord
LEFT OUTER JOIN I_MaterialDocumentYear AS _MaterialDocumentYear ON MaterialDocumentYear = _MaterialDocumentYear.MaterialDocumentYear -- association [1..1]
LEFT OUTER JOIN I_MaterialDocumentItem_2 AS _MaterialDocumentItem ON MaterialDocumentYear = _MaterialDocumentItem.MaterialDocumentYear AND MaterialDocument = _MaterialDocumentItem.MaterialDocument -- association [1..*]
LEFT OUTER JOIN I_DeliveryDocument AS _DeliveryDocument ON DeliveryDocument = _DeliveryDocument.DeliveryDocument -- association [0..1]
LEFT OUTER JOIN I_StorageLocation AS _StorageLocation ON StorageLocation = _StorageLocation.StorageLocation AND Plant = _StorageLocation.Plant -- association [0..1]
LEFT OUTER JOIN I_StorageLocation AS _IssuingOrReceivingStorageLoc ON IssuingOrReceivingStorageLoc = _IssuingOrReceivingStorageLoc.StorageLocation AND IssuingOrReceivingPlant = _IssuingOrReceivingStorageLoc.Plant -- association [0..1]
LEFT OUTER JOIN E_MaterialDocumentItem AS _ItemExtension ON MaterialDocument = _ItemExtension.MaterialDocument AND MaterialDocumentYear = _ItemExtension.MaterialDocumentYear AND _ItemExtension.MaterialDocumentRecordType = 'MDOC' -- association [0..*]
;
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