C_ObjPgMaintOrder

DDL: C_OBJPGMAINTORDER SQL: COBJPGMAINTORD Type: view CONSUMPTION

Maintenance Order

C_ObjPgMaintOrder is a Consumption CDS View that provides data about "Maintenance Order" in SAP S/4HANA. It reads from 1 data source (I_MaintOrderTP) and exposes 24 fields with key field MaintenanceOrder. It has 61 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_MaintOrderTP _MaintenanceOrder from

Associations (61)

CardinalityTargetAliasCondition
[0..*] C_MaintOrdChgHistory _MaintOrdChgHistory $projection.MaintOrderWithLeadingZeros = _MaintOrdChgHistory.ChangeDocObject
[0..*] I_TechObjIsEquipOrFuncnlLocT _TechObjIsEquipOrFuncnlLocT _TechObjIsEquipOrFuncnlLocT.TechObjIsEquipOrFuncnlLoc = $projection.TechObjIsEquipOrFuncnlLoc
[0..*] I_OrderTypeText _OrderTypeText _OrderTypeText.OrderType = $projection.MaintenanceOrderType
[0..*] I_ProductText _AssemblyText _AssemblyText.Product = $projection.Assembly
[0..*] I_ProductText _MaterialText _MaterialText.Product = $projection.Material
[0..1] I_EquipmentText _EquipmentText _EquipmentText.Equipment = $projection.Equipment and _EquipmentText.Language = $session.system_language
[0..1] I_FunctionalLocationText _FunctionalLocationText _FunctionalLocationText.FunctionalLocation = $projection.FunctionalLocation and _FunctionalLocationText.Language = $session.system_language
[0..*] I_ProductionResourceText _MainWorkCenterText _MainWorkCenterText.ProductionResourceType = 'A' and _MainWorkCenterText.ProductionResourceInternalID = $projection.WorkCenterInternalID
[0..*] I_GenericPriorityText _PriorityText _PriorityText.GenericPriorityType = $projection.MaintPriorityType and _PriorityText.PriorityCode = $projection.MaintPriority
[0..*] I_CostCenterText _ResponsibleCostCenterText _ResponsibleCostCenterText.ControllingArea = $projection.ControllingArea and _ResponsibleCostCenterText.CostCenter = $projection.ResponsibleCostCenter and _ResponsibleCostCenterText.ValidityEndDate = '99991231'
[0..*] I_CostCenterText _CostCenterText _CostCenterText.ControllingArea = $projection.ControllingArea and _CostCenterText.CostCenter = $projection.LocAcctAssgmtCostCenter and _CostCenterText.ValidityEndDate = '99991231'
[0..*] I_ProfitCenterText _ProfitCenterText _ProfitCenterText.ControllingArea = $projection.ControllingArea and _ProfitCenterText.ProfitCenter = $projection.ProfitCenter and _ProfitCenterText.ValidityEndDate = '99991231'
[0..1] I_FunctionalLocationLabel _FunctionalLocationLabel _FunctionalLocationLabel.FunctionalLocation = $projection.FunctionalLocation
[0..1] I_MaintPlanningBucketTP _MaintPlanningBucket _MaintPlanningBucket.MaintOrderForAdministration = $projection.MaintenanceOrder
[0..1] I_MaintenanceItemBasic _MaintenanceItem _MaintenanceItem.MaintenanceItem = $projection.MaintenanceItem
[1..1] C_ObjPgMaintOrderWthDesc _MaintOrderWthDesc _MaintOrderWthDesc.MaintenanceOrder = $projection.MaintenanceOrder
[0..*] C_ObjPgMaintOrderCost _MaintOrderCost _MaintOrderCost.MaintenanceOrderInternalID = $projection.MaintenanceOrderInternalID
[1..1] C_ObjPgMaintOrderCostAggrgData _MaintOrderCostAggrg _MaintOrderCostAggrg.MaintenanceOrderInternalID = $projection.MaintenanceOrderInternalID
[0..*] C_ObjPgMaintOrderOperation _MaintOrderOperation _MaintOrderOperation.MaintenanceOrder = $projection.MaintenanceOrder
[0..1] C_MaintOrderTypeVH _MaintOrderTypeVH _MaintOrderTypeVH.MaintenanceOrderType = $projection.MaintenanceOrderType
[0..1] C_MaintenanceOrderPhaseVH _MaintOrderPhaseVH _MaintOrderPhaseVH.MaintenanceProcessingPhase = $projection.MaintenanceProcessingPhase
[0..1] C_TechnicalObjectLabelVH _TechnicalObjectLabelVH _TechnicalObjectLabelVH.TechnicalObjectLabel = $projection.TechnicalObjectLabel and _TechnicalObjectLabelVH.TechObjIsEquipOrFuncnlLoc = $projection.TechObjIsEquipOrFuncnlLoc and _TechnicalObjectLabelVH.TechnicalObject = $projection.TechnicalObject -- --
[0..1] C_OverdueMaintenanceOrderQ _OverdueMaintenanceOrderQ _OverdueMaintenanceOrderQ.MaintenanceOrder = $projection.MaintenanceOrder
[0..1] I_PMContactCardEmployee _PersonResponsible $projection.MaintOrdPersonResponsible = _PersonResponsible.PersonnelNumber
[0..1] I_PersonWorkAgreement_1 _MaintOrdPersonResponsible _MaintOrdPersonResponsible.PersonWorkAgreement = $projection.MaintOrdPersonResponsible_H
[0..1] P_MaintOrdNmbrOfReservations _MaintOrdNmbrOfReservations $projection.MaintenanceOrder = _MaintOrdNmbrOfReservations.MaintenanceOrder
[0..1] I_Indicator _MaintOrderHasOpenReservations $projection.MaintOrderHasOpenReservations = _MaintOrderHasOpenReservations.IndicatorValue
[0..1] P_MaintOrdNmbrOfOpenPO _MaintOrdNmbrOfOpenPO $projection.MaintenanceOrder = _MaintOrdNmbrOfOpenPO.MaintenanceOrder
[0..1] I_Indicator _MaintOrdHasOpenPurchaseOrders $projection.MaintOrdHasOpenPurchaseOrders = _MaintOrdHasOpenPurchaseOrders.IndicatorValue
[0..1] P_MaintOrdNmbrOfOpenServices _MaintOrdNmbrOfOpenServices $projection.MaintenanceOrder = _MaintOrdNmbrOfOpenServices.MaintenanceOrder
[0..1] I_Indicator _MaintOrdHasOpenServices $projection.MaintOrdHasOpenServices = _MaintOrdHasOpenServices.IndicatorValue --
[0..1] I_EAMUserDefaultValues _EAMUserDefaultValues _EAMUserDefaultValues.UserID = $session.user
[0..1] I_PMContactCardUser _CreatedByUser $projection.CreatedByUser = _CreatedByUser.UserID
[0..1] C_PMAssetLocationVH _AssetLocationVH _AssetLocationVH.Location = $projection.assetlocation and _AssetLocationVH.Plant = $projection.maintenanceplant
[0..1] C_MaintNotificationQuickVw _MaintNotificationQuickView $projection.MaintenanceNotification = _MaintNotificationQuickView.MaintenanceNotification
[0..1] C_TechObjQuickVw _TechnicalObjQuickVw _TechnicalObjQuickVw.TechnicalObject = $projection.TechnicalObject and _TechnicalObjQuickVw.TechObjIsEquipOrFuncnlLoc = $projection.TechObjIsEquipOrFuncnlLoc --and _TechnicalObjQuickVw.TechnicalObjectLabel = $projection.technicalobjectlabel
[0..1] C_MaintenancePlanQuickVw _MaintenancePlanQuickVw _MaintenancePlanQuickVw.MaintenancePlan = $projection.MaintenancePlan
[0..1] C_MaintTaskListQuickVw _MaintTaskListQuickVw _MaintTaskListQuickVw.TaskList = $projection.TaskList and _MaintTaskListQuickVw.TaskListType = $projection.TaskListType and _MaintTaskListQuickVw.TaskListGroup = $projection.TaskListGroup and _MaintTaskListQuickVw.TaskListGroupCounter = $projection.TaskListGroupCounter
[0..1] P_MaintOrdUsrStsWithSqncNmbr _ActiveUserStatusWthStsNmbr _ActiveUserStatusWthStsNmbr.StatusObject = $projection.MaintenanceOrderInternalID
[0..*] C_StsObjActiveStatusCodeText _ActiveSystemStatus _ActiveSystemStatus.StatusObject = $projection.MaintenanceOrderInternalID and _ActiveSystemStatus.IsUserStatus = ''
[0..*] C_StsObjActiveStatusCodeText _ActiveUserStatus _ActiveUserStatus.StatusObject = $projection.MaintenanceOrderInternalID and _ActiveUserStatus.IsUserStatus = 'X'
[0..1] I_StatusProfile _StatusProfile _StatusProfile.StatusProfile = $projection.StatusProfile
[0..1] C_MaintPrioSmltdDates _MaintPrioSmltdDates _MaintPrioSmltdDates.MaintPriority = $projection.MaintPriority and _MaintPrioSmltdDates.MaintPriorityType = $projection.MaintPriorityType
[0..1] I_MaintSchedulingParameters _SchedulingParameters _SchedulingParameters.MaintenanceOrderType = $projection.MaintenanceOrderType and _SchedulingParameters.Plant = $projection.MaintenancePlanningPlant
[0..*] C_MaintenanceObjectStatus _SystemStatus _SystemStatus.StatusObject = $projection.MaintenanceOrderInternalID and _SystemStatus.IsUserStatus = ' '
[0..*] C_MaintenanceObjectStatus _UserStatusWthoutStsNmbr _UserStatusWthoutStsNmbr.StatusObject = $projection.MaintenanceOrderInternalID and _UserStatusWthoutStsNmbr.StatusSequenceNumber = '00' and _UserStatusWthoutStsNmbr.IsUserStatus = 'X'
[0..1] C_MaintObjUserStatusWthStsNmbr _UserStatusWithStatusNumber _UserStatusWithStatusNumber.StatusObject = $projection.MaintenanceOrderInternalID and _UserStatusWithStatusNumber.StatusSequenceNumber != '00' and _UserStatusWithStatusNumber.IsUserStatus = 'X'
[0..1] C_EAMProductQuickVw _EAMProductQuickVw _EAMProductQuickVw.Material = $projection.Assembly
[0..1] I_Indicator _HasOpenMainWork _HasOpenMainWork.IndicatorValue = $projection.MaintOrdHasOpenMainWork
[0..*] I_MaintenanceObjectStatus _MaintenanceObjectStatus _MaintenanceObjectStatus.StatusObject = $projection.MaintenanceOrderInternalID and _MaintenanceObjectStatus.StatusObject like 'OR%' -- Phase Control codes (display only)
[0..*] C_ObjPgMaintObjPhaseControl _ObjPgMaintObjPhaseControl _ObjPgMaintObjPhaseControl.StatusObject = $projection.MaintenanceOrderInternalID and _ObjPgMaintObjPhaseControl.EAMBlockerCodeEntityType = 'ORI' and _ObjPgMaintObjPhaseControl.MaintenanceOrderType = $projection.MaintenanceOrderType
[0..*] I_EAMProcessPhaseText _EAMOrderProcessPhase _EAMOrderProcessPhase.EAMProcessPhaseCode = $projection.MaintOrdProcessPhaseCode
[0..*] I_EAMProcessSubPhaseText _EAMOrderProcessSubPhase _EAMOrderProcessSubPhase.EAMProcessSubPhaseCode = $projection.MaintOrdProcessSubPhaseCode
[0..1] C_MaintOrdProcessingContextVH _MaintOrderProcessingContextVH _MaintOrderProcessingContextVH.MaintOrderProcessingContext = $projection.MaintOrderProcessingContext
[0..1] I_MaintOrderProcessingContext _MaintOrderProcessingContext _MaintOrderProcessingContext.MaintOrderProcessingContext = $projection.MaintOrderProcessingContext
[0..1] I_MaintPlanningBucketVH _MaintPlanningBucketVH _MaintPlanningBucketVH.MaintPlanningBucketUUID = $projection.MaintPlanningBucketUUID
[0..*] I_FunclocationLabelInternal _FuncnlLocationLabel _FuncnlLocationLabel.FunctionalLocation = $projection.FunctionalLocation
[1..1] I_MaintenanceOrder _MaintOrder _MaintOrder.MaintenanceOrder = $projection.MaintenanceOrder
[0..1] I_MaintenanceRevisionValueHelp _MaintenanceRevisionValueHelp _MaintenanceRevisionValueHelp.MaintenancePlanningPlant = $projection.MaintenancePlanningPlant and _MaintenanceRevisionValueHelp.MaintenanceRevision = $projection.MaintenanceRevision
[0..1] I_PermitToWorkProfile _PermitToWorkProfile _PermitToWorkProfile.MaintenancePlanningPlant = $projection.MaintenancePlanningPlant
[0..*] I_WorkPermitRelevanceText _WorkPermitRelevanceText _WorkPermitRelevanceText.WorkPermitRelevance = $projection.WorkPermitRelevance

Annotations (26)

NameValueLevelField
AbapCatalog.sqlViewName COBJPGMAINTORD view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Maintenance Order view
Metadata.allowExtensions true view
ObjectModel.compositionRoot true view
ObjectModel.createEnabled false view
ObjectModel.deleteEnabled false view
ObjectModel.draftEnabled false view
ObjectModel.representativeKey MaintenanceOrder view
ObjectModel.transactionalProcessingDelegated true view
ObjectModel.updateEnabled false view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XL view
Search.searchable true view
VDM.viewType #CONSUMPTION view
UI.headerInfo.description.value MaintenanceOrderDesc view
UI.headerInfo.description.type #STANDARD view
UI.headerInfo.title.value MaintenanceOrder view
UI.headerInfo.title.type #STANDARD view
UI.headerInfo.typeName Maintenance Order view
UI.headerInfo.typeNamePlural Maintenance Orders view
UI.headerInfo.imageUrl MaintenanceOrderThumbnailURL view

Fields (24)

KeyFieldSource TableSource FieldDescription
KEY MaintenanceOrder I_MaintOrderTP MaintenanceOrder
MaintOrderWithLeadingZeros
MaintenanceOrderDesc I_MaintOrderTP MaintenanceOrderDesc
MaintenanceOrderInternalID I_MaintOrderTP MaintenanceOrderInternalID
MaintenanceOrderType I_MaintOrderTP MaintenanceOrderType
MaintOrderProcessingContext I_MaintOrderTP MaintOrderProcessingContext
OrderTypeNameasMaintenanceOrderTypeName Order Type Text
MaintenanceProcessingPhase I_MaintOrderTP MaintenanceProcessingPhase Order Status
MaintenanceProcessingPhaseDesc
MaintPriority
LatestAcceptableCompletionDate I_MaintOrderTP LatestAcceptableCompletionDate
MaintPriorityColorCode
MaintPriorityDesc Priority Text
MaintenanceNotification I_MaintOrderTP MaintenanceNotification
MaintenanceNotificationText
TaskListGroup I_MaintOrderTP TaskListGroup
TaskListType I_MaintOrderTP TaskListType
TaskListGroupCounter I_MaintOrderTP TaskListGroupCounter
TaskListKeyDate
TaskListGroupCounter0endendasTaskList Task List
TaskListDesc
MaintenancePlan I_MaintOrderTP MaintenancePlan Maintenance Plan
MaintenancePlanDesc
MaintenanceItem I_MaintOrderTP MaintenanceItem
@AbapCatalog.sqlViewName: 'COBJPGMAINTORD'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.privilegedAssociations:  ['_MaintenanceObjectStatus', '_SystemStatus', '_UserStatusWthoutStsNmbr', '_TechnicalObject', '_TechnicalObjQuickVw', '_OrderTypeText',
'_MaintNotificationQuickView','_MaintenancePlanQuickVw' , '_MaintTaskListQuickVw', '_SchedulingParameters', '_MaintenanceRevision', '_EAMProductQuickVw',
'_ProfitCenterText', '_ResponsibleCostCenterText', '_CostCenterText', '_MainWorkCenterText', '_PriorityText', '_AssemblyText', '_MaintenancePlannerGroup',
'_MasterFixedAsset', '_MaterialText', '_ObjPgMaintObjPhaseControl','_EAMOrderProcessPhase','_EAMOrderProcessSubPhase']
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #('TRANSACTIONAL_DATA')
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Maintenance Order'
@Metadata.allowExtensions: true
@ObjectModel.compositionRoot: true
@ObjectModel.createEnabled: false
@ObjectModel.deleteEnabled: false
@ObjectModel.draftEnabled: false
@ObjectModel.semanticKey: [ 'MaintenanceOrder' ]
@ObjectModel.representativeKey: 'MaintenanceOrder'
@ObjectModel.transactionalProcessingDelegated : true
@ObjectModel.updateEnabled: false
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #X
@ObjectModel.usageType.sizeCategory: #XL

@Search.searchable: true
@VDM.viewType: #CONSUMPTION

@UI: {
    headerInfo: {
        description: {
            value: 'MaintenanceOrderDesc',
            type: #STANDARD
        },
        title: {
            value: 'MaintenanceOrder',
            type: #STANDARD
        },
        typeName: 'Maintenance Order',
        typeNamePlural: 'Maintenance Orders',
        imageUrl: 'MaintenanceOrderThumbnailURL'

    },
    presentationVariant: {
        requestAtLeast:  [ 'TechObjIsEquipOrFuncnlLoc',
                           'TechnicalObject',
                           'CompleteBusinessAndSetNotifSts',
                           'CompleteTechlyAndSetNotifSts',
                           'DoNotExectOrderAndSetNotifSts',
                           'ResetTechCompltnAndSetNotifSts',
                           'RefTimeForOrderCompletion',
                           'TaskListType',
                           'TaskListGroup',
                           'TaskListGroupCounter',
                           'TaskListKeyDate'
                            ]
    }
}

define view C_ObjPgMaintOrder
  as select from           I_MaintOrderTP         as _MaintenanceOrder
    left outer to one join I_EAMUserDefaultValues as _EAMUserDefaultValues on _EAMUserDefaultValues.UserID = $session.user

  association [0..*] to C_MaintOrdChgHistory           as _MaintOrdChgHistory            on  $projection.MaintOrderWithLeadingZeros = _MaintOrdChgHistory.ChangeDocObject
  association [0..*] to I_TechObjIsEquipOrFuncnlLocT   as _TechObjIsEquipOrFuncnlLocT    on  _TechObjIsEquipOrFuncnlLocT.TechObjIsEquipOrFuncnlLoc = $projection.TechObjIsEquipOrFuncnlLoc
  association [0..*] to I_OrderTypeText                as _OrderTypeText                 on  _OrderTypeText.OrderType = $projection.MaintenanceOrderType
  association [0..*] to I_ProductText                  as _AssemblyText                  on  _AssemblyText.Product = $projection.Assembly
  association [0..*] to I_ProductText                  as _MaterialText                  on  _MaterialText.Product = $projection.Material
  association [0..1] to I_EquipmentText                as _EquipmentText                 on  _EquipmentText.Equipment = $projection.Equipment
                                                                                         and _EquipmentText.Language  = $session.system_language
  association [0..1] to I_FunctionalLocationText       as _FunctionalLocationText        on  _FunctionalLocationText.FunctionalLocation = $projection.FunctionalLocation
                                                                                         and _FunctionalLocationText.Language           = $session.system_language
  association [0..*] to I_ProductionResourceText       as _MainWorkCenterText            on  _MainWorkCenterText.ProductionResourceType       = 'A'
                                                                                         and _MainWorkCenterText.ProductionResourceInternalID = $projection.WorkCenterInternalID
  association [0..*] to I_GenericPriorityText          as _PriorityText                  on  _PriorityText.GenericPriorityType = $projection.MaintPriorityType
                                                                                         and _PriorityText.PriorityCode        = $projection.MaintPriority
  association [0..*] to I_CostCenterText               as _ResponsibleCostCenterText     on  _ResponsibleCostCenterText.ControllingArea = $projection.ControllingArea
                                                                                         and _ResponsibleCostCenterText.CostCenter      = $projection.ResponsibleCostCenter
                                                                                         and _ResponsibleCostCenterText.ValidityEndDate = '99991231'
  association [0..*] to I_CostCenterText               as _CostCenterText                on  _CostCenterText.ControllingArea = $projection.ControllingArea
                                                                                         and _CostCenterText.CostCenter      = $projection.LocAcctAssgmtCostCenter
                                                                                         and _CostCenterText.ValidityEndDate = '99991231'
  association [0..*] to I_ProfitCenterText             as _ProfitCenterText              on  _ProfitCenterText.ControllingArea = $projection.ControllingArea
                                                                                         and _ProfitCenterText.ProfitCenter    = $projection.ProfitCenter
                                                                                         and _ProfitCenterText.ValidityEndDate = '99991231'
  association [0..1] to I_FunctionalLocationLabel      as _FunctionalLocationLabel       on  _FunctionalLocationLabel.FunctionalLocation = $projection.FunctionalLocation

  association [0..1] to I_MaintPlanningBucketTP        as _MaintPlanningBucket           on  _MaintPlanningBucket.MaintOrderForAdministration = $projection.MaintenanceOrder

  association [0..1] to I_MaintenanceItemBasic         as _MaintenanceItem               on  _MaintenanceItem.MaintenanceItem = $projection.MaintenanceItem
  association [1..1] to C_ObjPgMaintOrderWthDesc       as _MaintOrderWthDesc             on  _MaintOrderWthDesc.MaintenanceOrder = $projection.MaintenanceOrder
  association [0..*] to C_ObjPgMaintOrderCost          as _MaintOrderCost                on  _MaintOrderCost.MaintenanceOrderInternalID = $projection.MaintenanceOrderInternalID
  association [1..1] to C_ObjPgMaintOrderCostAggrgData as _MaintOrderCostAggrg           on  _MaintOrderCostAggrg.MaintenanceOrderInternalID = $projection.MaintenanceOrderInternalID

  association [0..*] to C_ObjPgMaintOrderOperation     as _MaintOrderOperation           on  _MaintOrderOperation.MaintenanceOrder = $projection.MaintenanceOrder

  //Value Helps

  association [0..1] to C_MaintOrderTypeVH             as _MaintOrderTypeVH              on  _MaintOrderTypeVH.MaintenanceOrderType = $projection.MaintenanceOrderType
  association [0..1] to C_MaintenanceOrderPhaseVH      as _MaintOrderPhaseVH             on  _MaintOrderPhaseVH.MaintenanceProcessingPhase = $projection.MaintenanceProcessingPhase
  association [0..1] to C_TechnicalObjectLabelVH       as _TechnicalObjectLabelVH        on  _TechnicalObjectLabelVH.TechnicalObjectLabel      = $projection.TechnicalObjectLabel
                                                                                         and _TechnicalObjectLabelVH.TechObjIsEquipOrFuncnlLoc = $projection.TechObjIsEquipOrFuncnlLoc
                                                                                         and _TechnicalObjectLabelVH.TechnicalObject           = $projection.TechnicalObject

  --/* Selection helper for Maintenance Planning Overview Page */
  --association [0..1] to C_OverdueMaintenanceOrderQ     as _OverdueMaintenanceOrderQ      on  _OverdueMaintenanceOrderQ.MaintenanceOrder = $projection.MaintenanceOrder

  association [0..1] to I_PMContactCardEmployee        as _PersonResponsible             on  $projection.MaintOrdPersonResponsible = _PersonResponsible.PersonnelNumber

  association [0..1] to I_PersonWorkAgreement_1        as _MaintOrdPersonResponsible     on  _MaintOrdPersonResponsible.PersonWorkAgreement = $projection.MaintOrdPersonResponsible_H
  association [0..1] to P_MaintOrdNmbrOfReservations   as _MaintOrdNmbrOfReservations    on  $projection.MaintenanceOrder = _MaintOrdNmbrOfReservations.MaintenanceOrder

  association [0..1] to I_Indicator                    as _MaintOrderHasOpenReservations on  $projection.MaintOrderHasOpenReservations = _MaintOrderHasOpenReservations.IndicatorValue

  association [0..1] to P_MaintOrdNmbrOfOpenPO         as _MaintOrdNmbrOfOpenPO          on  $projection.MaintenanceOrder = _MaintOrdNmbrOfOpenPO.MaintenanceOrder

  association [0..1] to I_Indicator                    as _MaintOrdHasOpenPurchaseOrders on  $projection.MaintOrdHasOpenPurchaseOrders = _MaintOrdHasOpenPurchaseOrders.IndicatorValue
  association [0..1] to P_MaintOrdNmbrOfOpenServices   as _MaintOrdNmbrOfOpenServices    on  $projection.MaintenanceOrder = _MaintOrdNmbrOfOpenServices.MaintenanceOrder
  association [0..1] to I_Indicator                    as _MaintOrdHasOpenServices       on  $projection.MaintOrdHasOpenServices = _MaintOrdHasOpenServices.IndicatorValue
  --  association [0..1] to I_EAMUserDefaultValues            as _EAMUserDefaultValues          on  _EAMUserDefaultValues.UserID = $session.user
  association [0..1] to I_PMContactCardUser            as _CreatedByUser                 on  $projection.CreatedByUser = _CreatedByUser.UserID

  association [0..1] to C_PMAssetLocationVH            as _AssetLocationVH               on  _AssetLocationVH.Location = $projection.assetlocation
                                                                                         and _AssetLocationVH.Plant    = $projection.maintenanceplant // n3293392


  association [0..1] to C_MaintNotificationQuickVw     as _MaintNotificationQuickView    on  $projection.MaintenanceNotification = _MaintNotificationQuickView.MaintenanceNotification

  association [0..1] to C_TechObjQuickVw               as _TechnicalObjQuickVw           on  _TechnicalObjQuickVw.TechnicalObject           = $projection.TechnicalObject
                                                                                         and _TechnicalObjQuickVw.TechObjIsEquipOrFuncnlLoc = $projection.TechObjIsEquipOrFuncnlLoc
  --and _TechnicalObjQuickVw.TechnicalObjectLabel      = $projection.technicalobjectlabel

  association [0..1] to C_MaintenancePlanQuickVw       as _MaintenancePlanQuickVw        on  _MaintenancePlanQuickVw.MaintenancePlan = $projection.MaintenancePlan

  association [0..1] to C_MaintTaskListQuickVw         as _MaintTaskListQuickVw          on  _MaintTaskListQuickVw.TaskList             = $projection.TaskList
                                                                                         and _MaintTaskListQuickVw.TaskListType         = $projection.TaskListType
                                                                                         and _MaintTaskListQuickVw.TaskListGroup        = $projection.TaskListGroup
                                                                                         and _MaintTaskListQuickVw.TaskListGroupCounter = $projection.TaskListGroupCounter

  association [0..1] to P_MaintOrdUsrStsWithSqncNmbr   as _ActiveUserStatusWthStsNmbr    on  _ActiveUserStatusWthStsNmbr.StatusObject = $projection.MaintenanceOrderInternalID

  association [0..*] to C_StsObjActiveStatusCodeText   as _ActiveSystemStatus            on  _ActiveSystemStatus.StatusObject = $projection.MaintenanceOrderInternalID
                                                                                         and _ActiveSystemStatus.IsUserStatus = ''

  association [0..*] to C_StsObjActiveStatusCodeText   as _ActiveUserStatus              on  _ActiveUserStatus.StatusObject = $projection.MaintenanceOrderInternalID
                                                                                         and _ActiveUserStatus.IsUserStatus = 'X'

  //  association [0..1] to C_StsObjActiveStatusCodeText   as _ActiveUserStatusWthStsNmbr    on  _ActiveUserStatusWthStsNmbr.StatusObject         = $projection.MaintenanceOrderInternalID

  //                                                                                         and _ActiveUserStatusWthStsNmbr.IsUserStatus         =  'X'

  //                                                                                         and _ActiveUserStatusWthStsNmbr.StatusSequenceNumber <> '00'


  association [0..1] to I_StatusProfile                as _StatusProfile                 on  _StatusProfile.StatusProfile = $projection.StatusProfile

  association [0..1] to C_MaintPrioSmltdDates          as _MaintPrioSmltdDates           on  _MaintPrioSmltdDates.MaintPriority     = $projection.MaintPriority
                                                                                         and _MaintPrioSmltdDates.MaintPriorityType = $projection.MaintPriorityType

  association [0..1] to I_MaintSchedulingParameters    as _SchedulingParameters          on  _SchedulingParameters.MaintenanceOrderType = $projection.MaintenanceOrderType
                                                                                         and _SchedulingParameters.Plant                = $projection.MaintenancePlanningPlant

  association [0..*] to C_MaintenanceObjectStatus      as _SystemStatus                  on  _SystemStatus.StatusObject = $projection.MaintenanceOrderInternalID
                                                                                         and _SystemStatus.IsUserStatus = ' '

  association [0..*] to C_MaintenanceObjectStatus      as _UserStatusWthoutStsNmbr       on  _UserStatusWthoutStsNmbr.StatusObject         = $projection.MaintenanceOrderInternalID
                                                                                         and _UserStatusWthoutStsNmbr.StatusSequenceNumber = '00'
                                                                                         and _UserStatusWthoutStsNmbr.IsUserStatus         = 'X'
  association [0..1] to C_MaintObjUserStatusWthStsNmbr as _UserStatusWithStatusNumber    on  _UserStatusWithStatusNumber.StatusObject = $projection.MaintenanceOrderInternalID
                                                                                         and _UserStatusWithStatusNumber.StatusSequenceNumber != '00'
                                                                                         and _UserStatusWithStatusNumber.IsUserStatus = 'X'

  association [0..1] to C_EAMProductQuickVw            as _EAMProductQuickVw             on  _EAMProductQuickVw.Material = $projection.Assembly

  association [0..1] to I_Indicator                    as _HasOpenMainWork               on  _HasOpenMainWork.IndicatorValue = $projection.MaintOrdHasOpenMainWork

  association [0..*] to I_MaintenanceObjectStatus      as _MaintenanceObjectStatus       on  _MaintenanceObjectStatus.StatusObject = $projection.MaintenanceOrderInternalID
                                                                                         and _MaintenanceObjectStatus.StatusObject like 'OR%'

  -- Phase Control codes (display only)
  association [0..*] to C_ObjPgMaintObjPhaseControl    as _ObjPgMaintObjPhaseControl     on  _ObjPgMaintObjPhaseControl.StatusObject             = $projection.MaintenanceOrderInternalID
                                                                                         and _ObjPgMaintObjPhaseControl.EAMBlockerCodeEntityType = 'ORI'
                                                                                         and _ObjPgMaintObjPhaseControl.MaintenanceOrderType     = $projection.MaintenanceOrderType

  association [0..*] to I_EAMProcessPhaseText          as _EAMOrderProcessPhase          on  _EAMOrderProcessPhase.EAMProcessPhaseCode = $projection.MaintOrdProcessPhaseCode
  association [0..*] to I_EAMProcessSubPhaseText       as _EAMOrderProcessSubPhase       on  _EAMOrderProcessSubPhase.EAMProcessSubPhaseCode = $projection.MaintOrdProcessSubPhaseCode
  association [0..1] to C_MaintOrdProcessingContextVH  as _MaintOrderProcessingContextVH on  _MaintOrderProcessingContextVH.MaintOrderProcessingContext = $projection.MaintOrderProcessingContext
  association [0..1] to I_MaintOrderProcessingContext  as _MaintOrderProcessingContext   on  _MaintOrderProcessingContext.MaintOrderProcessingContext = $projection.MaintOrderProcessingContext

  association [0..1] to I_MaintPlanningBucketVH        as _MaintPlanningBucketVH         on  _MaintPlanningBucketVH.MaintPlanningBucketUUID = $projection.MaintPlanningBucketUUID
  association [0..*] to I_FunclocationLabelInternal    as _FuncnlLocationLabel           on  _FuncnlLocationLabel.FunctionalLocation = $projection.FunctionalLocation

  association [1..1] to I_MaintenanceOrder             as _MaintOrder                    on  _MaintOrder.MaintenanceOrder = $projection.MaintenanceOrder
  association [0..1] to I_MaintenanceRevisionValueHelp as _MaintenanceRevisionValueHelp  on  _MaintenanceRevisionValueHelp.MaintenancePlanningPlant = $projection.MaintenancePlanningPlant
                                                                                         and _MaintenanceRevisionValueHelp.MaintenanceRevision      = $projection.MaintenanceRevision

  association [0..1] to I_PermitToWorkProfile          as _PermitToWorkProfile           on  _PermitToWorkProfile.MaintenancePlanningPlant = $projection.MaintenancePlanningPlant
  association [0..*] to I_WorkPermitRelevanceText      as _WorkPermitRelevanceText       on  _WorkPermitRelevanceText.WorkPermitRelevance = $projection.WorkPermitRelevance

{
      @Consumption.semanticObject: 'MaintenanceOrder'
      @ObjectModel.text.element: [ 'MaintenanceOrderDesc' ]
      @Search: { defaultSearchElement: true, ranking: #HIGH }
      @UI:{
          lineItem: [
                {
                importance: #HIGH,
                position: 10 },
                {type: #FOR_ACTION, dataAction: 'BOPF:Release', label: 'Release', importance: #HIGH, position: 10},
                {type: #FOR_ACTION, dataAction: 'BOPF:CancelBusinessComplete', label: 'Cancel Business Completion', importance: #LOW, position: 110},
                {type: #FOR_ACTION, dataAction: 'BOPF:MainWorkCompleted', label: 'Main Work Completed', importance: #LOW, position: 210 },
                {type: #FOR_ACTION, dataAction: 'BOPF:Readyforscheduling', label: 'Ready to Schedule', importance: #LOW, position: 310 },
                {type: #FOR_ACTION, dataAction: 'BOPF:Scheduleoperations', label: 'Dispatch Operations', importance: #LOW, position: 410 },
                {type: #FOR_ACTION, dataAction: 'BOPF:SetDeletionFlag', label: 'Set Deletion Flag', importance: #LOW, position: 510 },
                {type: #FOR_ACTION, dataAction: 'BOPF:ResetDeletionFlag', label: 'Reset Deletion Flag', importance: #LOW, position: 610 }],
          selectionField: {
                position: 10
          }
      }
      @Consumption.valueHelpDefinition: [
         { entity:  { name:    'I_MaintenanceOrderStdVH',
                      element: 'MaintenanceOrder' }
         }]
  key _MaintenanceOrder.MaintenanceOrder,

      @UI.hidden: true
      cast( _MaintenanceOrder.MaintenanceOrder as abap.char( 12 ) )                                                                                                 as MaintOrderWithLeadingZeros,

      @Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.8 }
      @UI.hidden: true
      _MaintenanceOrder.MaintenanceOrderDesc,

      @UI.hidden: true
      _MaintenanceOrder.MaintenanceOrderInternalID,

      @UI:{
            fieldGroup: {
                  importance: #HIGH,
                  groupLabel: 'Order Type',
                  qualifier: 'HeaderInfo1',
                  position: 10
            },
          lineItem: {
                importance: #HIGH,
                position: 20
           },
            selectionField: {
                  position: 20
            }
        }

      @ObjectModel.text.element: [ 'MaintenanceOrderTypeName' ]
      @ObjectModel.foreignKey.association: '_MaintOrderTypeVH'
      @Search: {defaultSearchElement: true, ranking: #HIGH}
      @UI.textArrangement: #TEXT_FIRST


      _MaintenanceOrder.MaintenanceOrderType,

      @UI:{
        fieldGroup: {
          importance: #HIGH,
          groupLabel: 'Context',
          qualifier: 'HeaderInfo1',
          position: 20
        },
        textArrangement: #TEXT_FIRST,
        selectionField:
          {
            position: 150
          },
        lineItem:
          {
            importance: #HIGH,
            position : 170
          }
      }
      @ObjectModel.foreignKey.association: '_MaintOrderProcessingContextVH'
      //      @Consumption.filter.selectionType: #SINGLE

      //      @Consumption.filter.multipleSelections: true

      @Consumption :
      {
        valueHelpDefinition: [{
            entity: {
                name:'C_MaintOrdProcessingContextVH',
                element:'MaintOrderProcessingContext'
            }
        }],
        filter.multipleSelections: true,
        filter.selectionType: #SINGLE
      }
      _MaintenanceOrder.MaintOrderProcessingContext,

      @EndUserText.label: 'Order Type Text'
      @UI.hidden
      --Displaying order type and name
      _MaintenanceOrder._Order._OrderType._Text[1:Language = $session.system_language].OrderTypeName                                                                as MaintenanceOrderTypeName,
      //cast( '' as pph_auarttext )          as MaintenanceOrderTypeName,


      @EndUserText.label: 'Order Status'
      @ObjectModel.foreignKey.association: '_MaintOrderPhaseVH'
      @ObjectModel.text.element: [ 'MaintenanceProcessingPhaseDesc' ]
      @UI:{
          lineItem: {
                importance: #HIGH,
                position: 130
          },
          selectionField: {
                position: 120
          }
      }
      _MaintenanceOrder.MaintenanceProcessingPhase,


      @EndUserText: { label: 'Order Status Description',
                      quickInfo: 'Order Status Description'
                    }
      _MaintenanceOrder._MaintenanceOrderPhase._Text[1:Language = $session.system_language].MaintenanceProcessingPhaseDesc,

      --@ObjectModel.text.element: [ 'MaintPriorityDesc' ]
      @ObjectModel.text.association: '_PriorityText'
      @UI:{
          fieldGroup: {
                importance: #HIGH,
                qualifier: 'HeaderInfo1',
                position: 30
          },
          textArrangement: #TEXT_FIRST,
          lineItem: {
                importance: #HIGH,
                position: 40,
                criticality: 'MaintPriorityColorCode',
                criticalityRepresentation: #WITHOUT_ICON
          },
          selectionField: {
                position: 30
          }

      }

      _MaintenanceOrder.MaintPriority,

      // IME: 2002 LACD

      @UI:{
          fieldGroup: [{            // n3349204 begins

                importance: #HIGH,
                groupLabel: 'Dates',
                qualifier: 'Dates',
                position: 20
          }],                       // n3349204 ends

          lineItem: {
                importance: #HIGH,
                position: 50
          },
          selectionField: {
                position: 40
          }
      }
      @Consumption.filter.selectionType: #INTERVAL
      //  @feature: 'EAM_WORKREQUEST'

      _MaintenanceOrder.LatestAcceptableCompletionDate,
      // IME: 2002 LACD


      _MaintenanceOrder._MaintenancePriority.MaintPriorityColorCode,

      @EndUserText.label: 'Priority Text'
      @UI.hidden
      cast( '' as priokx )                                                                                                                                          as MaintPriorityDesc,


      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_MaintNotifStdVH',
                     element: 'MaintenanceNotification' }
        }]
      @Consumption.semanticObject: 'MaintenanceNotification'
      @ObjectModel: { foreignKey.association: '_MaintNotificationQuickView', mandatory: true }
      @ObjectModel.text.element: [ 'MaintenanceNotificationText' ]
      @UI:{
          fieldGroup: {
                importance: #HIGH,
                groupLabel: 'Notification',
                qualifier: 'HeaderInfo2',
                position: 10
          },
          lineItem: {
                importance: #HIGH,
                position: 30
          }
      }
      _MaintenanceOrder.MaintenanceNotification,

      @EndUserText: { label: 'Notification Description',
                      quickInfo: 'Notification Description'
                    }
      _MaintenanceOrder._MaintenanceNotification.NotificationText                                                                                                   as MaintenanceNotificationText,
      @UI.hidden:true
      _MaintenanceOrder.TaskListGroup,
      @UI.hidden:true
      _MaintenanceOrder.TaskListType,
      @UI.hidden:true
      _MaintenanceOrder.TaskListGroupCounter,
      @UI.hidden:true
      $session.system_date                                                                                                                                          as TaskListKeyDate,
      @EndUserText.label: 'Task List'
      @ObjectModel.text.element: [ 'TaskListDesc' ]
      @Consumption.semanticObject: 'MaintenanceTaskList'
      @Consumption.valueHelpDefinition: [ {
        entity:
            { name: 'I_MaintenanceTaskListStdVH', element: 'TaskList' },
        additionalBinding: [
            { localElement: 'TaskListType', element: 'TaskListType' },
            { localElement: 'TaskListGroup', element: 'TaskListGroup' },
            { localElement: 'TaskListGroupCounter', element: 'TaskListGroupCounter' }
        ]
      } ]
      @ObjectModel: { foreignKey.association: '_MaintTaskListQuickVw', mandatory: true}
      case _MaintenanceOrder.TaskListType
        when '' then ''
        else case _MaintenanceOrder.TaskListGroup
                when '' then ''
                else concat( concat( concat( concat(
                                _MaintenanceOrder.TaskListType,
                                '/' ),
                                ltrim( _MaintenanceOrder.TaskListGroup, '0') ),
                                '/' ),
                                ltrim( _MaintenanceOrder.TaskListGroupCounter, '0')
                             )
             end
      end                                                                                                                                                           as TaskList,
      @EndUserText: { label: 'Task List Description',
                      quickInfo: 'Task List Description'
                    }
      _MaintenanceOrder._MaintenanceTaskList.TaskListDesc,

      //      _MaintenanceOrder.BOOValidityStartDate,


      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_MaintenancePlanStdVH',
                     element: 'MaintenancePlan' }
        }]
      @EndUserText.label: 'Maintenance Plan'
      @ObjectModel.text.element: [ 'MaintenancePlanDesc' ]
      @Consumption.semanticObject: 'MaintenancePlan'
      @ObjectModel: { foreignKey.association: '_MaintenancePlanQuickVw', mandatory: true }
      @UI:{

          lineItem: {
                importance: #HIGH,
                position: 110
          },
          selectionField: {
                position: 100
          }
      }
      _MaintenanceOrder.MaintenancePlan,
      @EndUserText: { label: 'Maintenance Plan Description',
                      quickInfo: 'Maintenance Plan Description'
                    }
      _MaintenanceOrder._MaintenancePlan.MaintenancePlanDesc,

      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_MaintenanceItemStdVH',
                     element: 'MaintenanceItem' }
        }]
      @ObjectModel.text.element:  [ 'MaintenanceItemDescription' ]
      @UI:{
          lineItem: {
                importance: #HIGH,
                position: 120
          },
          selectionField: {
               position: 110
          }
      }

      _MaintenanceOrder.MaintenanceItem,
      @EndUserText: { label: 'Maintenance Item Description',
                      quickInfo: 'Maintenance Item Description'
                    }
      _MaintenanceItem.MaintenanceItemDescription,

      @Consumption.semanticObject: 'MaintenanceObject'
      @Consumption.valueHelp: '_TechnicalObjectLabelVH'
      @Consumption.filter.multipleSelections: true
      @ObjectModel.filter.transformedBy: 'CL_EAM_TECHOBJ_FILTER_EXIT'
      @ObjectModel.text.element: [ 'TechnicalObjectDescription' ]
      @UI:{
          fieldGroup: [{