I_MaintenanceNotificationBasic

DDL: I_MAINTENANCENOTIFICATIONBASIC Type: view_entity BASIC Package: VDM_EAM_NTF

Maintenance Notification Header Basic

I_MaintenanceNotificationBasic is a Basic CDS View that provides data about "Maintenance Notification Header Basic" in SAP S/4HANA. It reads from 1 data source (qmel) and exposes 70 fields with key field MaintenanceNotification. Part of development package VDM_EAM_NTF.

Data Sources (1)

SourceAliasJoin Type
qmel Notification from

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
AccessControl.personalData.blocking #NOT_REQUIRED view
EndUserText.label Maintenance Notification Header Basic view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #L view
VDM.viewType #BASIC view

Fields (70)

KeyFieldSource TableSource FieldDescription
KEY MaintenanceNotification MaintNotif qmnum
NotificationType qmel qmart
NotificationText qmel qmtxt
MaintenanceOrder qmel aufnr
MaintNotifProcessingContext MaintNotif maintnotifprocessingcontext
MaintNotifRejectionReasonCode MaintNotif notifrejectionreasoncode
MaintPriorityType qmel artpr
MaintPriority qmel priok
LatestAcceptableCompletionDate MaintNotif lacd_date
PreviousFinalDueDate MaintNotif old_lacd_date
CatalogProfile qmel rbnr
CatalogProfileOriginCode qmel rbnri
Equipment MaintNotif equnr
MaintObjectLocAcctAssgmtNmbr MaintNotif iloan
LocationDescription MaintNotif loc_desc
RequiredStartDate qmel strmn
RequiredStartTime qmel strur
RequiredEndDate qmel ltrmn
RequiredEndTime qmel ltrur
NotificationCreationDate qmel qmdat
NotificationCreationTime qmel mzeit
NotificationReferenceDate qmel bezdt
NotificationReferenceTime qmel bezur
NotificationCompletionDate qmel qmdab
NotificationCompletionTime qmel qmzab
MalfunctionStartDate MaintNotif ausvn
MalfunctionStartTime MaintNotif auztv
MalfunctionEndDate MaintNotif ausbs
MalfunctionEndTime MaintNotif auztb
MaintNotificationCatalog qmel qmkat
MaintNotificationCodeGroup qmel qmgrp
MaintNotificationCode qmel qmcod
MaintenanceObjectIsDown MaintNotif msaus
MaintObjectDowntimeDuration MaintNotif auszt
MaintObjDowntimeDurationUnit MaintNotif maueh
MaintNotifDetectionCatalog MaintNotif detectioncatalog
MaintNotifDetectionCodeGroup MaintNotif detectioncodegroup
MaintNotifDetectionCode MaintNotif detectioncode
MalfunctionEffect MaintNotif auswk
MaintNotifInternalID qmel objnr
NotificationHasLongText qmel indtx
NotificationTimeZone qmel tzonso
NotificationTimeZoneOrigin qmel tzonid
MaintenancePlan MaintNotif warpl
MaintenanceItem MaintNotif wapos
MaintenancePlanCallNumber MaintNotif abnum
MaintenanceTaskListType MaintNotif plnty
TaskListGroup MaintNotif plnnr
TaskListGroupCounter MaintNotif plnal
MaintenanceActivityType MaintNotif ilart
NotifProcessingPhase qmel phase
MaintNotifProcessPhaseCode MaintNotif maintnotifovrlprocphase
MaintNotifProcessSubPhaseCode MaintNotif maintnotifovrlprocsubphase
WorkCenterInternalID qmel arbpl
MainWorkCenterPlant qmel arbplwerk
MainWorkCenterTypeCode qmel crobjty
MaintenancePlannerGroup MaintNotif ingrp
MaintenancePlanningPlant MaintNotif iwerk
NotificationPersonResponsible MaintNotif notificationpersonresponsible
ReferenceMaintenanceOrder MaintNotif referencemaintenanceorder
RefMaintenanceOrderOperation
MasterLanguage
ReportedByUser qmel qmnam
CreatedByUser qmel ernam
CreationDate qmel erdat
CreationTime qmel erzeit
LastChangedByUser qmel aenam
LastChangeDate qmel aedat
LastChangeTime qmel aezeit
LastChangeDateTime qmel changeddatetime
@AbapCatalog.viewEnhancementCategory: [ #NONE ]

@AccessControl.authorizationCheck: #NOT_REQUIRED
@AccessControl.personalData.blocking: #NOT_REQUIRED

@EndUserText.label: 'Maintenance Notification Header Basic'

@Metadata.ignorePropagatedAnnotations: true

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

@VDM.viewType: #BASIC

define view entity I_MaintenanceNotificationBasic
  as select from   qmel as Notification 
   
    left outer to one join qmih as MaintNotif on Notification.qmnum = MaintNotif.qmnum

{
      // ** Key Fields - Notification Number

  key MaintNotif.qmnum                                                                              as MaintenanceNotification,

      // ** General Data

      Notification.qmart                                                                            as NotificationType,
      Notification.qmtxt                                                                            as NotificationText,
      Notification.aufnr                                                                            as MaintenanceOrder,
      MaintNotif.maintnotifprocessingcontext                                                        as MaintNotifProcessingContext,
      MaintNotif.notifrejectionreasoncode                                                           as MaintNotifRejectionReasonCode,

      // ** Priority

      Notification.artpr                                                                            as MaintPriorityType,
      Notification.priok                                                                            as MaintPriority,
      MaintNotif.lacd_date                                                                          as LatestAcceptableCompletionDate,
      MaintNotif.old_lacd_date                                                                      as PreviousFinalDueDate,


      // ** Catalog Profile

      Notification.rbnr                                                                             as CatalogProfile,
      Notification.rbnri                                                                            as CatalogProfileOriginCode,

      // ** Equipment, Func Location and Location

      MaintNotif.equnr                                                                              as Equipment,
      MaintNotif.iloan                                                                              as MaintObjectLocAcctAssgmtNmbr,
      MaintNotif.loc_desc                                                                           as LocationDescription,

      // ** Required Start & End Date and Time

      Notification.strmn                                                                            as RequiredStartDate,
      Notification.strur                                                                            as RequiredStartTime,
      Notification.ltrmn                                                                            as RequiredEndDate,
      Notification.ltrur                                                                            as RequiredEndTime,

      // ** Creation, Completion and Reference Date and Time

      Notification.qmdat                                                                            as NotificationCreationDate,
      Notification.mzeit                                                                            as NotificationCreationTime,
      Notification.bezdt                                                                            as NotificationReferenceDate,
      Notification.bezur                                                                            as NotificationReferenceTime,
      Notification.qmdab                                                                            as NotificationCompletionDate,
      Notification.qmzab                                                                            as NotificationCompletionTime,

      // ** Malfunction Data

      MaintNotif.ausvn                                                                              as MalfunctionStartDate,
      MaintNotif.auztv                                                                              as MalfunctionStartTime,
      MaintNotif.ausbs                                                                              as MalfunctionEndDate,
      MaintNotif.auztb                                                                              as MalfunctionEndTime,
      Notification.qmkat                                                                            as MaintNotificationCatalog,
      Notification.qmgrp                                                                            as MaintNotificationCodeGroup,
      Notification.qmcod                                                                            as MaintNotificationCode,
      MaintNotif.msaus                                                                              as MaintenanceObjectIsDown,
      MaintNotif.auszt                                                                              as MaintObjectDowntimeDuration, // Check (Always in Seconds)


      cast(round(unit_conversion(quantity       => MaintNotif.auszt,
                                 source_unit    => cast('S' as maueh),
                                 target_unit    => MaintNotif.maueh,
                                 error_handling => 'SET_TO_NULL'), 2) as auszt)                     as MaintNotifDowntimeDuration, // Needed at what level ?


      MaintNotif.maueh                                                                              as MaintObjDowntimeDurationUnit, // Check (Display Unit)


      // ** Detection Method and Effect

      MaintNotif.detectioncatalog                                                                   as MaintNotifDetectionCatalog,
      MaintNotif.detectioncodegroup                                                                 as MaintNotifDetectionCodeGroup,
      MaintNotif.detectioncode                                                                      as MaintNotifDetectionCode,
      MaintNotif.auswk                                                                              as MalfunctionEffect,

      // ** Text Management

      Notification.objnr                                                                            as MaintNotifInternalID,
      @Semantics.booleanIndicator:true //ATC

      Notification.indtx                                                                            as NotificationHasLongText,

      // ** Timezone

      Notification.tzonso                                                                           as NotificationTimeZone,
      Notification.tzonid                                                                           as NotificationTimeZoneOrigin,

      // ** Maintenance Plan and Item related fields

      MaintNotif.warpl                                                                              as MaintenancePlan,
      MaintNotif.wapos                                                                              as MaintenanceItem,
      MaintNotif.abnum                                                                              as MaintenancePlanCallNumber,
      MaintNotif.plnty                                                                              as MaintenanceTaskListType,
      MaintNotif.plnnr                                                                              as TaskListGroup,
      MaintNotif.plnal                                                                              as TaskListGroupCounter,
      MaintNotif.ilart                                                                              as MaintenanceActivityType,

      // ** Status Management

      Notification.phase                                                                            as NotifProcessingPhase,
      MaintNotif.maintnotifovrlprocphase                                                            as MaintNotifProcessPhaseCode,
      MaintNotif.maintnotifovrlprocsubphase                                                         as MaintNotifProcessSubPhaseCode,

      // Deletion Flag

      @Semantics.booleanIndicator
      cast(case when Notification.phase = '5' or Notification.kzloesch = 'X'
      then 'X'  else ''  end
      as eam_is_deleted preserving type)                                                            as IsDeleted,

      // Completion Flag

      @Semantics.booleanIndicator
      cast(case when Notification.phase = '4' then 'X'
      else ''  end
      as eam_is_completed preserving type)                                                          as IsCompleted,

      // ** Work Center and Planner Group

      Notification.arbpl                                                                            as WorkCenterInternalID,
      Notification.arbplwerk                                                                        as MainWorkCenterPlant,
      Notification.crobjty                                                                          as MainWorkCenterTypeCode,
      MaintNotif.ingrp                                                                              as MaintenancePlannerGroup,
      MaintNotif.iwerk                                                                              as MaintenancePlanningPlant,
      MaintNotif.notificationpersonresponsible                                                      as NotificationPersonResponsible,

      // ** Reference Maintenance Order and Operation

      MaintNotif.referencemaintenanceorder                                                          as ReferenceMaintenanceOrder,
      cast( MaintNotif.refmaintenanceorderoperation  as maintenanceorderoperation preserving type ) as RefMaintenanceOrderOperation,

      // ** Language

      cast( Notification.kzmla as vdm_j_masterlanguage )                                            as MasterLanguage,

      // ** Administrative Details

      Notification.qmnam                                                                            as ReportedByUser,
      Notification.ernam                                                                            as CreatedByUser,
      Notification.erdat                                                                            as CreationDate,
      Notification.erzeit                                                                           as CreationTime,
      Notification.aenam                                                                            as LastChangedByUser,
      Notification.aedat                                                                            as LastChangeDate,
      Notification.aezeit                                                                           as LastChangeTime,

      Notification.changeddatetime                                                                  as LastChangeDateTime
}

where

  // ** Only PM relevant Notifications

  (
       Notification.herkz = '01' // General Maintenance Notification

    or Notification.herkz = '02' // Malfunction Report

    or Notification.herkz = '03' // Activity Report

  )