@VDM.private: true
@VDM.viewType: #COMPOSITE
@AbapCatalog.sqlViewName: 'PMTJOBWKITM'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel: {
usageType.serviceQuality: #D,
usageType.sizeCategory: #XL,
usageType.dataClass: #TRANSACTIONAL
}
/*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] } */
define view P_MaintenanceJobAndWorkItem
as select from I_MaintenanceNotification
association [0..1] to I_PersonWorkAgreement_1 as _WorkAgreement on $projection.PersonResponsible = _WorkAgreement.PersonWorkAgreement
association [0..1] to I_EAMObjectUsrStatusWithNumber as _ObjectUserStatusWithNumber on _ObjectUserStatusWithNumber.StatusObject = $projection.StatusObject
-- For DCL:
association [0..1] to I_MaintenanceNotification as _MaintenanceNotification on _MaintenanceNotification.MaintenanceNotification = I_MaintenanceNotification.MaintenanceNotification
association [0..1] to I_MaintenanceOrder as _MaintenanceOrder on _MaintenanceOrder.MaintenanceOrder = I_MaintenanceNotification.MaintenanceOrder
{
key I_MaintenanceNotification.MaintNotifInternalID as MaintenanceJobInternalID,
key I_MaintenanceNotification.MaintNotifInternalID as StatusObject,
key cast( 'QMI' as j_obtyp ) as ObjectType,
I_MaintenanceNotification._PMNotifMaintenanceData.NotificationPersonResponsible as PersonResponsible,
-- Required for DCL associations
I_MaintenanceNotification.MaintenanceNotification,
I_MaintenanceNotification.MaintenanceOrder,
_WorkAgreement,
-- For DCL:
_MaintenanceNotification,
_MaintenanceOrder,
_ObjectUserStatusWithNumber
}
where
I_MaintenanceNotification.NotifProcessingPhase <> '4' //Completed
and I_MaintenanceNotification.NotifProcessingPhase <> '5' //Deletion Flag
union all
select from I_MaintenanceOrder
association [1..1] to I_MaintenanceOrder as _ReferenceDocument on _ReferenceDocument.MaintenanceOrderInternalID = $projection.StatusObject
association [0..1] to I_EAMObjectUsrStatusWithNumber as _ObjectUserStatusWithNumber on _ObjectUserStatusWithNumber.StatusObject = $projection.StatusObject
association [0..1] to I_PersonWorkAgreement_1 as _WorkAgreement on $projection.PersonResponsible = _WorkAgreement.PersonWorkAgreement
-- For DCL:
association [0..1] to I_MaintenanceNotification as _MaintenanceNotification on _MaintenanceNotification.MaintenanceNotification = I_MaintenanceOrder.MaintenanceNotification
association [0..1] to I_MaintenanceOrder as _MaintenanceOrder on _MaintenanceOrder.MaintenanceOrder = I_MaintenanceOrder.MaintenanceOrder
{
key I_MaintenanceOrder._MaintenanceNotification.MaintNotifInternalID as MaintenanceJobInternalID,
key I_MaintenanceOrder.MaintenanceOrderInternalID as StatusObject,
key cast( 'ORI' as j_obtyp ) as ObjectType,
I_MaintenanceOrder.MaintOrdPersonResponsible as PersonResponsible,
-- Required for DCL associations
I_MaintenanceOrder.MaintenanceNotification,
I_MaintenanceOrder.MaintenanceOrder,
_WorkAgreement,
-- For DCL:
_MaintenanceNotification,
_MaintenanceOrder,
_ObjectUserStatusWithNumber
}
where
I_MaintenanceOrder.MaintenanceNotification <> ''
and I_MaintenanceOrder._MaintenanceNotification.NotifProcessingPhase <> '4' //Completed
and I_MaintenanceOrder._MaintenanceNotification.NotifProcessingPhase <> '5' //Deletion Flag
union all
select from I_MaintenanceOrder
association [1..1] to I_MaintenanceOrder as _ReferenceDocument on _ReferenceDocument.MaintenanceOrderInternalID = $projection.StatusObject
association [0..1] to I_EAMObjectUsrStatusWithNumber as _ObjectUserStatusWithNumber on _ObjectUserStatusWithNumber.StatusObject = $projection.StatusObject
association [0..1] to I_PersonWorkAgreement_1 as _WorkAgreement on $projection.PersonResponsible = _WorkAgreement.PersonWorkAgreement
-- For DCL:
association [0..1] to I_MaintenanceNotification as _MaintenanceNotification on _MaintenanceNotification.MaintenanceNotification = I_MaintenanceOrder.MaintenanceNotification
association [0..1] to I_MaintenanceOrder as _MaintenanceOrder on _MaintenanceOrder.MaintenanceOrder = I_MaintenanceOrder.MaintenanceOrder
{
key I_MaintenanceOrder.MaintenanceOrderInternalID as MaintenanceJobInternalID,
key I_MaintenanceOrder.MaintenanceOrderInternalID as StatusObject,
key cast( 'ORI' as j_obtyp ) as ObjectType,
I_MaintenanceOrder.MaintOrdPersonResponsible as PersonResponsible,
-- Required for DCL associations
I_MaintenanceOrder.MaintenanceNotification,
I_MaintenanceOrder.MaintenanceOrder,
_WorkAgreement,
-- For DCL:
_MaintenanceNotification,
_MaintenanceOrder,
_ObjectUserStatusWithNumber
}
where
I_MaintenanceOrder.MaintenanceNotification = ''
and _MaintenanceNotification.NotifProcessingPhase <> '4' //Completed
and _MaintenanceNotification.NotifProcessingPhase <> '5' //Deletion Flag
union all
select from I_MaintenanceOrder
left outer join I_MaintenanceOrderOperation on I_MaintenanceOrder.MaintenanceOrder = I_MaintenanceOrderOperation.MaintenanceOrder
association [0..1] to I_EAMObjectUsrStatusWithNumber as _ObjectUserStatusWithNumber on _ObjectUserStatusWithNumber.StatusObject = $projection.StatusObject
association [0..1] to I_PersonWorkAgreement_1 as _WorkAgreement on $projection.PersonResponsible = _WorkAgreement.PersonWorkAgreement
-- For DCL:
association [0..1] to I_MaintenanceNotification as _MaintenanceNotification on _MaintenanceNotification.MaintenanceNotification = I_MaintenanceOrder.MaintenanceNotification
association [0..1] to I_MaintenanceOrder as _MaintenanceOrder on _MaintenanceOrder.MaintenanceOrder = I_MaintenanceOrder.MaintenanceOrder
{
key I_MaintenanceOrder.MaintenanceOrderInternalID as MaintenanceJobInternalID,
key I_MaintenanceOrderOperation.MaintOrderOperationInternalID as StatusObject,
key cast( 'OVG' as j_obtyp ) as ObjectType,
I_MaintenanceOrderOperation.OperationPersonResponsible as PersonResponsible,
-- Required for DCL associations
I_MaintenanceOrder.MaintenanceNotification,
I_MaintenanceOrder.MaintenanceOrder,
_WorkAgreement,
-- For DCL:
_MaintenanceNotification,
_MaintenanceOrder,
_ObjectUserStatusWithNumber
}
where
I_MaintenanceOrder.MaintenanceNotification = ''
and I_MaintenanceOrderOperation._StatusObjectActiveStatus [1: StatusCode = 'I0013'].StatusObject is null
and _MaintenanceNotification.NotifProcessingPhase <> '4' //Completed
and _MaintenanceNotification.NotifProcessingPhase <> '5' //Deletion Flag
union all
select from I_MaintenanceNotification
left outer join I_MaintenanceOrderOperation on I_MaintenanceNotification.MaintenanceOrder = I_MaintenanceOrderOperation.MaintenanceOrder
association [0..1] to I_EAMObjectUsrStatusWithNumber as _ObjectUserStatusWithNumber on _ObjectUserStatusWithNumber.StatusObject = $projection.StatusObject
association [0..1] to I_PersonWorkAgreement_1 as _WorkAgreement on $projection.PersonResponsible = _WorkAgreement.PersonWorkAgreement
-- For DCL:
association [0..1] to I_MaintenanceNotification as _MaintenanceNotification on _MaintenanceNotification.MaintenanceNotification = I_MaintenanceNotification.MaintenanceNotification
association [0..1] to I_MaintenanceOrder as _MaintenanceOrder on _MaintenanceOrder.MaintenanceOrder = I_MaintenanceNotification.MaintenanceOrder
{
key I_MaintenanceNotification.MaintNotifInternalID as MaintenanceJobInternalID,
key I_MaintenanceOrderOperation.MaintOrderOperationInternalID as StatusObject,
key cast( 'OVG' as j_obtyp ) as ObjectType,
I_MaintenanceOrderOperation.OperationPersonResponsible as PersonResponsible,
-- Required for DCL associations
I_MaintenanceNotification.MaintenanceNotification,
I_MaintenanceNotification.MaintenanceOrder,
_WorkAgreement,
-- For DCL:
_MaintenanceNotification,
_MaintenanceOrder,
_ObjectUserStatusWithNumber
}
where
I_MaintenanceNotification.MaintenanceOrder <> ''
and I_MaintenanceOrderOperation._StatusObjectActiveStatus [1: StatusCode = 'I0013'].StatusObject is null
and I_MaintenanceNotification.NotifProcessingPhase <> '4' //Completed
and I_MaintenanceNotification.NotifProcessingPhase <> '5' //Deletion Flag
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_MAINTENANCENOTIFICATION",
"I_MAINTENANCEORDER",
"I_MAINTENANCEORDEROPERATION",
"I_PMNOTIFMAINTENANCEDATA",
"I_STATUSOBJECTACTIVESTATUS"
],
"ASSOCIATED":
[
"I_EAMOBJECTUSRSTATUSWITHNUMBER",
"I_MAINTENANCENOTIFICATION",
"I_MAINTENANCEORDER",
"I_PERSONWORKAGREEMENT_1"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/