I_MAINTENANCENOTIFICATIONITEM

CDS View

Maintenance Notification Item

I_MAINTENANCENOTIFICATIONITEM is a CDS View in S/4HANA. Maintenance Notification Item. It contains 27 fields. 4 CDS views read from this table.

CDS Views using this table (4)

ViewTypeJoinVDMDescription
C_MaintNotificationItemCount view from CONSUMPTION Item counter for Maintenance Notification
I_MaintNotifItemTechObj view from COMPOSITE Maint. Notification Item /w Tech. Obj.
P_Damageanalysiscube view from COMPOSITE
R_MaintNotificationItemTP view_entity from TRANSACTIONAL Maintenance Notification Item

Fields (27)

KeyField CDS FieldsUsed in Views
KEY MaintenanceNotification MaintenanceNotification 2
KEY MaintenanceNotificationItem MaintenanceNotificationItem 2
_Assembly _Assembly 1
_DefectClass _DefectClass 1
_IsDeleted _IsDeleted 1
_MaintenanceNotification _MaintenanceNotification 2
_MaintenanceNotificationTask _MaintenanceNotificationTask 1
_MaintNotifDamageCodeCatalog _MaintNotifDamageCodeCatalog 1
_MaintNotifDamageCodeGroup _MaintNotifDamageCodeGroup 1
_MaintNotificationActivity _MaintNotificationActivity 1
_MaintNotificationDamageCode _MaintNotificationDamageCode 1
_MaintNotifObjPrtCode _MaintNotifObjPrtCode 1
_MaintNotifObjPrtCodeCatalog _MaintNotifObjPrtCodeCatalog 1
_MaintNotifObjPrtCodeGroup _MaintNotifObjPrtCodeGroup 1
Assembly Assembly 1
DefectClass DefectClass 1
IsDeleted IsDeleted 1
LastChangeDateTime LastChangeDateTime 1
MaintNotifDamageCodeCatalog MaintNotifDamageCodeCatalog 2
MaintNotifDamageCodeGroup MaintNotifDamageCodeGroup 2
MaintNotificationDamageCode MaintNotificationDamageCode 2
MaintNotifItemText MaintNotifItemText 1
MaintNotifObjPrtCode MaintNotifObjPrtCode 2
MaintNotifObjPrtCodeCatalog MaintNotifObjPrtCodeCatalog 2
MaintNotifObjPrtCodeGroup MaintNotifObjPrtCodeGroup 2
NumberOfDefects NumberOfDefects 1
ObjectKey ObjectKey 1
@EndUserText.label: 'Maintenance Notification Item' 
--@Analytics: { dataCategory: #DIMENSION }
@VDM.viewType: #BASIC
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #NOT_REQUIRED
@AbapCatalog.sqlViewName: 'IMAINTNOTIFITEM' 

@ObjectModel.representativeKey: 'MaintenanceNotificationItem'
@ObjectModel.semanticKey:  [ 'MaintenanceNotificationItem','MaintenanceNotification' ] 

@ClientHandling.algorithm: #SESSION_VARIABLE 

@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.sizeCategory: #L

define view I_MaintenanceNotificationItem as select from qmfe
association[1..1] to I_MaintenanceNotification as _MaintenanceNotification on $projection.MaintenanceNotification = _MaintenanceNotification.MaintenanceNotification
association[0..*] to I_MaintenanceNotificationCause as _MaintenanceNotificationCause on _MaintenanceNotificationCause.MaintenanceNotification = $projection.MaintenanceNotification 
and $projection.MaintenanceNotificationItem = _MaintenanceNotificationCause.MaintenanceNotificationItem
association[0..*] to I_MaintNotificationActivity as _MaintNotificationActivity on _MaintNotificationActivity.MaintenanceNotification = $projection.MaintenanceNotification 
and $projection.MaintenanceNotificationItem = _MaintNotificationActivity.MaintenanceNotificationItem
association[0..*] to I_MaintenanceNotificationTask as _MaintenanceNotificationTask on $projection.MaintenanceNotification =  _MaintenanceNotificationTask.MaintenanceNotification
and $projection.MaintenanceNotificationItem = _MaintenanceNotificationTask.MaintenanceNotificationItem
association[0..1] to I_Indicator as _IsDeleted on $projection.IsDeleted = _IsDeleted.IndicatorValue
//Damage Coding

association[0..1] to I_Inspectioncatalog as _MaintNotifDamageCodeCatalog on $projection.MaintNotifDamageCodeCatalog = _MaintNotifDamageCodeCatalog.InspectionCatalog
association[0..1] to I_InspectionCodeGroup as _MaintNotifDamageCodeGroup on $projection.MaintNotifDamageCodeGroup = _MaintNotifDamageCodeGroup.InspectionCodeGroup and
$projection.MaintNotifDamageCodeCatalog = _MaintNotifDamageCodeGroup.InspectionCatalog
association[0..1] to I_InspectionCode as _MaintNotificationDamageCode on $projection.MaintNotificationDamageCode = _MaintNotificationDamageCode.InspectionCode and
$projection.MaintNotifDamageCodeCatalog = _MaintNotificationDamageCode.InspectionCatalog and $projection.MaintNotifDamageCodeGroup = _MaintNotificationDamageCode.InspectionCodeGroup
//Object Part Coding

association[0..1] to I_Inspectioncatalog as _MaintNotifObjPrtCodeCatalog on $projection.MaintNotifObjPrtCodeCatalog = _MaintNotifObjPrtCodeCatalog.InspectionCatalog
association[0..1] to I_InspectionCodeGroup as _MaintNotifObjPrtCodeGroup on $projection.MaintNotifObjPrtCodeGroup = _MaintNotifObjPrtCodeGroup.InspectionCodeGroup and
$projection.MaintNotifObjPrtCodeCatalog = _MaintNotifObjPrtCodeGroup.InspectionCatalog
association[0..1] to I_InspectionCode as _MaintNotifObjPrtCode on $projection.MaintNotifObjPrtCode = _MaintNotifObjPrtCode.InspectionCode and
$projection.MaintNotifObjPrtCodeCatalog = _MaintNotifObjPrtCode.InspectionCatalog and $projection.MaintNotifObjPrtCodeGroup = _MaintNotifObjPrtCode.InspectionCodeGroup
association [0..1] to I_Material as _Assembly on $projection.Assembly = _Assembly.Material
association [0..1] to I_DefectClass as _DefectClass on $projection.DefectClass = _DefectClass.DefectClass
{

    key qmfe.fenum as MaintenanceNotificationItem,
    @ObjectModel.foreignKey.association: '_MaintenanceNotification'
    key qmfe.qmnum as MaintenanceNotification,
        
    @Semantics.text: true
    qmfe.fetxt as MaintNotifItemText,
    
    @ObjectModel.foreignKey.association: '_MaintNotifDamageCodeCatalog'
    cast( qmfe.fekat as eam_damage_code_catalog ) as MaintNotifDamageCodeCatalog,
    @ObjectModel.foreignKey.association: '_MaintNotificationDamageCode'
    cast( qmfe.fecod as eam_damage_code ) as MaintNotificationDamageCode,
    @ObjectModel.foreignKey.association: '_MaintNotifDamageCodeGroup'
    cast( qmfe.fegrp as eam_damage_code_group ) as MaintNotifDamageCodeGroup,
    
    @ObjectModel.foreignKey.association: '_MaintNotifObjPrtCode'
    cast( qmfe.oteil as eam_object_part_code ) as MaintNotifObjPrtCode,
    @ObjectModel.foreignKey.association: '_MaintNotifObjPrtCodeGroup'
    cast( qmfe.otgrp as eam_object_part_code_group ) as MaintNotifObjPrtCodeGroup,
    @ObjectModel.foreignKey.association: '_MaintNotifObjPrtCodeCatalog'
    cast( qmfe.otkat as eam_object_part_code_catalog ) as MaintNotifObjPrtCodeCatalog,
    
    @ObjectModel.foreignKey.association: '_DefectClass'
    qmfe.feqklas   as DefectClass,
    
    @ObjectModel.foreignKey.association: '_Assembly'
    qmfe.bautl     as Assembly,    
    qmfe.anzfehler as NumberOfDefects,
    concat(qmfe.qmnum, qmfe.fenum)                                         as ObjectKey,
    @Semantics.systemDateTime.lastChangedAt: true
    qmfe.changeddatetime                                                   as LastChangeDateTime,    

    @ObjectModel.foreignKey.association: '_IsDeleted'
    qmfe.kzloesch  as IsDeleted,
            
    
    //Addition for Timezone\

    //Addition for Timezone

     case qmfe.erzeit when '240000'
     then dats_add_days(qmfe.erdat,1,'NULL')
     else qmfe.erdat 
     end as CreationDate,
     @Semantics.time: true
     case qmfe.erzeit when '240000'
     then '000000' 
     else qmfe.erzeit 
     end as CreationTime,

     case qmfe.aezeit when '240000'
     then dats_add_days(qmfe.aedat,1,'NULL')
     else qmfe.aedat 
     end as LastChangeDate,
     @Semantics.time: true
     case qmfe.aezeit when '240000'
     then '000000' 
     else qmfe.aezeit
     end as LastChangeTime,
//    qmfe.erdat  as CreationDate,

//    qmfe.erzeit as CreationTime,

//    qmfe.aedat as LastChangeDate,

//    qmfe.aezeit as LastChangeTime,

    
    //Associations

    _MaintenanceNotification,
    _MaintNotifDamageCodeCatalog,
    _MaintNotifDamageCodeGroup,
    _MaintNotificationDamageCode,
    _MaintNotifObjPrtCodeCatalog,
    _MaintNotifObjPrtCodeGroup,
    _MaintNotifObjPrtCode,    
    _MaintenanceNotificationCause,
    _MaintNotificationActivity,
    _MaintenanceNotificationTask,
    _IsDeleted,
    _Assembly,
    _DefectClass
}
where 
// Only show PM & CS relevant Items

_MaintenanceNotification.NotificationOrigin = '01' or   // General Maintenance Notification

_MaintenanceNotification.NotificationOrigin = '02' or   // Malfunction Report

_MaintenanceNotification.NotificationOrigin = '03' or   // Activity Report

_MaintenanceNotification.NotificationOrigin = '04' or   // Problem notification

_MaintenanceNotification.NotificationOrigin = '05' or   // Activity report (service)

_MaintenanceNotification.NotificationOrigin = '06'      // General notification (service)



                                                             
  
  
 /*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_MAINTENANCENOTIFICATION",
"QMFE"
],
"ASSOCIATED":
[
"I_DEFECTCLASS",
"I_INDICATOR",
"I_INSPECTIONCATALOG",
"I_INSPECTIONCODE",
"I_INSPECTIONCODEGROUP",
"I_MAINTENANCENOTIFICATION",
"I_MAINTENANCENOTIFICATIONCAUSE",
"I_MAINTENANCENOTIFICATIONTASK",
"I_MAINTNOTIFICATIONACTIVITY",
"I_MATERIAL"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/