I_MaterialDocumentHeader_2

DDL: I_MATERIALDOCUMENTHEADER_2 Type: view_entity COMPOSITE Package: MM_IM_VDM_STOCK

Material Document Header

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. Part of development package MM_IM_VDM_STOCK.

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
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
VersionForPrintingSlip VersionForPrintingSlip
ManualPrintIsTriggered ManualPrintIsTriggered
CtrlPostgForExtWhseMgmtSyst CtrlPostgForExtWhseMgmtSyst
Plant Plant
StorageLocation StorageLocation
IssuingOrReceivingPlant IssuingOrReceivingPlant
IssuingOrReceivingStorageLoc IssuingOrReceivingStorageLoc
_MaterialDocumentYear _MaterialDocumentYear
_MaterialDocumentItem _MaterialDocumentItem
_User _User
_AccountingDocumentType _AccountingDocumentType
_InventoryTransactionType _InventoryTransactionType
_DeliveryDocument _DeliveryDocument
_StorageLocation _StorageLocation
_IssuingOrReceivingStorageLoc _IssuingOrReceivingStorageLoc
@EndUserText.label: 'Material Document Header'

@AccessControl: {
                    authorizationCheck: #CHECK,
                    personalData.blocking: #NOT_REQUIRED,
                    privilegedAssociations: ['_User']
                 }

@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
      }
@Analytics: {
                dataCategory: #DIMENSION,
                internalName:#LOCAL,
                technicalName: 'IMATDOCHEADER2'
             }

@Metadata: {
             ignorePropagatedAnnotations: true,
             allowExtensions: true
           }
-- This view is the successor view for the view I_MaterialDocumentHeader
define view entity I_MaterialDocumentHeader_2
  as select from I_MaterialDocumentRecord
  association [1..1] to I_MaterialDocumentYear   as _MaterialDocumentYear         on  $projection.MaterialDocumentYear = _MaterialDocumentYear.MaterialDocumentYear
  association [1..*] to I_MaterialDocumentItem_2 as _MaterialDocumentItem         on  $projection.MaterialDocumentYear = _MaterialDocumentItem.MaterialDocumentYear
                                                                                  and $projection.MaterialDocument     = _MaterialDocumentItem.MaterialDocument
  association [0..1] to I_DeliveryDocument       as _DeliveryDocument             on  $projection.DeliveryDocument = _DeliveryDocument.DeliveryDocument

  association [0..1] to I_StorageLocation        as _StorageLocation              on  $projection.StorageLocation = _StorageLocation.StorageLocation
                                                                                  and $projection.Plant           = _StorageLocation.Plant
  association [0..1] to I_StorageLocation        as _IssuingOrReceivingStorageLoc on  $projection.IssuingOrReceivingStorageLoc = _IssuingOrReceivingStorageLoc.StorageLocation
                                                                                  and $projection.IssuingOrReceivingPlant      = _IssuingOrReceivingStorageLoc.Plant
  association [0..*] to E_MaterialDocumentItem   as _ItemExtension                on  $projection.MaterialDocument              = _ItemExtension.MaterialDocument
                                                                                  and $projection.MaterialDocumentYear          = _ItemExtension.MaterialDocumentYear
                                                                                  and _ItemExtension.MaterialDocumentRecordType = 'MDOC'

  -- 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,
                    fuzzinessThreshold: 0.9,
                    ranking: #HIGH
                }
  key MaterialDocument,


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

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

      CreatedByUser,
      CreationDate,
      CreationTime,
      MaterialDocumentHeaderText,


      @Search: {
                    defaultSearchElement: true,
                    fuzzinessThreshold: 0.9,
                    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,

      VersionForPrintingSlip,
      @Semantics.booleanIndicator:true
      ManualPrintIsTriggered,

      CtrlPostgForExtWhseMgmtSyst,

      // Authorization check

      @Consumption.hidden: true
      Plant,
      @Consumption.hidden: true
      StorageLocation,
      @Consumption.hidden: true
      IssuingOrReceivingPlant,
      @Consumption.hidden: true
      IssuingOrReceivingStorageLoc,

      // Authorization check


      _MaterialDocumentYear,
      @ObjectModel.association.type:[#TO_COMPOSITION_CHILD]
      _MaterialDocumentItem,

      _User,
      _AccountingDocumentType,
      _InventoryTransactionType,

      _DeliveryDocument,
      // Authorization check

      @Consumption.hidden: true
      _StorageLocation,
      @Consumption.hidden: true
      _IssuingOrReceivingStorageLoc
      // Authorization check


}
where
      MaterialDocumentRecordType = 'MDOC'
  and IsMaterialDocumentHeader   = 1