R_MaintJobWorkItemComponentTP

DDL: R_MAINTJOBWORKITEMCOMPONENTTP Type: view_entity COMPOSITE

Maintenance Job Work Item Component TP

R_MaintJobWorkItemComponentTP is a Composite CDS View that provides data about "Maintenance Job Work Item Component TP" in SAP S/4HANA. It reads from 1 data source (I_MaintenanceOrderComponent_2) and exposes 25 fields with key fields MaintenanceOrder, MaintenanceOrderOperation, MaintenanceOrderSubOperation, MaintOrderComponentInternalID. It has 4 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_MaintenanceOrderComponent_2 I_MaintenanceOrderComponent_2 from

Associations (4)

CardinalityTargetAliasCondition
[0..1] I_ProductPlant _ProductPlant _ProductPlant.Product = $projection.Material and _ProductPlant.Plant = $projection.Plant
[0..1] P_MaterialValuationCategory _MaterialValuationCategory _MaterialValuationCategory.Product = $projection.Material and _MaterialValuationCategory.Plant = $projection.Plant
[0..1] P_SerialNumberProfileProcedure _SerialNumberProfileProcedure _SerialNumberProfileProcedure.Product = $projection.Material and _SerialNumberProfileProcedure.Plant = $projection.Plant and _SerialNumberProfileProcedure.SerialNumberProcedure = 'MMSL'
[1..1] R_MaintenanceJobTP _MaintenanceJob _MaintenanceJob.MaintenanceOrder = $projection.MaintenanceOrder

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #CHECK view
EndUserText.label Maintenance Job Work Item Component TP view
VDM.viewType #COMPOSITE view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
AccessControl.personalData.blocking #NOT_REQUIRED view

Fields (25)

KeyFieldSource TableSource FieldDescription
KEY MaintenanceOrder MaintenanceOrder
KEY MaintenanceOrderOperation
KEY MaintenanceOrderSubOperation
KEY MaintOrderComponentInternalID MaintOrderComponentInternalID
MaintenanceOrderComponent
Material Material
MaterialNameendasMaterialName
ComponentDescription ComponentDescription
RequirementQuantityInBaseUnit RequirementQuantityInBaseUnit
BaseUnit BaseUnit
Plant Plant
StorageLocation StorageLocation
QuantityWithdrawnInBaseUnit QuantityWithdrawnInBaseUnit
GoodsMovementType GoodsMovementType
ValuationType
SerialNumberProfile _ProductPlant SerialNumberProfile
SerialNumberProcedure _SerialNumberProfileProcedure SerialNumberProcedure
SerialNumberUsageInAssignment _SerialNumberProfileProcedure SerialNumberUsageInAssignment
InventoryValuationCategory _MaterialValuationCategory InventoryValuationCategory
MaintOrdOpCompItemCategory
MatlCompIsMarkedForBackflush MatlCompIsMarkedForBackflush
_MaintenanceJobWorkItem _MaintenanceJobWorkItem
_MaintenanceJob _MaintenanceJob
_MaintenanceOrder _MaintenanceOrder
_UnitOfMeasure _UnitOfMeasure
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Maintenance Job Work Item Component TP'
@VDM.viewType: #COMPOSITE
@VDM.usage.type: [#TRANSACTIONAL_PROCESSING_SERVICE]
@VDM.lifecycle.contract.type: #SAP_INTERNAL_API
@ObjectModel.usageType: {serviceQuality: #C, sizeCategory: #L, dataClass: #TRANSACTIONAL}
@AccessControl.personalData.blocking:#NOT_REQUIRED
define view entity R_MaintJobWorkItemComponentTP
  as select from I_MaintenanceOrderComponent_2

  association        to parent R_MaintenanceJobWorkItemTP as _MaintenanceJobWorkItem       on  (
            $projection.MaintenanceOrderOperation        = _MaintenanceJobWorkItem.MaintenanceOrderOperation
            and $projection.MaintenanceOrder             = _MaintenanceJobWorkItem.MaintenanceOrder
            and $projection.MaintenanceOrderSubOperation = _MaintenanceJobWorkItem.MaintenanceOrderSubOperation
          )
  association [0..1] to I_ProductPlant                    as _ProductPlant                 on  _ProductPlant.Product = $projection.Material
                                                                                           and _ProductPlant.Plant   = $projection.Plant
  association [0..1] to P_MaterialValuationCategory       as _MaterialValuationCategory    on  _MaterialValuationCategory.Product = $projection.Material
                                                                                           and _MaterialValuationCategory.Plant   = $projection.Plant
  association [0..1] to P_SerialNumberProfileProcedure    as _SerialNumberProfileProcedure on  _SerialNumberProfileProcedure.Product               = $projection.Material
                                                                                           and _SerialNumberProfileProcedure.Plant                 = $projection.Plant
                                                                                           and _SerialNumberProfileProcedure.SerialNumberProcedure = 'MMSL'
  association [1..1] to R_MaintenanceJobTP                as _MaintenanceJob               on  _MaintenanceJob.MaintenanceOrder = $projection.MaintenanceOrder

{
  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,
      ComponentDescription,
      RequirementQuantityInBaseUnit,
      @Consumption.valueHelpDefinition: [
             { entity            :  { name:    'I_UnitOfMeasure',
                          element: 'UnitOfMeasure' }
             }]
      BaseUnit,
      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      //Casting into 2 columns based on movement type to differentate items for Issue and Return

      // H = 261 (credit) , S = 262 (debit)

      cast(case
          when MaintOrderCompDebitCreditCode = 'H'
          then RequirementQuantityInBaseUnit
          end                    as bdmng preserving type )           as PlannedQuantity, //Planned Quantity

      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      cast(case
          when MaintOrderCompDebitCreditCode  = 'S'
          then RequirementQuantityInBaseUnit
          end                    as bdmng preserving type )           as ReturnableQuantity, //Planned Return

      Plant,
      StorageLocation,
      //Casting into 2 columns based on movement type to differentiate posting of issued and return items

      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      cast(case
          when MaintOrderCompDebitCreditCode  = 'H'
          then QuantityWithdrawnInBaseUnit
          end                    as enmng preserving type )           as IssuedQuantity, //QuantityIssued

      @Semantics.quantity.unitOfMeasure: 'BaseUnit'
      cast(case
          when MaintOrderCompDebitCreditCode  = 'S'
          then QuantityWithdrawnInBaseUnit
          end                    as enmng preserving type )           as ReturnedQuantity, //Actual Return


      QuantityWithdrawnInBaseUnit,
      GoodsMovementType,
      //For Color Visualization of returned items

      cast(case MaintOrderCompDebitCreditCode
      // when '261' then 0  //Issue - Black Color

       when 'S' then  //Return - Orange Color

         cast(case
         when  QuantityWithdrawnInBaseUnit = RequirementQuantityInBaseUnit then 3
         else 2 end as mpe_criticality_type preserving type )

       else 0
      end                   as mpe_criticality_type preserving type ) as SASStatusCriticality,
      cast (MaintenanceOrderComponentBatch as valuationtype)          as ValuationType,
      // Used for Serial Number Validations:- SerialNumberProfile, SerialNumberProcedure, SerialNumberUsageInAssignment

      _ProductPlant.SerialNumberProfile,
      _SerialNumberProfileProcedure.SerialNumberProcedure,
      _SerialNumberProfileProcedure.SerialNumberUsageInAssignment,
      // Used in Batch Value Help Validation

      _MaterialValuationCategory.InventoryValuationCategory,
      // Needed to Identify Stock and Non Stock Items

      cast(MaintComponentItemCategory as postp preserving type )                    as MaintOrdOpCompItemCategory,
      // To identify backflush enabled components

      MatlCompIsMarkedForBackflush,
      /* Associations */
      _MaintenanceJobWorkItem, // Make association public

      _MaintenanceJob,
      // Inherited association that needs to be exposed

      _MaintenanceOrder,
      _UnitOfMeasure
}
where
      IsDeleted                          <> 'X' // filter out the deleted items from iw32 component list

 and ProductTypeCode <> '2'