I_MaterialDocumentHeader

DDL: I_MATERIALDOCUMENTHEADER SQL: IMATDOCHEADER Type: view COMPOSITE

Material Document Header

I_MaterialDocumentHeader 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 20 fields with key fields MaterialDocumentYear, MaterialDocument. It has 4 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_MaterialDocumentRecord I_MaterialDocumentRecord from

Associations (4)

CardinalityTargetAliasCondition
[1..1] I_MaterialDocumentYear _MaterialDocumentYear $projection.MaterialDocumentYear = _MaterialDocumentYear.MaterialDocumentYear
[1..*] I_MaterialDocumentItem _MaterialDocumentItem $projection.MaterialDocumentYear = _MaterialDocumentItem.MaterialDocumentYear and $projection.MaterialDocument = _MaterialDocumentItem.MaterialDocument
[1..*] I_MaterialDocumentItem_2 _MaterialDocumentItem_2 $projection.MaterialDocumentYear = _MaterialDocumentItem_2.MaterialDocumentYear and $projection.MaterialDocument = _MaterialDocumentItem_2.MaterialDocument
[0..1] I_DeliveryDocument _DeliveryDocument $projection.DeliveryDocument = _DeliveryDocument.DeliveryDocument -- the

Annotations (20)

NameValueLevelField
AbapCatalog.preserveKey true view
AbapCatalog.sqlViewName IMATDOCHEADER view
EndUserText.label Material Document Header view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
ClientHandling.algorithm #SESSION_VARIABLE 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
VDM.lifecycle.status #DEPRECATED view
VDM.lifecycle.successor I_MaterialDocumentHeader_2 view
Analytics.dataCategory #DIMENSION view
Metadata.ignorePropagatedAnnotations true view
Metadata.allowExtensions true view

Fields (20)

KeyFieldSource TableSource FieldDescription
KEY MaterialDocumentYear MaterialDocumentYear
KEY MaterialDocument MaterialDocument
DocumentDate DocumentDate
PostingDate PostingDate
AccountingDocumentType AccountingDocumentType
InventoryTransactionType InventoryTransactionType
CreatedByUser CreatedByUser
CreationDate CreationDate
CreationTime CreationTime
MaterialDocumentHeaderText MaterialDocumentHeaderText
DeliveryDocument DeliveryInMatlDocumentHeader
ReferenceDocument ReferenceDocument
BillOfLading BillOfLading
_MaterialDocumentYear _MaterialDocumentYear
_MaterialDocumentItem _MaterialDocumentItem
_MaterialDocumentItem_2 _MaterialDocumentItem_2
_User _User
_AccountingDocumentType _AccountingDocumentType
_InventoryTransactionType _InventoryTransactionType
_DeliveryDocument _DeliveryDocument
@AbapCatalog.preserveKey: true
@AbapCatalog.sqlViewName: 'IMATDOCHEADER'
@EndUserText.label: 'Material Document Header'

@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@ClientHandling.algorithm: #SESSION_VARIABLE

@ObjectModel: {
    usageType: {
        sizeCategory: #XXL,
        serviceQuality: #B,
        dataClass:#TRANSACTIONAL
    },
    compositionRoot: true,
    representativeKey: 'MaterialDocument',
    semanticKey: ['MaterialDocumentYear', 'MaterialDocument'],
    modelingPattern: #ANALYTICAL_DIMENSION,
    supportedCapabilities: [#ANALYTICAL_DIMENSION, #CDS_MODELING_ASSOCIATION_TARGET, #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE]
} 

@Search.searchable: true
@VDM: {
        viewType: #COMPOSITE,
        lifecycle.contract.type: #PUBLIC_LOCAL_API,
        lifecycle.status: #DEPRECATED,
        lifecycle.successor: 'I_MaterialDocumentHeader_2'
      }
@Analytics.dataCategory: #DIMENSION

@Metadata: {
             ignorePropagatedAnnotations: true,
             allowExtensions: true
           }

define view I_MaterialDocumentHeader
  as select from I_MaterialDocumentRecord
  association [1..1] to I_MaterialDocumentYear as _MaterialDocumentYear on  $projection.MaterialDocumentYear = _MaterialDocumentYear.MaterialDocumentYear
  association [1..*] to I_MaterialDocumentItem as _MaterialDocumentItem on  $projection.MaterialDocumentYear = _MaterialDocumentItem.MaterialDocumentYear
                                                                        and $projection.MaterialDocument     = _MaterialDocumentItem.MaterialDocument
  association [1..*] to I_MaterialDocumentItem_2 as _MaterialDocumentItem_2 on  $projection.MaterialDocumentYear = _MaterialDocumentItem_2.MaterialDocumentYear
                                                                        and $projection.MaterialDocument     = _MaterialDocumentItem_2.MaterialDocument
  association [0..1] to I_DeliveryDocument     as _DeliveryDocument     on  $projection.DeliveryDocument = _DeliveryDocument.DeliveryDocument
  -- the association to the DeliveryDocument would also be available as _DeliveryInMatlDocumentHeader in I_MaterialDocumentRecord,
  -- but since the field is rebranded as DeliveryDocument in the header view, the repeated association seems to make sense
{
      @ObjectModel.foreignKey.association: '_MaterialDocumentYear'
  key MaterialDocumentYear,
      @Search.defaultSearchElement: true
      @Search.fuzzinessThreshold: 0.9
      @Search.ranking: #HIGH
  key MaterialDocument,

      @Search.defaultSearchElement: true
      @Search.fuzzinessThreshold: 0.9
      @Search.ranking: #MEDIUM
      @Semantics.businessDate.at: true
      DocumentDate,

      @Search.defaultSearchElement: true
      @Search.fuzzinessThreshold: 0.9
      @Search.ranking: #MEDIUM
      @Semantics.businessDate.at: true
      PostingDate,
      AccountingDocumentType,
      InventoryTransactionType,

      CreatedByUser,
      CreationDate,
      CreationTime,
      MaterialDocumentHeaderText,

      @Search.defaultSearchElement: true
      @Search.fuzzinessThreshold: 0.9
      @Search.ranking: #MEDIUM
      @ObjectModel.foreignKey.association: '_DeliveryDocument'
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_DeliveryDocumentStdVH',
                     element: 'DeliveryDocument' }
        }]
      DeliveryInMatlDocumentHeader as DeliveryDocument,
      ReferenceDocument,

      @Search.defaultSearchElement: true
      @Search.fuzzinessThreshold: 0.8
      @Search.ranking: #MEDIUM
      BillOfLading,
      
      _MaterialDocumentYear,
      @ObjectModel.association.type:#TO_COMPOSITION_CHILD
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: '_MaterialDocumentItem_2'
      _MaterialDocumentItem,
      _MaterialDocumentItem_2,

      _User,
      _AccountingDocumentType,
      _InventoryTransactionType,

      _DeliveryDocument
}
where
      MaterialDocumentRecordType = 'MDOC'
  and IsMaterialDocumentHeader   = 1