I_MaterialDocumentHeader_2

DDL: I_MATERIALDOCUMENTHEADER_2 Type: view_entity COMPOSITE

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

StateC1
Line of BusinessSupply Chain
Application ComponentMM-IM-VDM-SGM
CapabilitiesAnalytical Dimension, Data Source in SQL Select, Association Target for Defining CDS Entities, Data Source for Defining CDS Entities
PackageSupply 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

Data Sources (1)

SourceAliasJoin Type
I_MaterialDocumentRecord I_MaterialDocumentRecord from

Associations (6)

CardinalityTargetAliasCondition
[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)

NameValueLevelField
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)

KeyFieldSource TableSource FieldDescription
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..*]
;