I_MaintOrdOpNotification

DDL: I_MAINTORDOPNOTIFICATION Type: view_entity COMPOSITE

Maintenance Order operation notifications

I_MaintOrdOpNotification is a Composite CDS View that provides data about "Maintenance Order operation notifications" in SAP S/4HANA. It reads from 2 data sources (I_MaintOrderTechObj, I_MaintOrderOperAndSubOper) and exposes 14 fields with key fields MaintenanceOrder, MaintenanceOrderOperation, MaintenanceOrderSubOperation. It has 2 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_MaintOrderTechObj _Order inner
I_MaintOrderOperAndSubOper OrderOpSubOp from

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_MaintNotificationTechObj _MaintNotifTechObj $projection.MaintenanceNotification = _MaintNotifTechObj.MaintenanceNotification
[0..1] I_MaintenanceNotification _MaintenanceNotification $projection.MaintenanceNotification = _MaintenanceNotification.MaintenanceNotification

Annotations (7)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
VDM.viewType #COMPOSITE view
EndUserText.label Maintenance Order operation notifications view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view

Fields (14)

KeyFieldSource TableSource FieldDescription
KEY MaintenanceOrder I_MaintOrderOperAndSubOper MaintenanceOrder
KEY MaintenanceOrderOperation I_MaintOrderOperAndSubOper MaintenanceOrderOperation
KEY MaintenanceOrderSubOperation
MaintenanceOrderObjectList I_MaintOrderTechObj MaintenanceOrderObjectList
MaintenanceOrderObjectListItem
MaintNotifTechObjIsDefault _ObjList1 MaintNotifTechObjIsDefault
MaintOrdOpHasNotifAssigned
_MaintNotifTechObj _MaintNotifTechObj
_MaintenanceNotification _MaintenanceNotification
OperationSupplier I_MaintOrderOperAndSubOper OperationSupplier
_Supplier I_MaintOrderOperAndSubOper _Supplier
OperationPersonResponsible I_MaintOrderOperAndSubOper OperationPersonResponsible
_PersonResponsible I_MaintOrderOperAndSubOper _PersonResponsible
_MaintenanceOrder I_MaintOrderOperAndSubOper _MaintenanceOrder
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #MANDATORY
@VDM.viewType: #COMPOSITE
@EndUserText.label: 'Maintenance Order operation notifications'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
  serviceQuality: #X,
  sizeCategory: #XL,
  dataClass: #MIXED
}
define view entity I_MaintOrdOpNotification
  as select from I_MaintOrderOperAndSubOper as OrderOpSubOp
  inner join  I_MaintOrderTechObj as _Order on _Order.MaintenanceOrder = OrderOpSubOp.MaintenanceOrder
  left outer to one join I_MaintOrdObjListDfltNotif as _ObjList1 on _Order.MaintenanceOrderObjectList = _ObjList1.MaintenanceOrderObjectList
                                                             and ( ( _ObjList1.TechnicalObject = OrderOpSubOp.Equipment and OrderOpSubOp.Equipment <> '' ) or
                                                                 ( _ObjList1.TechnicalObject = OrderOpSubOp.FunctionalLocation and OrderOpSubOp.Equipment = '' and OrderOpSubOp.FunctionalLocation <> '' ) or
                                                                 ( _ObjList1.TechnicalObject = '' and OrderOpSubOp.FunctionalLocation = '' and OrderOpSubOp.Equipment = '') )
  left outer to one join I_MaintenanceOrderObjectList as _ObjList on _ObjList.MaintenanceOrderObjectList = _ObjList1.MaintenanceOrderObjectList and
                                                             _ObjList.MaintenanceOrderObjectListItem = _ObjList1.MaintenanceOrderObjectListItem
  association [0..1] to I_MaintNotificationTechObj as _MaintNotifTechObj on $projection.MaintenanceNotification = _MaintNotifTechObj.MaintenanceNotification
  association [0..1] to I_MaintenanceNotification     as _MaintenanceNotification    on  $projection.MaintenanceNotification = _MaintenanceNotification.MaintenanceNotification
{
  key OrderOpSubOp.MaintenanceOrder,
  key OrderOpSubOp.MaintenanceOrderOperation,
  key cast ( OrderOpSubOp.MaintenanceOrderSubOperation as maintenanceordersuboperation preserving type ) as  MaintenanceOrderSubOperation,
  cast( case when OrderOpSubOp.Equipment <> '' then OrderOpSubOp.Equipment
       when OrderOpSubOp.FunctionalLocation <> '' then OrderOpSubOp.FunctionalLocation
       else '' end as eams_tec_obj )as TechnicalObject ,
  _Order.MaintenanceOrderObjectList,
  OrderOpSubOp._MaintOrderOperObjectListLink._MaintenanceObjectListItem.MaintenanceObjectListItem as MaintenanceOrderObjectListItem,
//  _ObjList1.MaintenanceOrderObjectListItem,

  @Semantics.booleanIndicator: true
  _ObjList1.MaintNotifTechObjIsDefault,
    case when OrderOpSubOp._MaintOrderOperObjectListLink._MaintenanceObjectListItem.MaintenanceNotification is not null //and

//              OrderOpSubOp._MaintOrderOperObjectListLink.MaintOrderRoutingNumber is not null

    then OrderOpSubOp._MaintOrderOperObjectListLink._MaintenanceObjectListItem.MaintenanceNotification
    //the below condition is commented since create notification functionality is reverted and header notification will be just displayed now

//    when ( _Order.TechnicalObject = $projection.TechnicalObject or $projection.TechnicalObject = '' ) and _Order.MaintenanceNotification <> ''

    when _Order.MaintenanceNotification <> ''
    then _Order.MaintenanceNotification
//    when OrderOpSubOp._MaintOrderOperObjectListLink._MaintenanceObjectListItem.MaintenanceNotification is null then

//    _ObjList.MaintenanceNotification

    else '' end as MaintenanceNotification,
    @Semantics.booleanIndicator: true
    case when OrderOpSubOp._MaintOrderOperObjectListLink._MaintenanceObjectListItem.MaintenanceNotification <> '' then 'X' else '' end as MaintOrdOpHasNotifAssigned,
    _MaintNotifTechObj,
    _MaintenanceNotification,
    OrderOpSubOp.OperationSupplier,
    OrderOpSubOp._Supplier,
    OrderOpSubOp.OperationPersonResponsible,
    OrderOpSubOp._PersonResponsible,
    OrderOpSubOp._MaintenanceOrder
} where
(
       OrderOpSubOp.MaintOrdOpProcessPhaseCode                                 = '07' //Execution

    or OrderOpSubOp.MaintOrdOpProcessPhaseCode                                 = '08' //Post Execution

    or OrderOpSubOp.MaintOrdOpProcessPhaseCode                                 = ''
  )
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_MAINTENANCEOBJECTLISTITEM",
"I_MAINTENANCEORDEROBJECTLIST",
"I_MAINTORDEROPERANDSUBOPER",
"I_MAINTORDEROPEROBJECTLISTLINK",
"I_MAINTORDERTECHOBJ",
"I_MAINTORDOBJLISTDFLTNOTIF"
],
"ASSOCIATED":
[
"I_MAINTENANCENOTIFICATION",
"I_MAINTENANCEORDER",
"I_MAINTNOTIFICATIONTECHOBJ",
"I_SUPPLIER",
"I_WORKFORCEPERSON"
],
"BASE":
[
"I_MAINTORDEROPERANDSUBOPER"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/