P_MATERIALDOCUMENTHEADER
RAP Material Document Header
P_MATERIALDOCUMENTHEADER is a CDS View in S/4HANA. RAP Material Document Header. 1 CDS views read from this table.
CDS Views using this table (1)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| R_MaterialDocumentTP | view_entity | from | TRANSACTIONAL | RAP MATDOC Header |
@AccessControl: {
authorizationCheck: #CHECK,
personalData.blocking: #NOT_REQUIRED,
privilegedAssociations: ['_User']
}
@ObjectModel: {
usageType: {
sizeCategory: #XXL,
serviceQuality: #B,
dataClass:#TRANSACTIONAL
},
compositionRoot: true,
representativeKey: 'MaterialDocument',
modelingPattern: #ANALYTICAL_DIMENSION,
supportedCapabilities: [#ANALYTICAL_DIMENSION, #CDS_MODELING_ASSOCIATION_TARGET, #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE]
}
@Search.searchable: true
@VDM: {
viewType: #COMPOSITE,
private: true
}
@Metadata: {
ignorePropagatedAnnotations: true
}
@EndUserText.label: 'RAP Material Document Header'
define view entity P_MaterialDocumentHeader 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..1] to P_GoodsMovementCode as _GoodsMovementCode on $projection.TransactionCode = _GoodsMovementCode.TransactionCode
-- 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,
@Consumption.hidden: true
TransactionCode,
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,
VersionForPrintingSlip,
ManualPrintIsTriggered,
CtrlPostgForExtWhseMgmtSyst,
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold: 0.8
@Search.ranking: #MEDIUM
BillOfLading,
// Authorization check
@Consumption.hidden: true
Plant,
@Consumption.hidden: true
StorageLocation,
@Consumption.hidden: true
IssuingOrReceivingPlant,
@Consumption.hidden: true
IssuingOrReceivingStorageLoc,
// Authorization check
_GoodsMovementCode.GoodsMovementCode,
_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
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_MATERIALDOCUMENTRECORD",
"P_GOODSMOVEMENTCODE"
],
"ASSOCIATED":
[
"I_ACCOUNTINGDOCUMENTTYPE",
"I_DELIVERYDOCUMENT",
"I_INVENTORYTRANSACTIONTYPE",
"I_MATERIALDOCUMENTITEM_2",
"I_MATERIALDOCUMENTYEAR",
"I_STORAGELOCATION",
"I_USER"
],
"BASE":
[
"I_MATERIALDOCUMENTRECORD"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/