I_MaintenanceNotificationItem

DDL: I_MAINTENANCENOTIFICATIONITEM SQL: IMAINTNOTIFITEM Type: view BASIC

Maintenance Notification Item

I_MaintenanceNotificationItem is a Basic CDS View (Dimension) that provides data about "Maintenance Notification Item" in SAP S/4HANA. It reads from 1 data source (qmfe) and exposes 32 fields with key fields MaintenanceNotificationItem, MaintenanceNotification. It has 2 associations to related views.

Data Sources (1)

SourceAliasJoin Type
qmfe qmfe from

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_Material _Assembly $projection.Assembly = _Assembly.Material
[0..1] I_DefectClass _DefectClass $projection.DefectClass = _DefectClass.DefectClass

Annotations (11)

NameValueLevelField
EndUserText.label Maintenance Notification Item view
Analytics.dataCategory #DIMENSION view
VDM.viewType #BASIC view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #NOT_REQUIRED view
AbapCatalog.sqlViewName IMAINTNOTIFITEM view
ObjectModel.representativeKey MaintenanceNotificationItem view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #L view

Fields (32)

KeyFieldSource TableSource FieldDescription
KEY MaintenanceNotificationItem qmfe fenum
KEY MaintenanceNotification qmfe qmnum
MaintNotifItemText qmfe fetxt
MaintNotifDamageCodeCatalog
MaintNotificationDamageCode
MaintNotifDamageCodeGroup
MaintNotifObjPrtCode
MaintNotifObjPrtCodeGroup
MaintNotifObjPrtCodeCatalog
DefectClass qmfe feqklas
Assembly qmfe bautl
NumberOfDefects qmfe anzfehler
ObjectKey
LastChangeDateTime qmfe changeddatetime
IsDeleted qmfe kzloesch
erdatendasCreationDate
erzeitendasCreationTime
aedatendasLastChangeDate
aezeitendasLastChangeTime
_MaintenanceNotification _MaintenanceNotification
_MaintNotifDamageCodeCatalog _MaintNotifDamageCodeCatalog
_MaintNotifDamageCodeGroup _MaintNotifDamageCodeGroup
_MaintNotificationDamageCode _MaintNotificationDamageCode
_MaintNotifObjPrtCodeCatalog _MaintNotifObjPrtCodeCatalog
_MaintNotifObjPrtCodeGroup _MaintNotifObjPrtCodeGroup
_MaintNotifObjPrtCode _MaintNotifObjPrtCode
_MaintenanceNotificationCause _MaintenanceNotificationCause
_MaintNotificationActivity _MaintNotificationActivity
_MaintenanceNotificationTask _MaintenanceNotificationTask
_IsDeleted _IsDeleted
_Assembly _Assembly
_DefectClass _DefectClass
@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":""
}
}*/