I_ProdnRsceToolText

DDL: I_PRODNRSCETOOLTEXT SQL: IPPPRTIKTEXT Type: view COMPOSITE Package: VDM_PP_MD_PRT

Production Resource Tool - Text

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.

Data Sources (2)

SourceAliasJoin Type
I_Language I_Language inner
I_ProdnRsceToolByInternalKey PRT from

Associations (2)

CardinalityTargetAliasCondition
[1..1] I_ProductionResourceType _ProductionResourceType $projection.ProductionResourceType = _ProductionResourceType.ProductionResourceType
[1..1] I_Language _Language $projection.Language = _Language.Language

Annotations (15)

NameValueLevelField
AbapCatalog.sqlViewName IPPPRTIKTEXT view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.dataCategory #TEXT view
ObjectModel.modelingPattern #LANGUAGE_DEPENDENT_TEXT view
ObjectModel.representativeKey ProductionResourceInternalID view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
VDM.lifecycle.contract.type #PUBLIC_LOCAL_API view
VDM.viewType #COMPOSITE view
EndUserText.label Production Resource Tool - Text view

Fields (15)

KeyFieldSource TableSource FieldDescription
KEY ProductionResourceType I_ProdnRsceToolByInternalKey ProductionResourceType
KEY ProductionResourceInternalID I_ProdnRsceToolByInternalKey ProductionResourceInternalID
KEY Language I_Language Language
ProdnRsceToolCategory
DocumentType I_ProdnRsceToolByInternalKey DocumentType
DocumentInfoRecord I_ProdnRsceToolByInternalKey DocumentInfoRecord
DocumentVersion I_ProdnRsceToolByInternalKey DocumentVersion
DocumentPart I_ProdnRsceToolByInternalKey DocumentPart
_ProductionResourceType _ProductionResourceType
_ProdnRsceToolCategory I_ProdnRsceToolByInternalKey _ProdnRsceToolCategory
_DocumentType I_ProdnRsceToolByInternalKey _DocumentType
_DocumentNumber I_ProdnRsceToolByInternalKey _DocumentNumber
_DocumentVersion I_ProdnRsceToolByInternalKey _DocumentVersion
_DocumentProdnRsceTool I_ProdnRsceToolByInternalKey _DocumentProdnRsceTool
_Language _Language
@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'

define view I_ProdnRsceToolText
  as select from           I_ProdnRsceToolByInternalKey as PRT
    inner join             I_Language               on Language <> ''

    left outer to one join I_MaterialText           on  I_MaterialText.Material = PRT.Material
                                                    and I_MaterialText.Language = I_Language.Language

    left outer to one join I_EquipmentText          on  I_EquipmentText.Equipment = PRT.Equipment
                                                    and I_EquipmentText.Language  = I_Language.Language

    left outer to one join I_MiscProdnRsceToolText  on  I_MiscProdnRsceToolText.ProductionResourceType       = PRT.ProductionResourceType
                                                    and I_MiscProdnRsceToolText.ProductionResourceInternalID = PRT.ProductionResourceInternalID
                                                    and I_MiscProdnRsceToolText.Language                     = I_Language.Language

    left outer 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

    left outer 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: true
  key I_Language.Language,

      // Text

      @Semantics.text: true
      cast(
        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 ' '
        end as fhktx preserving type)                              as ProductionResourceToolDesc,

      // Semantic Key

      cast(
        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 ' '
        end as 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             <> '';