I_MAINTORDEROBJECTLISTITEM

CDS View

Object List of Maintenance Order

I_MAINTORDEROBJECTLISTITEM is a CDS View in S/4HANA. Object List of Maintenance Order. 3 CDS views read from this table.

CDS Views using this table (3)

ViewTypeJoinVDMDescription
P_MaintOrdEnhcdObjectListItem view_entity from COMPOSITE
P_MaintOrdObjectsConsolidated view_entity union COMPOSITE Objects of an order from all sources
R_MaintOrdObjectListItemTP view_entity from TRANSACTIONAL Maintenance Order Object List Item
@AbapCatalog.sqlViewName: 'IMTORDOBJLISTITM'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Object List of Maintenance Order'
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #XL
@VDM.viewType: #COMPOSITE
@ClientHandling.algorithm: #SESSION_VARIABLE


define view I_MaintOrderObjectListItem
  as select from I_MaintenanceObjectListItem as ObjectListItem

  association [1..1] to I_MaintenanceOrder             as _MaintenanceOrder          on  ObjectListItem.MaintenanceObjectList = _MaintenanceOrder.MaintenanceOrderObjectList
  association [0..1] to I_Equipment                    as _Equipment                 on  _Equipment.Equipment = $projection.Equipment
  association [0..1] to I_MaintenanceNotification      as _MaintenanceNotification   on  _MaintenanceNotification.MaintenanceNotification = $projection.MaintenanceNotification
  association [0..1] to I_Equipment                    as _SerialNumber              on  (
                   _SerialNumber.Material         = $projection.Material
                   and _SerialNumber.SerialNumber = $projection.SerialNumber
                 )
  association [0..1] to I_Equipment                    as _UniqueItemIdentifier      on  _UniqueItemIdentifier.UniqueItemIdentifier = $projection.UniqueItemIdentifier
  association [0..1] to I_Product                      as _Product                   on  _Product.Product = $projection.Material
  association [0..1] to I_Material                     as _Assembly                  on  _Assembly.Material = $projection.Assembly
  association [0..1] to I_LocationAccountAssignment    as _LocationAccountAssignment on  _LocationAccountAssignment.MaintObjectLocAcctAssgmtNmbr = $projection.MaintObjectLocAcctAssgmtNmbr
  association [0..*] to I_MaintOrderOperObjectListLink as _MaintenanceObjectListLink on  _MaintenanceObjectListLink.MaintenanceObjectList     = $projection.MaintenanceOrderObjectList
                                                                                     and _MaintenanceObjectListLink.MaintenanceObjectListItem = $projection.MaintenanceObjectListItem


{
  key _MaintenanceOrder.MaintenanceOrder,
  key ObjectListItem.MaintenanceObjectList                                                                                                                                      as MaintenanceOrderObjectList,
  key ObjectListItem.MaintenanceObjectListItem,

      ObjectListItem.MaintenanceObjectListUsageCode,


      case when MaintenanceNotification = '' then Equipment else _PMNotifMaintenanceData.Equipment end                                                                          as Equipment,


      ObjectListItem.MaintenanceNotification,

      case when  MaintenanceNotification = '' then ObjectListItem.Assembly else _PMNotifMaintenanceData.Assembly end                                                            as Assembly,

      @ObjectModel.foreignKey.association: '_LocationAccountAssignment'
      ObjectListItem.MaintObjectLocAcctAssgmtNmbr,

      case when  MaintenanceNotification = '' then ObjectListItem.Material else _PMNotifMaintenanceData._Equipment.Material end                                                 as Material,

      case when  MaintenanceNotification = '' then ObjectListItem.SerialNumber else _PMNotifMaintenanceData._Equipment.SerialNumber end                                         as SerialNumber,

      case when MaintenanceNotification = ''  then ObjectListItem.UniqueItemIdentifier else _PMNotifMaintenanceData._Equipment.UniqueItemIdentifier end                         as UniqueItemIdentifier,

      case when  MaintenanceNotification = '' then _LocationAccountAssignment.FunctionalLocation else _PMNotifMaintenanceData._LocationAccountAssignment.FunctionalLocation end as FunctionalLocation,

      ObjectListItem.CreationDate,
      ObjectListItem.MaintObjectListItemSequence,
      ObjectListItem.MaintObjListEntryIsProcessed,


      /* Associations */
      _Assembly,
      _Equipment,
      _MaintenanceNotification,
      _LocationAccountAssignment,
      _PMNotifMaintenanceData,
      _Product,
      _SerialNumber,
      _UniqueItemIdentifier,
      _MaintenanceOrder,
      _MaintenanceObjectListLink
}

where
  MaintenanceObjectListUsageCode = 'A'