I_ProdnRsceToolText is a Composite CDS View that provides data about "Production Resource Tool - Text" in SAP S/4HANA. It reads from 2 data sources (I_Language, I_ProdnRsceToolByInternalKey) and exposes 15 fields with key fields ProductionResourceType, ProductionResourceInternalID, Language. It has 2 associations to related views. Part of development package VDM_PP_MD_PRT.
@AbapCatalog.sqlViewName: 'IPPPRTIKTEXT'
@AbapCatalog.compiler.compareFilter: true@AbapCatalog.preserveKey: true@AccessControl.authorizationCheck: #NOT_REQUIRED@ClientHandling.algorithm: #SESSION_VARIABLE@Metadata.ignorePropagatedAnnotations: true@ObjectModel.dataCategory: #TEXT@ObjectModel.modelingPattern: #LANGUAGE_DEPENDENT_TEXT@ObjectModel.supportedCapabilities: [#LANGUAGE_DEPENDENT_TEXT, #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE]@ObjectModel.representativeKey: 'ProductionResourceInternalID'
@ObjectModel.usageType: {serviceQuality: #C, sizeCategory: #XL, dataClass: #MIXED}@VDM.lifecycle.contract.type: #PUBLIC_LOCAL_API@VDM.viewType: #COMPOSITE@EndUserText.label: 'Production Resource Tool - Text'
defineview I_ProdnRsceToolText
asselectfrom I_ProdnRsceToolByInternalKey as PRT
innerjoin I_Language on Language <> ''
leftouter to one join I_MaterialText on I_MaterialText.Material = PRT.Material
and I_MaterialText.Language = I_Language.Language
leftouter to one join I_EquipmentText on I_EquipmentText.Equipment = PRT.Equipment
and I_EquipmentText.Language = I_Language.Language
leftouter to one join I_MiscProdnRsceToolText on I_MiscProdnRsceToolText.ProductionResourceType = PRT.ProductionResourceType
and I_MiscProdnRsceToolText.ProductionResourceInternalID = PRT.ProductionResourceInternalID
and I_MiscProdnRsceToolText.Language = I_Language.Language
leftouter to one join I_DocumentInfoRecordDesc on I_DocumentInfoRecordDesc.DocumentInfoRecordDocType = PRT.DocumentType
and I_DocumentInfoRecordDesc.DocumentInfoRecordDocNumber = PRT.DocumentInfoRecord
and I_DocumentInfoRecordDesc.DocumentInfoRecordDocVersion = PRT.DocumentVersion
and I_DocumentInfoRecordDesc.DocumentInfoRecordDocPart = PRT.DocumentPart
and I_DocumentInfoRecordDesc.Language = I_Language.Language
leftouter to one join I_MeasuringPoint on I_MeasuringPoint.MeasuringPoint = PRT.MeasuringPoint
association [1..1] to I_ProductionResourceType as _ProductionResourceType on $projection.ProductionResourceType = _ProductionResourceType.ProductionResourceType
association [1..1] to I_Language as _Language on $projection.Language = _Language.Language
{
// Key@ObjectModel.foreignKey.association: '_ProductionResourceType'
key PRT.ProductionResourceType,
@ObjectModel.text.element: 'ProductionResourceToolDesc'
key PRT.ProductionResourceInternalID,
@ObjectModel.foreignKey.association: '_Language'
@Semantics.language: truekey I_Language.Language,
// Text
@Semantics.text: truecast(
case PRT.ProdnRsceToolCategory
when 'M' then I_MaterialText.MaterialName
when 'E' then I_EquipmentText.EquipmentName
when 'S' then I_MiscProdnRsceToolText.MiscProductionResourceToolDesc
when 'D' then I_DocumentInfoRecordDesc.DocumentDescription
when 'P' then I_MeasuringPoint.MeasuringPointDescription
else ' '
endas fhktx preserving type) as ProductionResourceToolDesc,
// Semantic Keycast(
case PRT.ProdnRsceToolCategory
when 'M' then PRT.Material
when 'E' then PRT.Equipment
when 'S' then PRT.MiscProductionResourceTool
when 'D' then concat_with_space(concat_with_space(concat_with_space(
PRT.DocumentInfoRecord, PRT.DocumentType, 1), PRT.DocumentPart, 1), PRT.DocumentVersion, 1)
when 'P' then PRT.MeasuringPoint
else ' '
endas pph_fhmnr preserving type) as ProductionResourceTool,
@ObjectModel.foreignKey.association: '_ProdnRsceToolCategory'
cast(PRT.ProdnRsceToolCategory as mpe_fhmar preserving type) as ProdnRsceToolCategory,
//Fields identifying document PRTs
@ObjectModel.foreignKey.association: '_DocumentType'
PRT.DocumentType,
@ObjectModel.foreignKey.association: '_DocumentNumber'
PRT.DocumentInfoRecord,
@ObjectModel.foreignKey.association: '_DocumentVersion'
PRT.DocumentVersion,
@ObjectModel.foreignKey.association: '_DocumentProdnRsceTool'
PRT.DocumentPart,
// Associations
_ProductionResourceType,
PRT._ProdnRsceToolCategory,
PRT._DocumentType,
PRT._DocumentNumber,
PRT._DocumentVersion,
PRT._DocumentProdnRsceTool,
_Language
}
where
I_MaterialText.MaterialName <> ''
or I_EquipmentText.EquipmentName <> ''
or I_MiscProdnRsceToolText.MiscProductionResourceToolDesc <> ''
or I_DocumentInfoRecordDesc.DocumentDescription <> ''
or I_MeasuringPoint.MeasuringPointDescription <> '';