I_MAINTENANCENOTIFICATION

CDS View

Maintenance Notification

I_MAINTENANCENOTIFICATION is a CDS View in S/4HANA. Maintenance Notification. It contains 71 fields. 24 CDS views read from this table.

CDS Views using this table (24)

ViewTypeJoinVDMDescription
C_MaintenanceNotificationVH view from CONSUMPTION Maintenance Notification Value Help
C_MaintNotificationDateMonitor view from CONSUMPTION Date Monitor
C_MaintNotifOutputParamDetn view from CONSUMPTION Maintenance Notification OM Parameter Determination
C_ObjPgMaintNotifWithDesc view from CONSUMPTION Maintenance Notification w/ Description
C_PMNotificationHeader view from CONSUMPTION Maintenance Notification
C_TechObjMaintNotification view from CONSUMPTION Maintenance Notifications for Technical Object
C_TechObjMaintNotification view union_all CONSUMPTION Maintenance Notifications for Technical Object
CRMS4_IU_I_UMN view_entity from Utilities Maintenance Notification
I_DFS_MaintNotificationTechSts view from COMPOSITE Interface view for Tech Status of Notif
I_MaintNotifAssignOrderInput view from COMPOSITE Maint Notification Assign Order Input
I_MaintNotifEmailParameter view from BASIC Email Parameters for Maint Notification
I_MaintNotificationTechObj view from COMPOSITE Maintenance Notification Tech. Object
I_MaintNotifLongText view from COMPOSITE PM: Maintenance Notification Long Text
I_MaintNotifPredictionData view from BASIC prediction data with RDT
I_MaintNotifQueryNode view from BASIC Maintenance Notification Query Node
I_MaintNotifStdVH view from COMPOSITE Maintenance Notification
I_MaintNotifTrainingData view from BASIC Training Data for Model training
P_MaintenanceJobAndWorkItem view from COMPOSITE
P_MaintenanceJobAndWorkItem view union_all COMPOSITE
P_MaintNotificationPartner view from COMPOSITE
P_MaintNotificationSearch view from BASIC
P_MaintNotifRefObject view from CONSUMPTION
P_MaintNotifTechObjBreakdown view from COMPOSITE
P_MaintPlngBcktNotification view from CONSUMPTION Auxiliary View for Notifications in Planning Bucket

Fields (71)

KeyField CDS FieldsUsed in Views
KEY MaintenanceNotification MaintenanceNotification,Notification 12
KEY MaintNotifInternalID MaintenanceJobInternalID,MaintNotifInternalID,StatusObject 6
_CreatedByUser _CreatedByUser 1
_IsCompleted _IsCompleted 2
_IsDeleted _IsDeleted 3
_LastChangedByUser _LastChangedByUser 1
_LinearAssetManagementData _LinearAssetManagementData 1
_MaintenanceNotificationItem _MaintenanceNotificationItem 1
_Maintenancenotificationtask _Maintenancenotificationtask 1
_MaintenanceOrder _MaintenanceOrder 3
_MaintenancePartner _MaintenancePartner 2
_MaintenanceWorkCenterPlant _MaintenanceWorkCenterPlant 3
_MaintNotificationActivity _MaintNotificationActivity 1
_MaintNotificationCatalog _MaintNotificationCatalog 2
_MaintNotificationCode _MaintNotificationCode 2
_MaintNotificationCodeGroup _MaintNotificationCodeGroup 2
_MainWorkCenter _MainWorkCenter 3
_Material _Material 1
_NotificationHasLongText _NotificationHasLongText 1
_PMNotificationPhase _PMNotificationPhase 3
_PMNotificationPriority _PMNotificationPriority 3
_PMNotificationPriorityType _PMNotificationPriorityType 3
_PMNotificationType _PMNotificationType 2
_PMNotifMaintenanceData _PMNotifMaintenanceData 4
_ReportedByUser _ReportedByUser 2
_StatusObject _StatusObject 2
_StatusObjectActiveStatus _StatusObjectActiveStatus 2
_TechnicalObjectCodeCatalog _TechnicalObjectCodeCatalog 1
_WorkCenterType _WorkCenterType 3
AdditionalDeviceData AdditionalDeviceData 1
CatalogProfile CatalogProfile 2
CreatedByUser CreatedByUser 2
CreationDate CreationDate 2
CreationDateTime CreationDateTime 1
CreationTime CreationTime 2
DfsMaintNotificationObjectNmbr DfsMaintNotificationObjectNmbr 2
IsCompleted IsCompleted 2
IsDeleted IsDeleted 3
LastChangeDateTime LastChangeDateTime 2
LastChangedByUser LastChangedByUser 1
LongTextLanguage LongTextLanguage 1
MaintenanceOrder MaintenanceOrder 4
MaintenanceWorkCenterPlant MaintenanceWorkCenterPlant 4
MaintNotifExtReferenceNumber MaintNotifExtReferenceNumber 2
MaintNotificationCatalog MaintNotificationCatalog 2
MaintNotificationCode MaintNotificationCode 3
MaintNotificationCodeGroup MaintNotificationCodeGroup 3
MaintPriority MaintPriority 4
MaintPriorityType MaintPriorityType 4
MasterLanguage MasterLanguage 1
Material Material 1
NotificationCompletionDate NotificationCompletionDate 2
NotificationCompletionTime CompletionTime,NotificationCompletionTime 2
NotificationCreationDate NotificationCreationDate 2
NotificationCreationTime NotificationCreationTime 2
NotificationHasLongText NotificationHasLongText 1
NotificationOrigin NotificationOrigin 2
NotificationReferenceDate NotificationReferenceDate 2
NotificationReferenceTime NotificationReferenceTime 2
NotificationText NotificationText 9
NotificationTimeZone NotificationTimeZone 3
NotificationType NotificationType 7
NotifProcessingPhase NotifProcessingPhase 5
ReportedByUser ReportedByUser 2
RequiredEndDate RequiredEndDate 2
RequiredEndTime RequiredEndTime 2
RequiredStartDate RequiredStartDate 2
RequiredStartTime RequiredStartTime 2
SerialNumber SerialNumber 1
WorkCenterInternalID WorkCenterInternalID 3
WorkCenterTypeCode WorkCenterTypeCode 3
@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,
            
      // 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)

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"QMEL"
],
"ASSOCIATED":
[
"I_INDICATOR",
"I_INSPECTIONCATALOG",
"I_INSPECTIONCODE",
"I_INSPECTIONCODEGROUP",
"I_LINEARASSETMANAGEMENTDATA",
"I_MAINTENANCENOTIFICATIONITEM",
"I_MAINTENANCENOTIFICATIONTASK",
"I_MAINTENANCEORDER",
"I_MAINTNOTIFICATIONACTIVITY",
"I_MATERIAL",
"I_PLANT",
"I_PLANTMAINTENANCEPARTNER",
"I_PMNOTIFICATIONPHASE",
"I_PMNOTIFICATIONPRIORITY",
"I_PMNOTIFICATIONPRIORITYTYPE",
"I_PMNOTIFICATIONTYPE",
"I_PMNOTIFMAINTENANCEDATA",
"I_STATUSOBJECT",
"I_STATUSOBJECTACTIVESTATUS",
"I_TECHNICALREPORT",
"I_USER",
"I_WORKCENTER",
"I_WORKCENTERTYPE"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/