I_MaintenanceNotification

DDL: I_MAINTENANCENOTIFICATION Type: view BASIC

Maintenance Notification

I_MaintenanceNotification is a Basic CDS View that provides data about "Maintenance Notification" in SAP S/4HANA. It reads from 1 data source (qmel) and exposes 70 fields with key field MaintenanceNotification. It has 27 associations to related views.

Data Sources (1)

SourceAliasJoin Type
qmel qmel from

Associations (27)

CardinalityTargetAliasCondition
[0..1] I_PMNotificationPriorityType _PMNotificationPriorityType $projection.MaintPriorityType = _PMNotificationPriorityType.MaintPriorityType
[0..1] I_PMNotificationPriority _PMNotificationPriority _PMNotificationPriority.MaintPriority = $projection.MaintPriority and _PMNotificationPriority.MaintPriorityType = $projection.MaintPriorityType
[1..1] I_PMNotificationType _PMNotificationType _PMNotificationType.NotificationType = $projection.NotificationType
[0..1] I_PMNotifMaintenanceData _PMNotifMaintenanceData _PMNotifMaintenanceData.MaintenanceNotification = $projection.MaintenanceNotification
[0..1] I_PMNotificationPhase _PMNotificationPhase _PMNotificationPhase.NotifProcessingPhase = $projection.NotifProcessingPhase
[0..1] I_WorkCenter _MainWorkCenter _MainWorkCenter.WorkCenterInternalID = $projection.WorkCenterInternalID and _MainWorkCenter.WorkCenterTypeCode = $projection.WorkCenterTypeCode
[0..1] I_WorkCenterType _WorkCenterType $projection.WorkCenterTypeCode = _WorkCenterType.WorkCenterTypeCode
[0..1] I_User _CreatedByUser _CreatedByUser.UserID = $projection.CreatedByUser
[0..1] I_User _LastChangedByUser _LastChangedByUser.UserID = $projection.LastChangedByUser
[0..1] I_User _ReportedByUser _ReportedByUser.UserID = $projection.ReportedByUser
[0..1] I_Indicator _IsDeleted $projection.IsDeleted = _IsDeleted.IndicatorValue
[0..1] I_Indicator _IsCompleted $projection.IsCompleted = _IsCompleted.IndicatorValue
[0..1] I_MaintenanceOrder _MaintenanceOrder $projection.MaintenanceOrder = _MaintenanceOrder.MaintenanceOrder
[0..*] I_PlantMaintenancePartner _MaintenancePartner $projection.MaintNotifInternalID = _MaintenancePartner.MaintObjectInternalID
[0..*] I_MaintenanceNotificationItem _MaintenanceNotificationItem $projection.MaintenanceNotification = _MaintenanceNotificationItem.MaintenanceNotification
[0..*] I_MaintenanceNotificationTask _Maintenancenotificationtask $projection.MaintenanceNotification = _Maintenancenotificationtask.MaintenanceNotification
[0..*] I_MaintNotificationActivity _MaintNotificationActivity $projection.MaintenanceNotification = _MaintNotificationActivity.MaintenanceNotification
[0..1] I_Inspectioncatalog _MaintNotificationCatalog $projection.MaintNotificationCatalog = _MaintNotificationCatalog.InspectionCatalog
[0..1] I_InspectionCodeGroup _MaintNotificationCodeGroup $projection.MaintNotificationCatalog = _MaintNotificationCodeGroup.InspectionCatalog and $projection.MaintNotificationCodeGroup = _MaintNotificationCodeGroup.InspectionCodeGroup
[0..1] I_InspectionCode _MaintNotificationCode $projection.MaintNotificationCatalog = _MaintNotificationCode.InspectionCatalog and $projection.MaintNotificationCodeGroup = _MaintNotificationCode.InspectionCodeGroup and $projection.MaintNotificationCode = _MaintNotificationCode.InspectionCode
[0..1] I_Plant _MaintenanceWorkCenterPlant $projection.MaintenanceWorkCenterPlant = _MaintenanceWorkCenterPlant.Plant
[0..1] I_StatusObject _StatusObject $projection.MaintNotifInternalID = _StatusObject.StatusObject
[0..1] I_TechnicalReport _TechnicalObjectCodeCatalog $projection.CatalogProfile = _TechnicalObjectCodeCatalog.CatalogProfile
[0..*] I_StatusObjectActiveStatus _StatusObjectActiveStatus $projection.MaintNotifInternalID = _StatusObjectActiveStatus.StatusObject
[0..1] I_Indicator _NotificationHasLongText $projection.NotificationHasLongText = _NotificationHasLongText.IndicatorValue
[0..1] I_LinearAssetManagementData _LinearAssetManagementData $projection.MaintenanceNotification = _LinearAssetManagementData.LinearDataObjectKey and _LinearAssetManagementData.LinearDataObjectType = 'QM'
[0..1] I_Material _Material $projection.Material = _Material.Material

Annotations (12)

NameValueLevelField
EndUserText.label Maintenance Notification view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.sqlViewName IMAINTNOTIF view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #NOT_REQUIRED view
VDM.viewType #BASIC view
VDM.lifecycle.contract.type #PUBLIC_LOCAL_API view
ObjectModel.representativeKey MaintenanceNotification view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.modelingPattern #NONE view

Fields (70)

KeyFieldSource TableSource FieldDescription
KEY MaintenanceNotification qmel qmnum
MaintPriority qmel priok
MaintPriorityType qmel artpr
NotificationType qmel qmart
NotifProcessingPhase qmel phase
CreatedByUser qmel ernam
LastChangedByUser qmel aenam
ReportedByUser qmel qmnam
CreationDate qmel erdat
aezeitendasLastChangeTime
aedatendasLastChangeDate
CreationTime qmel erzeit
NotificationText qmel qmtxt
LongTextLanguage qmel kzmla
MaintenanceOrder qmel aufnr
RequiredStartDate
RequiredStartTime qmel strur
RequiredEndDate
RequiredEndTime qmel ltrur
NotificationCreationDate qmel qmdat
NotificationCreationTime qmel mzeit
NotificationReferenceDate qmel bezdt
NotificationHasLongText qmel indtx
MaintNotifInternalID qmel objnr
NotificationTimeZone qmel tzonso
NotificationReferenceTime qmel bezur
NotificationCompletionDate qmel qmdab
NotificationCompletionTime qmel qmzab
WorkCenterInternalID qmel arbpl
WorkCenterTypeCode
MaintenanceWorkCenterPlant qmel arbplwerk
MaintNotificationCatalog qmel qmkat
MaintNotificationCode qmel qmcod
MaintNotificationCodeGroup qmel qmgrp
CatalogProfile qmel rbnr
NotificationOrigin qmel herkz
LastChangeDateTime qmel changeddatetime
SerialNumber qmel serialnr
Material qmel matnr
AdditionalDeviceData qmel deviceid
MaintNotifExtReferenceNumber qmel refnum
MasterLanguage
InspectionLot qmel prueflos
_LastChangedByUser _LastChangedByUser
_CreatedByUser _CreatedByUser
_ReportedByUser _ReportedByUser
_PMNotificationPriority _PMNotificationPriority
_PMNotificationType _PMNotificationType
_PMNotifMaintenanceData _PMNotifMaintenanceData
_PMNotificationPhase _PMNotificationPhase
_MainWorkCenter _MainWorkCenter
_IsDeleted _IsDeleted
_IsCompleted _IsCompleted
_MaintenanceOrder _MaintenanceOrder
_PMNotificationPriorityType _PMNotificationPriorityType
_MaintenanceNotificationItem _MaintenanceNotificationItem
_MaintNotificationActivity _MaintNotificationActivity
_Maintenancenotificationtask _Maintenancenotificationtask
_MaintenancePartner _MaintenancePartner
_MaintNotificationCatalog _MaintNotificationCatalog
_MaintNotificationCodeGroup _MaintNotificationCodeGroup
_MaintNotificationCode _MaintNotificationCode
_MaintenanceWorkCenterPlant _MaintenanceWorkCenterPlant
_StatusObject _StatusObject
_TechnicalObjectCodeCatalog _TechnicalObjectCodeCatalog
_WorkCenterType _WorkCenterType
_StatusObjectActiveStatus _StatusObjectActiveStatus
_NotificationHasLongText _NotificationHasLongText
_LinearAssetManagementData _LinearAssetManagementData
_Material _Material
@EndUserText.label: 'Maintenance Notification'
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog: { sqlViewName: 'IMAINTNOTIF', compiler.compareFilter, preserveKey }
@AccessControl: {
    authorizationCheck:#CHECK,
    personalData.blocking: #NOT_REQUIRED,
    privilegedAssociations: [ '_CreatedByUser', '_LastChangedByUser', '_ReportedByUser', '_StatusObjectActiveStatus', '_StatusObject' ]
}

@VDM: {
  viewType: #BASIC,
  lifecycle.contract.type: #PUBLIC_LOCAL_API }

@ObjectModel: {
  representativeKey: 'MaintenanceNotification',
  semanticKey:  [ 'MaintenanceNotification' ],
  usageType: {
    dataClass: #TRANSACTIONAL,
    serviceQuality: #B,
    sizeCategory: #L },
    supportedCapabilities: [ #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE, #CDS_MODELING_ASSOCIATION_TARGET ],
    modelingPattern: #NONE }

@Metadata.ignorePropagatedAnnotations


define view I_MaintenanceNotification
  as select from qmel
  association [0..1] to I_PMNotificationPriorityType  as _PMNotificationPriorityType  on  $projection.MaintPriorityType = _PMNotificationPriorityType.MaintPriorityType
  association [0..1] to I_PMNotificationPriority      as _PMNotificationPriority      on  _PMNotificationPriority.MaintPriority     = $projection.MaintPriority
                                                                                      and _PMNotificationPriority.MaintPriorityType = $projection.MaintPriorityType
  association [1..1] to I_PMNotificationType          as _PMNotificationType          on  _PMNotificationType.NotificationType = $projection.NotificationType
  association [0..1] to I_PMNotifMaintenanceData      as _PMNotifMaintenanceData      on  _PMNotifMaintenanceData.MaintenanceNotification = $projection.MaintenanceNotification
  association [0..1] to I_PMNotificationPhase         as _PMNotificationPhase         on  _PMNotificationPhase.NotifProcessingPhase = $projection.NotifProcessingPhase
  association [0..1] to I_WorkCenter                  as _MainWorkCenter              on  _MainWorkCenter.WorkCenterInternalID = $projection.WorkCenterInternalID
                                                                                      and _MainWorkCenter.WorkCenterTypeCode   = $projection.WorkCenterTypeCode
  association [0..1] to I_WorkCenterType              as _WorkCenterType              on  $projection.WorkCenterTypeCode = _WorkCenterType.WorkCenterTypeCode
  association [0..1] to I_User                        as _CreatedByUser               on  _CreatedByUser.UserID = $projection.CreatedByUser
  association [0..1] to I_User                        as _LastChangedByUser           on  _LastChangedByUser.UserID = $projection.LastChangedByUser
  association [0..1] to I_User                        as _ReportedByUser              on  _ReportedByUser.UserID = $projection.ReportedByUser
  association [0..1] to I_Indicator                   as _IsDeleted                   on  $projection.IsDeleted = _IsDeleted.IndicatorValue
  association [0..1] to I_Indicator                   as _IsCompleted                 on  $projection.IsCompleted = _IsCompleted.IndicatorValue
  association [0..1] to I_MaintenanceOrder            as _MaintenanceOrder            on  $projection.MaintenanceOrder = _MaintenanceOrder.MaintenanceOrder
  association [0..*] to I_PlantMaintenancePartner     as _MaintenancePartner          on  $projection.MaintNotifInternalID = _MaintenancePartner.MaintObjectInternalID
  association [0..*] to I_MaintenanceNotificationItem as _MaintenanceNotificationItem on  $projection.MaintenanceNotification = _MaintenanceNotificationItem.MaintenanceNotification
  association [0..*] to I_MaintenanceNotificationTask as _Maintenancenotificationtask on  $projection.MaintenanceNotification = _Maintenancenotificationtask.MaintenanceNotification
  association [0..*] to I_MaintNotificationActivity   as _MaintNotificationActivity   on  $projection.MaintenanceNotification = _MaintNotificationActivity.MaintenanceNotification
  association [0..1] to I_Inspectioncatalog           as _MaintNotificationCatalog    on  $projection.MaintNotificationCatalog = _MaintNotificationCatalog.InspectionCatalog
  association [0..1] to I_InspectionCodeGroup         as _MaintNotificationCodeGroup  on  $projection.MaintNotificationCatalog   = _MaintNotificationCodeGroup.InspectionCatalog
                                                                                      and $projection.MaintNotificationCodeGroup = _MaintNotificationCodeGroup.InspectionCodeGroup
  association [0..1] to I_InspectionCode              as _MaintNotificationCode       on  $projection.MaintNotificationCatalog   = _MaintNotificationCode.InspectionCatalog
                                                                                      and $projection.MaintNotificationCodeGroup = _MaintNotificationCode.InspectionCodeGroup
                                                                                      and $projection.MaintNotificationCode      = _MaintNotificationCode.InspectionCode
  association [0..1] to I_Plant                       as _MaintenanceWorkCenterPlant  on  $projection.MaintenanceWorkCenterPlant = _MaintenanceWorkCenterPlant.Plant
  association [0..1] to I_StatusObject                as _StatusObject                on  $projection.MaintNotifInternalID = _StatusObject.StatusObject
  association [0..1] to I_TechnicalReport             as _TechnicalObjectCodeCatalog  on  $projection.CatalogProfile = _TechnicalObjectCodeCatalog.CatalogProfile

  association [0..*] to I_StatusObjectActiveStatus    as _StatusObjectActiveStatus    on  $projection.MaintNotifInternalID = _StatusObjectActiveStatus.StatusObject
  association [0..1] to I_Indicator                   as _NotificationHasLongText     on  $projection.NotificationHasLongText = _NotificationHasLongText.IndicatorValue
  association [0..1] to I_LinearAssetManagementData   as _LinearAssetManagementData   on  $projection.MaintenanceNotification = _LinearAssetManagementData.LinearDataObjectKey
                                                                                      and _LinearAssetManagementData.LinearDataObjectType = 'QM'
  association [0..1] to I_Material                    as _Material                    on $projection.Material = _Material.Material
{

      @ObjectModel.text.element:  [ 'NotificationText' ]
  key qmel.qmnum                                                              as MaintenanceNotification,

      // Associations

      @ObjectModel.foreignKey.association: '_PMNotificationPriority'
      qmel.priok                                                              as MaintPriority,
      @ObjectModel.foreignKey.association: '_PMNotificationPriorityType'
      qmel.artpr                                                              as MaintPriorityType,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_PMNotificationTypeStdVH',
                     element: 'NotificationType' }
        }]
      @ObjectModel.foreignKey.association: '_PMNotificationType'
      qmel.qmart                                                              as NotificationType,
      @ObjectModel.foreignKey.association: '_PMNotificationPhase'
      qmel.phase                                                              as NotifProcessingPhase,

      // Admin Data

      @Semantics.user.createdBy: true
      qmel.ernam                                                              as CreatedByUser,
      @Semantics.user.lastChangedBy: true
      qmel.aenam                                                              as LastChangedByUser,
      qmel.qmnam                                                              as ReportedByUser,

      @Semantics.systemDate.createdAt: true
      qmel.erdat                                                              as CreationDate,

      // If changed date and time fields are empty they will be

      // populated with the created date and time field values

      case when  qmel.aezeit = '000000' or qmel.aezeit is null
        then  qmel.erzeit
        else  qmel.aezeit end                                                 as LastChangeTime,

      @Semantics.systemDate.lastChangedAt: true
      case when qmel.aedat = '00000000' or qmel.aedat is null
        then qmel.erdat
        else qmel.aedat end                                                   as LastChangeDate,

      qmel.erzeit                                                             as CreationTime,
      cast ( concat(qmel.erdat,qmel.erzeit)
      as eam_creation_timestamp )                                             as CreationDateTime,

      @Semantics.text:true
      qmel.qmtxt                                                              as NotificationText,
      @API.element.releaseState: #DEPRECATED
      @API.element.successor: 'MasterLanguage'
      qmel.kzmla                                                              as LongTextLanguage,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_MaintenanceOrderStdVH',
                     element: 'MaintenanceOrder' }
        }]
      @ObjectModel.foreignKey.association: '_MaintenanceOrder'
      qmel.aufnr                                                              as MaintenanceOrder,


      cast ( qmel.strmn as eam_req_start_date )                               as RequiredStartDate,
      qmel.strur                                                              as RequiredStartTime,

      cast ( qmel.ltrmn as eam_req_end_date )                                 as RequiredEndDate,
      qmel.ltrur                                                              as RequiredEndTime,

      qmel.qmdat                                                              as NotificationCreationDate,
      qmel.mzeit                                                              as NotificationCreationTime,
      qmel.bezdt                                                              as NotificationReferenceDate,

      qmel.indtx                                                              as NotificationHasLongText,

      qmel.objnr                                                              as MaintNotifInternalID,
      qmel.tzonso                                                             as NotificationTimeZone,
      qmel.bezur                                                              as NotificationReferenceTime,
      qmel.qmdab                                                              as NotificationCompletionDate,
      qmel.qmzab                                                              as NotificationCompletionTime,

      // Responsibilities

      @ObjectModel.foreignKey.association: '_MainWorkCenter'
      qmel.arbpl                                                              as WorkCenterInternalID, // Main Work Center


      @ObjectModel.foreignKey.association: '_WorkCenterType'
      cast( 'A' as cr_objty )                                                 as WorkCenterTypeCode, // 'A' = Work center


      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_PlantStdVH',
                     element: 'Plant' }
        }]
      @ObjectModel.foreignKey.association: '_MaintenanceWorkCenterPlant'
      qmel.arbplwerk                                                          as MaintenanceWorkCenterPlant,

      @ObjectModel.foreignKey.association: '_MaintNotificationCatalog'
      qmel.qmkat                                                              as MaintNotificationCatalog,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_InspectionCodeStdVH',
                     element: 'InspectionCode' },
          additionalBinding: [{ localElement: 'MaintNotificationCatalog',
                                element: 'InspectionCatalog' },
                              { localElement: 'MaintNotificationCodeGroup',
                                element: 'InspectionCodeGroup' }]
        }]
      @ObjectModel.foreignKey.association: '_MaintNotificationCode'
      qmel.qmcod                                                              as MaintNotificationCode,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_InspectionCodeGroupStdVH',
                     element: 'InspectionCodeGroup' },
          additionalBinding: [{ localElement: 'MaintNotificationCatalog',
                                element: 'InspectionCatalog' }]
        }]
      @ObjectModel.foreignKey.association: '_MaintNotificationCodeGroup'
      qmel.qmgrp                                                              as MaintNotificationCodeGroup,

      @ObjectModel.foreignKey.association: '_TechnicalObjectCodeCatalog'
      qmel.rbnr                                                               as CatalogProfile,

      qmel.herkz                                                              as NotificationOrigin,


      // Phase 5 = Deletion Flag

      cast( case when qmel.phase = '5' or qmel.kzloesch = 'X' then 'X'
       else ''
      end                            as eam_is_deleted  )                     as IsDeleted,

      // Phase 4 = Completed

      cast( case when qmel.phase  = '4' then 'X'
       else ''
      end                      as eam_is_completed )                          as IsCompleted,

      @Semantics.systemDateTime.lastChangedAt: true
      qmel.changeddatetime                                                    as LastChangeDateTime,
      qmel.serialnr                                                           as SerialNumber,
      qmel.matnr                                                              as Material,
      qmel.deviceid                                                           as AdditionalDeviceData,
      // Notification API 2011

      qmel.refnum                                                             as MaintNotifExtReferenceNumber,
      // Notification API 2011

      cast( qmel.kzmla as vdm_j_masterlanguage )          as MasterLanguage,
      qmel.prueflos                                                           as InspectionLot,

      // Propagate associations

      _LastChangedByUser,
      _CreatedByUser,
      _ReportedByUser,
      _PMNotificationPriority,
      _PMNotificationType,
      _PMNotifMaintenanceData,
      _PMNotificationPhase,
      _MainWorkCenter,
      _IsDeleted,
      _IsCompleted,
      _MaintenanceOrder,
      _PMNotificationPriorityType,
      _MaintenanceNotificationItem,
      _MaintNotificationActivity,
      _Maintenancenotificationtask,
      _MaintenancePartner,
      _MaintNotificationCatalog,
      _MaintNotificationCodeGroup,
      _MaintNotificationCode,
      _MaintenanceWorkCenterPlant,
      _StatusObject,
      _TechnicalObjectCodeCatalog,
      _WorkCenterType,
      _StatusObjectActiveStatus,
      _NotificationHasLongText,
      _LinearAssetManagementData,
      _Material
} where //herkz between '01' and '06'.

// Only show PM & CS relevant headers

herkz = '01' or   // General Maintenance Notification

herkz = '02' or   // Malfunction Report

herkz = '03' or   // Activity Report

herkz = '04' or   // Problem notification

herkz = '05' or   // Activity report (service)

herkz = '06'      // General notification (service)