P_MaintenanceJobAndWorkItem

DDL: P_MAINTENANCEJOBANDWORKITEM SQL: PMTJOBWKITM Type: view COMPOSITE

P_MaintenanceJobAndWorkItem is a Composite CDS View in SAP S/4HANA. It reads from 7 data sources and exposes 42 fields with key fields MaintenanceJobInternalID, StatusObject, ObjectType, StatusObject, ObjectType. It has 5 associations to related views.

Data Sources (7)

SourceAliasJoin Type
I_MaintenanceNotification I_MaintenanceNotification from
I_MaintenanceNotification I_MaintenanceNotification union_all
I_MaintenanceOrder I_MaintenanceOrder union_all
I_MaintenanceOrder I_MaintenanceOrder union_all
I_MaintenanceOrder I_MaintenanceOrder union_all
I_MaintenanceOrderOperation I_MaintenanceOrderOperation left_outer
I_MaintenanceOrderOperation I_MaintenanceOrderOperation left_outer

Associations (5)

CardinalityTargetAliasCondition
[0..1] I_PersonWorkAgreement_1 _WorkAgreement $projection.PersonResponsible = _WorkAgreement.PersonWorkAgreement
[0..1] I_EAMObjectUsrStatusWithNumber _ObjectUserStatusWithNumber _ObjectUserStatusWithNumber.StatusObject = $projection.StatusObject -- For DCL:
[0..1] I_MaintenanceNotification _MaintenanceNotification _MaintenanceNotification.MaintenanceNotification = I_MaintenanceNotification.MaintenanceNotification
[0..1] I_MaintenanceOrder _MaintenanceOrder _MaintenanceOrder.MaintenanceOrder = I_MaintenanceNotification.MaintenanceOrder
[1..1] I_MaintenanceOrder _ReferenceDocument _ReferenceDocument.MaintenanceOrderInternalID = $projection.StatusObject

Annotations (9)

NameValueLevelField
VDM.private true view
VDM.viewType #COMPOSITE view
AbapCatalog.sqlViewName PMTJOBWKITM view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view

Fields (42)

KeyFieldSource TableSource FieldDescription
KEY MaintenanceJobInternalID I_MaintenanceNotification MaintNotifInternalID
KEY StatusObject I_MaintenanceNotification MaintNotifInternalID
KEY ObjectType
PersonResponsible
MaintenanceNotification
MaintenanceOrder I_MaintenanceNotification MaintenanceOrder
_WorkAgreement _WorkAgreement
ForDCL_MaintenanceNotification
_MaintenanceOrder _MaintenanceOrder
KEY StatusObject I_MaintenanceOrder MaintenanceOrderInternalID
KEY ObjectType
PersonResponsible I_MaintenanceOrder MaintOrdPersonResponsible
MaintenanceNotification
MaintenanceOrder I_MaintenanceOrder MaintenanceOrder
_WorkAgreement _WorkAgreement
ForDCL_MaintenanceNotification
_MaintenanceOrder _MaintenanceOrder
KEY StatusObject I_MaintenanceOrder MaintenanceOrderInternalID
KEY ObjectType
PersonResponsible I_MaintenanceOrder MaintOrdPersonResponsible
MaintenanceNotification
MaintenanceOrder I_MaintenanceOrder MaintenanceOrder
_WorkAgreement _WorkAgreement
ForDCL_MaintenanceNotification
_MaintenanceOrder _MaintenanceOrder
KEY StatusObject I_MaintenanceOrderOperation MaintOrderOperationInternalID
KEY ObjectType
PersonResponsible I_MaintenanceOrderOperation OperationPersonResponsible
MaintenanceNotification
MaintenanceOrder I_MaintenanceOrder MaintenanceOrder
_WorkAgreement _WorkAgreement
ForDCL_MaintenanceNotification
_MaintenanceOrder _MaintenanceOrder
KEY StatusObject I_MaintenanceOrderOperation MaintOrderOperationInternalID
KEY ObjectType
PersonResponsible I_MaintenanceOrderOperation OperationPersonResponsible
MaintenanceNotification
MaintenanceOrder I_MaintenanceNotification MaintenanceOrder
_WorkAgreement _WorkAgreement
ForDCL_MaintenanceNotification
_MaintenanceOrder _MaintenanceOrder
_ObjectUserStatusWithNumber _ObjectUserStatusWithNumber
@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":""
}
}*/