A_MaterialDocumentHeader

DDL: A_MATERIALDOCUMENTHEADER SQL: AMATDOCHEAD Type: view BASIC Package: ODATA_MM_IM_API_MATERIAL_DOC

Document Header

A_MaterialDocumentHeader is a Basic CDS View that provides data about "Document Header" in SAP S/4HANA. It reads from 1 data source (I_GoodsMovementDocument) and exposes 21 fields with key fields MaterialDocumentYear, MaterialDocument. It has 3 associations to related views. Part of development package ODATA_MM_IM_API_MATERIAL_DOC.

Data Sources (1)

SourceAliasJoin Type
I_GoodsMovementDocument Header from

Associations (3)

CardinalityTargetAliasCondition
[1..*] A_MaterialDocumentItem _MaterialDocumentItem $projection.MaterialDocumentYear = _MaterialDocumentItem.MaterialDocumentYear and $projection.MaterialDocument = _MaterialDocumentItem.MaterialDocument
[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

Annotations (14)

NameValueLevelField
VDM.lifecycle.contract.type #PUBLIC_REMOTE_API view
AbapCatalog.preserveKey true view
AbapCatalog.sqlViewName AMATDOCHEAD view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Document Header view
ObjectModel.createEnabled true view
VDM.viewType #BASIC view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.compositionRoot true view
Metadata.ignorePropagatedAnnotations true view

Fields (21)

KeyFieldSource TableSource FieldDescription
KEY MaterialDocumentYear I_GoodsMovementDocument MaterialDocumentYear Material Document Year
KEY MaterialDocument I_GoodsMovementDocument MaterialDocument Material Doc.
InventoryTransactionType I_GoodsMovementDocument InventoryTransactionType Trans. Ev. Type
DocumentDate I_GoodsMovementDocument DocumentDate Journal Entry Date
PostingDate I_GoodsMovementDocument PostingDate Posting Date for GR
CreationDate I_GoodsMovementDocument CreationDate Time Stamp
CreationTime I_GoodsMovementDocument CreationTime Time of Change
CreatedByUser I_GoodsMovementDocument CreatedByUser User Name
MaterialDocumentHeaderText I_GoodsMovementDocument MaterialDocumentHeaderText
ReferenceDocument I_GoodsMovementDocument ReferenceDocument Reference Document
VersionForPrintingSlip I_GoodsMovementDocument VersionForPrintingSlip
ManualPrintIsTriggered I_GoodsMovementDocument ManualPrintIsTriggered
CtrlPostgForExtWhseMgmtSyst I_GoodsMovementDocument CtrlPostgForExtWhseMgmtSyst
GoodsMovementCode P_GoodsMovementCode GoodsMovementCode GM_code
Plant I_GoodsMovementDocument Plant Valuation Area
StorageLocation I_GoodsMovementDocument StorageLocation StorageLocation
IssuingOrReceivingPlant I_GoodsMovementDocument IssuingOrReceivingPlant Transfer Plant
IssuingOrReceivingStorageLoc I_GoodsMovementDocument IssuingOrReceivingStorageLoc Receiving SLoc.
_MaterialDocumentItem _MaterialDocumentItem
_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 A_MaterialDocumentHeader.
-- 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: AMATDOCHEAD

CREATE VIEW A_MaterialDocumentHeader AS
SELECT
  Header.MaterialDocumentYear AS MaterialDocumentYear,
  Header.MaterialDocument AS MaterialDocument,
  Header.InventoryTransactionType AS InventoryTransactionType,
  Header.DocumentDate AS DocumentDate,
  Header.PostingDate AS PostingDate,
  Header.CreationDate AS CreationDate,
  Header.CreationTime AS CreationTime,
  Header.CreatedByUser AS CreatedByUser,
  Header.MaterialDocumentHeaderText AS MaterialDocumentHeaderText,
  Header.ReferenceDocument AS ReferenceDocument,
  Header.VersionForPrintingSlip AS VersionForPrintingSlip,
  Header.ManualPrintIsTriggered AS ManualPrintIsTriggered,
  Header.CtrlPostgForExtWhseMgmtSyst AS CtrlPostgForExtWhseMgmtSyst,
  P_GoodsMovementCode.GoodsMovementCode AS GoodsMovementCode,
  Header.Plant AS Plant,
  Header.StorageLocation AS StorageLocation,
  Header.IssuingOrReceivingPlant AS IssuingOrReceivingPlant,
  Header.IssuingOrReceivingStorageLoc AS IssuingOrReceivingStorageLoc
FROM I_GoodsMovementDocument AS Header
LEFT OUTER JOIN A_MaterialDocumentItem AS _MaterialDocumentItem ON MaterialDocumentYear = _MaterialDocumentItem.MaterialDocumentYear AND MaterialDocument = _MaterialDocumentItem.MaterialDocument  -- association [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]
;