R_MaintJobWorkItemService

DDL: R_MAINTJOBWORKITEMSERVICE Type: view_entity BASIC

Planned service in work item

R_MaintJobWorkItemService is a Basic CDS View that provides data about "Planned service in work item" in SAP S/4HANA. It reads from 1 data source (I_MaintenanceOrderComponent_2) and exposes 19 fields with key fields MaintenanceOrder, MaintenanceOrderOperation, MaintenanceOrderSubOperation, MaintOrderComponentInternalID.

Data Sources (1)

SourceAliasJoin Type
I_MaintenanceOrderComponent_2 I_MaintenanceOrderComponent_2 from

Annotations (7)

NameValueLevelField
EndUserText.label Planned service in work item view
VDM.viewType #BASIC view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view
AccessControl.personalData.blocking #NOT_REQUIRED view

Fields (19)

KeyFieldSource TableSource FieldDescription
KEY MaintenanceOrder MaintenanceOrder
KEY MaintenanceOrderOperation
KEY MaintenanceOrderSubOperation
KEY MaintOrderComponentInternalID MaintOrderComponentInternalID
MaintenanceOrderComponent
Material Material
MaterialNameendasMaterialName
RequirementQuantityInBaseUnit RequirementQuantityInBaseUnit
BaseUnit BaseUnit
LeanServiceDuration LeanServiceDuration
LeanServiceDurationUnit LeanServiceDurationUnit
Supplier Supplier
OverallLimitAmount OverallLimitAmount
ExpectedOverallLimitAmount ExpectedOverallLimitAmount
MaintOrdOpComponentCurrency MaintOrdOpComponentCurrency
ReservationIsFinallyIssued ReservationIsFinallyIssued
WithdrawnQuantity WithdrawnQuantity
MaintOrderOpComponentPrice MaintOrderOpComponentPrice
MaintOrdOpCompPriceUnitQty MaintOrdOpCompPriceUnitQty
@EndUserText.label: 'Planned service in work item'
@VDM.viewType: #BASIC
@VDM.usage.type: [#TRANSACTIONAL_PROCESSING_SERVICE]
@VDM.lifecycle.contract.type: #SAP_INTERNAL_API
@ObjectModel.usageType: {serviceQuality: #C, sizeCategory: #L, dataClass: #MIXED}
@AccessControl.personalData.blocking:#NOT_REQUIRED
define view entity R_MaintJobWorkItemService
  as select from I_MaintenanceOrderComponent_2
{
  key MaintenanceOrder,
  key cast(MaintenanceOrderOperation as pph_vornr preserving type)    as MaintenanceOrderOperation,
  key cast(MaintenanceOrderSubOperation as pph_vornr preserving type) as MaintenanceOrderSubOperation,
  key MaintOrderComponentInternalID,
      cast(MaintenanceOrderComponent  as pph_vornr preserving type)   as MaintenanceOrderComponent,

      @ObjectModel.text.element: [ 'MaterialName' ]
      Material,

      @Semantics.text: true
      case when Material =''
           then ComponentDescription
           else _MaterialText[1:Language=$session.system_language].MaterialName
           end                                                        as MaterialName,

      RequirementQuantityInBaseUnit,
      BaseUnit,
      case PerformancePeriodStartTime when '240000'
      then cast(dats_tims_to_tstmp( dats_add_days( PerformancePeriodStartDate, 1, 'NULL'), cast( '000000' as abap.tims ),
                              abap_system_timezone( $session.client,'NULL' ),
                              $session.client, 'NULL') as timestamp preserving type)
      else cast(dats_tims_to_tstmp( PerformancePeriodStartDate,   PerformancePeriodStartTime,
                              abap_system_timezone( $session.client,'NULL' ),
                              $session.client, 'NULL') as timestamp preserving type)
      end                                                             as PerformancePeriodStartDateTime,

      case PerformancePeriodEndTime when '240000'
      then cast(dats_tims_to_tstmp( dats_add_days( PerformancePeriodEndDate, 1, 'NULL'), cast( '000000' as abap.tims ),
                              abap_system_timezone( $session.client,'NULL' ),
                              $session.client, 'NULL') as timestamp preserving type)
      else cast(dats_tims_to_tstmp( PerformancePeriodEndDate,   PerformancePeriodEndTime,
                              abap_system_timezone( $session.client,'NULL' ),
                              $session.client, 'NULL') as timestamp preserving type)
      end                                                             as PerformancePeriodEndDateTime,

      @Semantics.quantity.unitOfMeasure: 'LeanServiceDurationUnit'
      LeanServiceDuration,
      LeanServiceDurationUnit,
      Supplier,
      @Semantics.amount.currencyCode: 'MaintOrdOpComponentCurrency'
      OverallLimitAmount,
      @Semantics.amount.currencyCode: 'MaintOrdOpComponentCurrency'
      ExpectedOverallLimitAmount,
      MaintOrdOpComponentCurrency,
      ReservationIsFinallyIssued,
      WithdrawnQuantity,
      @Semantics.amount.currencyCode: 'MaintOrdOpComponentCurrency'
      MaintOrderOpComponentPrice,
      MaintOrdOpCompPriceUnitQty
      
}
where
      IsDeleted       <> 'X' // filter out the deleted items from iw32 component list

  and ProductTypeCode =  '2'