I_MAINTENANCEORDER

CDS View

Maintenance Order

I_MAINTENANCEORDER is a CDS View in S/4HANA. Maintenance Order. It contains 97 fields. 71 CDS views read from this table.

CDS Views using this table (71)

ViewTypeJoinVDMDescription
C_MaintOrderForSafetyInsights view from CONSUMPTION Maintenance Orders for Safety Insights
C_MaintOrderOutputParamDetn view from CONSUMPTION Maintenance Order Output Management Parameter Determination
C_RSHOrderActiveUserStatus view inner CONSUMPTION Maintenance order active status
C_RSHOrderDetails view from CONSUMPTION Maintenance order long text details
C_RSHOrdersKPI view from CONSUMPTION Maintenance Orders KPIs
C_RunOverheadMaintenanceOrder view from CONSUMPTION Overhead Calculation Maintenance Order
C_RunSettlmtActlMaintOrder view from CONSUMPTION Actual Settlement Maintenance Order
C_TechObjMaintenanceOrder view from CONSUMPTION Maintenance Orders for Technical Object
C_TechObjMaintenanceOrder view union_all CONSUMPTION Maintenance Orders for Technical Object
C_WorkPermitOrderValueHelp view from CONSUMPTION Maintenance Orders in Work Permit
CRMS4_IU_I_UMO view_entity from Utilities Maintenance Order
FINOC_RULE_ORD_DEFAULT view inner Orgl Change-Rule: Order Default Implmt.
FSM_I_MaintenanceOrder view_entity from TRANSACTIONAL FSM Maintenance Order
I_DFS_MaintenanceOrderTechSts view from COMPOSITE Interface view for Tech Status of Order
I_FldLogsMaintenanceOrderVH view from COMPOSITE List of Maintenance Order for Field Logistics
I_MaintenanceOrderDEX view_entity from COMPOSITE Maintenance Order Data
I_MaintenanceOrderPartner view from COMPOSITE Maintenance Order Partners
I_MaintenanceOrderPhaseControl view from COMPOSITE Maintenance Order Phase Controls
I_MaintenanceOrderStdVH view from COMPOSITE Maintenance Order
I_MaintOrdChangeDocumentDEX view_entity inner COMPOSITE Maintenance Order Change Document
I_MaintOrderEmailParameter view from COMPOSITE Email Parameters for Maintenance Order
I_MaintOrderInspectionLot view from COMPOSITE Maintenance Order Inspection Lot
I_MaintOrderOpPhaseControl view inner COMPOSITE Maintenance Order Op Phase Controls
I_MaintOrderPhseCtrlChgHist view from COMPOSITE Order Phase Control last change history
I_MaintOrderTechObj view from COMPOSITE Maintenance Order w/ Technical Object
I_MaintOrderTechObjCube view from COMPOSITE Maintenance Order With Tech Object - Cube
I_MaintOrdToNotifAssignmentVH view_entity from COMPOSITE Maintenance Order
I_OpenMaintOrderForTechObject view from COMPOSITE Open Maintainance Orders for Technical Object
I_OpenMaintOrderForTechObject view inner COMPOSITE Open Maintainance Orders for Technical Object
I_ProjectAssignedOrderVH view from COMPOSITE Maintenance and Production Orders
I_RSHOrder view from COMPOSITE Maintenance Orders
P_EBRRSrvDocMonMaintOrd view_entity from COMPOSITE
P_EventBasedOverheadOrderVH view union COMPOSITE Order details
P_InhReprItmNrOfOpnMaintOrd view inner COMPOSITE
P_MaintBacklogNonStkCompUnion view union_all CONSUMPTION Maintenance Backlog Non Stock Component Union
P_MaintBacklogServiceUnion view union_all CONSUMPTION
P_MaintenanceJobAndWorkItem view union_all COMPOSITE
P_MaintOrdConfOrderStatus view from CONSUMPTION
P_MaintOrdEnhcdObjectListItem view_entity union_all COMPOSITE
P_MAINTORDERBASICDATA view from COMPOSITE
P_MaintOrderCompletionStatus view from CONSUMPTION
P_MaintOrderForComplPreAggr view from CONSUMPTION
P_MaintOrderSearch view from BASIC
P_MaintOrdersForPlanningC view from COMPOSITE
P_MaintOrdNonStkCompFromPurOrd view inner CONSUMPTION
P_MaintOrdNoOfCheckList view_entity from CONSUMPTION Number of Checklists Assigned to Order
P_MaintPlngBcktOrder view from CONSUMPTION
P_MaintPlngBucketMaintOrdBasic view from CONSUMPTION
P_OverdueMaintenanceOrderC view from COMPOSITE
P_PROJCMTMTBUDGETLINEITMS view inner COMPOSITE Project Budget Commitment
P_ProjectObject view union COMPOSITE
P_ProjectObject_2 view union_all COMPOSITE Project Object
P_ProjPlnBudgetLineItms view inner COMPOSITE
P_RSHDueOperForKPIDetails view from CONSUMPTION Past Order Operation KPI Details
P_RSHExOpsForScheduling view inner CONSUMPTION
P_RSHMaintAssetBoard view from CONSUMPTION Maintenance Asset Board
P_RSHMaintAssetBoardShapes view from CONSUMPTION Maintenance asset board shapes
P_RSHMaintAssetBoardShapes view inner CONSUMPTION Maintenance asset board shapes
P_RSHMaintCallOrderProcStatus view from CONSUMPTION Processing Status for Maint. Call Orders
P_RSHOperationsForKPI view inner CONSUMPTION Operations and Sub Operations for overview page
P_RSHOperationsForKPIDetails view from CONSUMPTION Order KPI Details
P_RSHOperationsForUtilization view inner CONSUMPTION Operations and Sub Operations for utilization
P_RSHOrderProcessingStatus view from CONSUMPTION Processing Status for Orders
P_RSHPastOperForKPIDetails view from CONSUMPTION Past Order Operation KPI Details
P_RunOverheadOrder view from COMPOSITE
P_RunSettlementActualOrder view from COMPOSITE
P_SettlementSender view union_all CONSUMPTION
P_WBSOrders view union_all COMPOSITE
R_InhRepairItmNrOfOpnMaintOrds view_entity inner COMPOSITE Number of open Maintenance Orders
R_MaintenanceJobTP view_entity from COMPOSITE Maintenance Order TP
R_MaintenanceOrderTP view_entity from COMPOSITE Maintenance Order TP

Fields (97)

KeyField CDS FieldsUsed in Views
KEY MaintenanceOrder MaintenanceOrder 25
KEY MaintenanceOrderInternalID MaintAssetBoardRowObjID,MaintAssetBoardShapeID,MaintenanceOrderInternalID,objnr,StatusObject 11
KEY MaintOrderRoutingNumber MaintOrderRoutingNumber 6
_Assembly _Assembly 2
_BusinessArea _BusinessArea 1
_CompanyCode _CompanyCode 1
_ControllingArea _ControllingArea 1
_CreatedByUser _CreatedByUser 1
_Equipment _Equipment 4
_LocationAccountAssignment _LocationAccountAssignment 5
_MaintenanceActivityType _MaintenanceActivityType 2
_MaintenanceItem _MaintenanceItem 2
_MaintenanceNotification _MaintenanceNotification 2
_MaintenanceOrderCategory _MaintenanceOrderCategory 2
_MaintenanceOrderComponent _MaintenanceOrderComponent 1
_MaintenanceOrderPhase _MaintenanceOrderPhase 1
_MaintenanceOrderType _MaintenanceOrderType 3
_MaintenancePlan _MaintenancePlan 2
_MaintenancePlannerGroup _MaintenancePlannerGroup 2
_MaintenancePlanningPlant _MaintenancePlanningPlant 2
_MaintenancePlanPlant _MaintenancePlanPlant 1
_MaintenancePriority _MaintenancePriority 1
_MaintenancePriorityType _MaintenancePriorityType 1
_MaintenanceRevision _MaintenanceRevision 1
_MaintenanceTaskList _MaintenanceTaskList 1
_MaintOrderHasOpenMainWork _MaintOrderHasOpenMainWork 1
_MaintOrdPlngDegreeCode _MaintOrdPlngDegreeCode 1
_MainWorkCenter _MainWorkCenter 2
_OperationSystemCondition _OperationSystemCondition 1
_Order _Order 1
_OrderHasLongText _OrderHasLongText 1
_OrderItem _OrderItem 1
_ResponsibleCostCenter _ResponsibleCostCenter 1
_StatusObject _StatusObject 1
_StatusObjectStatus _StatusObjectStatus 1
AdditionalDeviceData AdditionalDeviceData 1
Assembly Assembly 2
BasicSchedulingType BasicSchedulingType 1
BusinessArea BusinessArea 1
CompanyCode CompanyCode 2
ControllingArea ControllingArea 3
CreatedByUser CreatedByUser 1
CreationDate CreationDate 2
CreationTime CreationTime 2
Currency Currency 1
DfsMaintOrderObjectNmbr DfsMaintOrderObjectNmbr 1
DfsMaintSuperordinateEquipNmbr DfsMaintSuperordinateEquipNmbr 1
Equipment Equipment 14
FunctionalArea FunctionalArea 1
LastChangeDateTime LastChangeDateTime 1
LatestAcceptableCompletionDate LatestAcceptableCompletionDate 5
MaintenanceActivityType MaintenanceActivityType 6
MaintenanceItem MaintenanceItem 2
MaintenanceNotification MaintenanceNotification 3
MaintenanceOrderCategory autyp,MaintenanceOrderCategory 6
MaintenanceOrderDesc MaintenanceOrderDesc 11
MaintenanceOrderPlanningCode MaintenanceOrderPlanningCode 2
MaintenanceOrderType MaintenanceOrderType 20
MaintenancePlan MaintenancePlan 2
MaintenancePlannerGroup MaintenancePlannerGroup 15
MaintenancePlanningPlant MaintenancePlanningPlant 16
MaintenancePlant MaintenancePlant 3
MaintenanceProcessingPhase MaintenanceProcessingPhase 7
MaintenanceRevision MaintenanceEvent,MaintenanceRevision 7
MaintObjectLocAcctAssgmtNmbr MaintObjectLocAcctAssgmtNmbr 14
MaintOrdBasicEndDate EndDate,MaintOrdBasicEndDate 6
MaintOrdBasicEndTime MaintOrdBasicEndTime 4
MaintOrdBasicStartDate MaintOrdBasicStartDate,StartDate 6
MaintOrdBasicStartTime MaintOrdBasicStartTime 4
MaintOrderProcessingContext MaintOrderProcessingContext 1
MaintOrderReferenceDate MaintOrderReferenceDate 2
MaintOrderReferenceTime MaintOrderReferenceTime 1
MaintOrdPersonResponsible MaintOrdPersonResponsible,PersonResponsible 2
MaintOrdProcessPhaseCode MaintOrdProcessPhaseCode 4
MaintOrdProcessSubPhaseCode MaintOrdProcessSubPhaseCode 1
MaintPriority MaintPriority 9
MaintPriorityType MaintPriorityType 7
MainWorkCenter MaintOrdMainWorkCenter,MainWorkCenter 6
MainWorkCenterPlant MaintOrdMainWorkCenterPlant,MainWorkCenterPlant 3
Material Material 1
OperationSystemCondition OperationSystemCondition 3
OrderHasLongText OrderHasLongText 1
OrdIsNotSchedldAutomatically OrdIsNotSchedldAutomatically 1
PrevLtstAccptblCompletionDate PrevLtstAccptblCompletionDate 1
ReferenceElement ReferenceElement 2
ResponsibleCostCenter ResponsibleCostCenter,srce_kostl 2
ScheduledBasicEndDate ScheduledBasicEndDate 4
ScheduledBasicEndTime ScheduledBasicEndTime 4
ScheduledBasicStartDate ScheduledBasicStartDate 4
ScheduledBasicStartTime ScheduledBasicStartTime 4
SerialNumber SerialNumber 3
TaskListGroup TaskListGroup 1
TaskListGroupCounter TaskListGroupCounter 1
TaskListType TaskListType 1
WBSElementInternalID WBSElementInternalID 1
WorkCenterInternalID MainWorkCenterInternalID,WorkCenterInternalID 6
WorkCenterTypeCode WorkCenterTypeCode 4
@EndUserText.label: 'Maintenance Order'
@VDM.viewType: #BASIC
@AccessControl.authorizationCheck: #CHECK
@AccessControl.privilegedAssociations:['_LocationAccountAssignment']
@AbapCatalog: { sqlViewName: 'IMAINTORDER', compiler.compareFilter, preserveKey }
@AccessControl.personalData.blocking: #NOT_REQUIRED
@ObjectModel.representativeKey: 'MaintenanceOrder'
@ObjectModel.semanticKey:  [ 'MaintenanceOrder' ]
@Metadata.ignorePropagatedAnnotations: true

// BOPF objects are generated from --> I_MaintOrderTechObj !


@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.sizeCategory: #XL

define view I_MaintenanceOrder
  as select from           afih
    left outer to one join aufk on aufk.aufnr = afih.aufnr
    left outer to one join afko on afko.aufnr = afih.aufnr
  association [0..1] to I_LogisticsOrder              as _Order                      on  _Order.OrderID = $projection.MaintenanceOrder // AUFK (Order master data) and AFKO (Order Header data )

  association [1..1] to I_OrderCategory               as _MaintenanceOrderCategory   on  $projection.MaintenanceOrderCategory = _MaintenanceOrderCategory.OrderCategory
  association [1..1] to I_OrderType                   as _MaintenanceOrderType       on  $projection.MaintenanceOrderType = _MaintenanceOrderType.OrderType
  association [0..1] to I_ControllingArea             as _ControllingArea            on  $projection.ControllingArea = _ControllingArea.ControllingArea
  association [0..1] to I_ControllingObjectClass      as _ControllingObjectClass     on  $projection.ControllingObjectClass = _ControllingObjectClass.ControllingObjectClass
  association [0..1] to I_CompanyCode                 as _CompanyCode                on  $projection.CompanyCode = _CompanyCode.CompanyCode
  association [0..*] to I_CostCenter                  as _ResponsibleCostCenter      on  $projection.ControllingArea       = _ResponsibleCostCenter.ControllingArea
                                                                                     and $projection.ResponsibleCostCenter = _ResponsibleCostCenter.CostCenter
  association [0..*] to I_ProfitCenter                as _ProfitCenter               on  $projection.ControllingArea = _ProfitCenter.ControllingArea
                                                                                     and $projection.ProfitCenter    = _ProfitCenter.ProfitCenter
  association [0..1] to I_Plant                       as _LocationPlant              on  $projection.MaintenancePlant = _LocationPlant.Plant
  association [0..1] to I_SchedulingType              as _BasicSchedulingType        on  $projection.BasicSchedulingType = _BasicSchedulingType.SchedulingType
  association [0..1] to I_MaintenanceTaskList         as _MaintenanceTaskList        on  $projection.TaskListType         = _MaintenanceTaskList.TaskListType
                                                                                     and $projection.TaskListGroup        = _MaintenanceTaskList.TaskListGroup
                                                                                     and $projection.TaskListGroupCounter = _MaintenanceTaskList.TaskListGroupCounter
  with default filter _MaintenanceTaskList.ValidityEndDate = '99991231'

  /* Order Refurbishment Item */
  association [0..1] to I_OrderItem                   as _OrderItem                  on  $projection.MaintenanceOrder = _OrderItem.OrderID
                                                                                     and _OrderItem.OrderItem         = '0001'
  association [0..*] to I_MaintenanceOrderOperation   as _MaintenanceOrderOperation  on  $projection.MaintOrderRoutingNumber = _MaintenanceOrderOperation.MaintOrderRoutingNumber
  association [0..*] to I_MaintenanceOrderCost        as _MaintenanceOrderCost       on  $projection.MaintenanceOrderInternalID = _MaintenanceOrderCost.MaintenanceOrderInternalID
  association [0..*] to I_MaintenanceOrderComponent_2 as _MaintenanceOrderComponent  on  $projection.MaintenanceOrder = _MaintenanceOrderComponent.MaintenanceOrder
  association [0..1] to I_LocationAccountAssignment   as _LocationAccountAssignment  on  $projection.MaintObjectLocAcctAssgmtNmbr = _LocationAccountAssignment.MaintObjectLocAcctAssgmtNmbr
  association [0..1] to I_MaintenanceNotification     as _MaintenanceNotification    on  $projection.MaintenanceNotification = _MaintenanceNotification.MaintenanceNotification
  association [0..1] to I_Equipment                   as _Equipment                  on  $projection.Equipment = _Equipment.Equipment
  association [0..1] to I_Material                    as _Assembly                   on  $projection.Assembly = _Assembly.Material
  association [0..1] to I_MaintenancePlanBasic        as _MaintenancePlan            on  $projection.MaintenancePlan = _MaintenancePlan.MaintenancePlan
  association [0..1] to I_MaintenanceItem             as _MaintenanceItem            on  $projection.MaintenanceItem = _MaintenanceItem.MaintenanceItem
  association [0..1] to I_MaintenanceCall             as _MaintenanceCall            on  $projection.MaintenancePlan = _MaintenanceCall.MaintenancePlan
                                                                                     and $projection.MaintenanceItem = _MaintenanceCall.MaintenanceItem
                                                                                     and $projection.MaintenanceCall = _MaintenanceCall.MaintenanceCall
  association [0..1] to I_MaintenanceOrder            as _LeadingOrder               on  $projection.LeadingOrder = _LeadingOrder.MaintenanceOrder
  association [0..1] to I_Plant                       as _MaintenancePlanningPlant   on  $projection.MaintenancePlanningPlant = _MaintenancePlanningPlant.Plant
  association [0..1] to I_PMNotificationPriorityType  as _MaintenancePriorityType    on  $projection.MaintPriorityType = _MaintenancePriorityType.MaintPriorityType
  association [0..1] to I_PMNotificationPriority      as _MaintenancePriority        on  $projection.MaintPriority     = _MaintenancePriority.MaintPriority
                                                                                     and $projection.MaintPriorityType = _MaintenancePriority.MaintPriorityType
  association [0..1] to I_WorkCenter                  as _MainWorkCenter             on  $projection.WorkCenterInternalID = _MainWorkCenter.WorkCenterInternalID
                                                                                     and $projection.WorkCenterTypeCode   = _MainWorkCenter.WorkCenterTypeCode
  association [1..1] to I_WorkCenterType              as _WorkCenterType             on  $projection.WorkCenterTypeCode = _WorkCenterType.WorkCenterTypeCode
  association [0..1] to I_MaintenanceActivityType     as _MaintenanceActivityType    on  $projection.MaintenanceActivityType = _MaintenanceActivityType.MaintenanceActivityType
  association [0..*] to I_PlantMaintenancePartner     as _MaintenancePartner         on  $projection.MaintenanceOrderInternalID = _MaintenancePartner.MaintObjectInternalID
  association [0..1] to I_BusinessArea                as _BusinessArea               on  $projection.BusinessArea = _BusinessArea.BusinessArea
  association [0..1] to I_FunctionalArea              as _FunctionalArea             on  $projection.FunctionalArea = _FunctionalArea.FunctionalArea
  association [0..1] to I_MaintenancePlannerGroup     as _MaintenancePlannerGroup    on  $projection.MaintenancePlannerGroup  = _MaintenancePlannerGroup.MaintenancePlannerGroup
                                                                                     and $projection.MaintenancePlanningPlant = _MaintenancePlannerGroup.MaintenancePlanningPlant
  association [0..1] to I_MaintenanceOrderPhase       as _MaintenanceOrderPhase      on  $projection.MaintenanceProcessingPhase = _MaintenanceOrderPhase.MaintenanceProcessingPhase
  association [0..1] to I_StatusObject                as _StatusObject               on  $projection.MaintenanceOrderInternalID = _StatusObject.StatusObject
  association [1..*] to I_StatusObjectStatus          as _StatusObjectStatus         on  $projection.MaintenanceOrderInternalID = _StatusObjectStatus.StatusObject
  association [0..1] to I_MaintOperationSystCondition as _OperationSystemCondition   on  $projection.OperationSystemCondition = _OperationSystemCondition.OperationSystemCondition
  association [0..1] to I_Indicator                   as _OrderHasLongText           on  $projection.OrderHasLongText = _OrderHasLongText.IndicatorValue
  association [0..1] to I_MaintOrdPlngDegreeCode      as _MaintOrdPlngDegreeCode     on  $projection.MaintenanceOrderPlanningCode = _MaintOrdPlngDegreeCode.MaintenanceOrderPlanningCode
  association [0..1] to I_MaintenanceRevision         as _MaintenanceRevision        on  $projection.MaintenancePlanningPlant = _MaintenanceRevision.MaintenancePlanningPlant
                                                                                     and $projection.MaintenanceRevision      = _MaintenanceRevision.MaintenanceRevision
  association [0..1] to I_MaintOrderTypeControlParam  as _MaintOrderTypeControlParam on  $projection.MaintenanceOrderType = _MaintOrderTypeControlParam.OrderType
  association [0..*] to I_StatusObjectActiveStatus    as _StatusObjectActiveStatus   on  $projection.MaintenanceOrderInternalID = _StatusObjectActiveStatus.StatusObject
  association [0..1] to I_User                        as _CreatedByUser              on  $projection.CreatedByUser = _CreatedByUser.UserID
  association [0..*] to I_MaintenanceItemObject       as _MaintenanceItemObject      on  $projection.MaintenanceItemObjectList = _MaintenanceItemObject.MaintenanceItemObjectList
  association [0..*] to I_MaintenanceOrderObjectList  as _MaintenanceOrderObjectList on  $projection.MaintenanceOrderObjectList = _MaintenanceOrderObjectList.MaintenanceOrderObjectList
  association [0..1] to I_OrderProcessingGroup        as _OrderProcessingGroup       on  $projection.ControllingArea      = _OrderProcessingGroup.ControllingArea
                                                                                     and $projection.OrderProcessingGroup = _OrderProcessingGroup.OrderProcessingGroup
  association [0..1] to I_WBSElementByInternalKey     as _WBSElement                 on  $projection.WBSElementInternalID = _WBSElement.WBSElementInternalID
  association [0..1] to I_ProjectByInternalKey        as _Project                    on  $projection.ProjectInternalID = _Project.ProjectInternalID
  association [0..*] to I_CostCenterText              as _ResponsibleCostCenterText  on  $projection.ControllingArea                  = _ResponsibleCostCenterText.ControllingArea
                                                                                     and $projection.ResponsibleCostCenter            = _ResponsibleCostCenterText.CostCenter
                                                                                     and _ResponsibleCostCenterText.ValidityStartDate <= $session.system_date
                                                                                     and _ResponsibleCostCenterText.ValidityEndDate   >= $session.system_date
  association [0..1] to I_PMContactCardEmployee       as _PMContactEmployee          on  $projection.PersonnelNumber = _PMContactEmployee.PersonnelNumber
  association [0..1] to I_PersonWorkAgreement_1       as _PersonWorkAgreement        on  $projection.PersonnelNumber = _PersonWorkAgreement.PersonWorkAgreement
  association [0..1] to I_MaintOrderHasOpenMainWork   as _MaintOrderHasOpenMainWork  on  $projection.MaintenanceOrder = _MaintOrderHasOpenMainWork.MaintenanceOrder
  association [0..1] to E_MaintenanceOrder            as _MaintenanceOrderExtension  on  $projection.MaintenanceOrder = _MaintenanceOrderExtension.MaintenanceOrder
  association [0..1] to I_MaintenancePlanPlant        as _MaintenancePlanPlant       on  $projection.MaintenancePlanningPlant = _MaintenancePlanPlant.MaintenancePlanningPlant
  association [0..1] to I_EAMProcessPhase             as _EAMProcessPhase            on  $projection.MaintOrdProcessPhaseCode = _EAMProcessPhase.EAMProcessPhaseCode
  association [0..1] to I_EAMProcessSubPhase          as _EAMProcessSubPhase         on  $projection.MaintOrdProcessSubPhaseCode = _EAMProcessSubPhase.EAMProcessSubPhaseCode
  association [0..1] to I_CtrlgObjectSettlementRule   as _CtrlgObjectSettlementRule  on  $projection.MaintenanceOrderInternalID = _CtrlgObjectSettlementRule.ControllingObject
  association [0..1] to I_CostingSheetProcedure       as _CostingSheetProcedure      on  $projection.ConditionUsage       = _CostingSheetProcedure.ConditionUsage
                                                                                     and $projection.ConditionApplication = _CostingSheetProcedure.ConditionApplication
                                                                                     and $projection.CostingSheet         = _CostingSheetProcedure.CostingSheetProcedure
  association [0..1] to I_InternalOrderOverheadCodeVH as _OverheadCode               on  $projection.MaintenanceOrderOverheadCode = _OverheadCode.OverheadCode
  association [1..1] to I_CostingVariant              as _PlannedCostingVariant      on  $projection.PlannedCostsCostingVariant = _PlannedCostingVariant.CostingVariant
  association [1..1] to I_CostingVariant              as _ActualCostingVariant       on  $projection.ActualCostsCostingVariant = _ActualCostingVariant.CostingVariant
  association [1..1] to I_BillableControl              as _BillableControl           on  $projection.AccountingIndicatorCode = _BillableControl.BillableControl
  association [0..1] to I_WrkPmtMaintOrderRelevance   as _WrkPmtMaintOrderRelevance  on  $projection.MaintenanceOrderInternalID = _WrkPmtMaintOrderRelevance.MaintenanceOrderInternalID 
{
      @ObjectModel.text.element:  [ 'MaintenanceOrderDesc' ]
  key afih.aufnr                                                         as MaintenanceOrder,

      @ObjectModel.foreignKey.association: '_MaintenancePriorityType'
      afih.artpr                                                         as MaintPriorityType,

      @ObjectModel.foreignKey.association: '_MaintenancePriority'
      afih.priok                                                         as MaintPriority,

      @ObjectModel.foreignKey.association: '_MaintenanceOrderPhase'
      afih.iphas                                                         as MaintenanceProcessingPhase,

      @ObjectModel.foreignKey.association: '_LocationAccountAssignment'
      afih.iloan                                                         as MaintObjectLocAcctAssgmtNmbr,

      //--[ GENERATED:012:GFBfhxvv7kY4nH9{xKJeWG

      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_MaintNotifStdVH',
                     element: 'MaintenanceNotification' }
        }]
      // ]--GENERATED

      @ObjectModel.foreignKey.association: '_MaintenanceNotification'
      afih.qmnum                                                         as MaintenanceNotification,

      //--[ GENERATED:012:GFBfhxvv7kY4nH9{xKJeWG

      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_EquipmentStdVH',
                     element: 'Equipment' }
        }]
      // ]--GENERATED

      @ObjectModel.foreignKey.association: '_Equipment'
      afih.equnr                                                         as Equipment,

      //--[ GENERATED:012:GFBfhxvv7kY4nH9{xKJeWG

      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_MaterialStdVH',
                     element: 'Material' }
        }]
      // ]--GENERATED

      @ObjectModel.foreignKey.association: '_Assembly'
      afih.bautl                                                         as Assembly,

      afih.serialnr                                                      as SerialNumber,

      @ObjectModel.foreignKey.association: '_MaintenancePlanPlant'
      afih.iwerk                                                         as MaintenancePlanningPlant,

      //--[ GENERATED:012:GFBfhxvv7kY4nH9{xKJeWG

      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_MaintPlnrGrpStdVH',
                     element: 'MaintenancePlannerGroup' },
          additionalBinding: [{ localElement: 'MaintenancePlanningPlant',
                                element: 'MaintenancePlanningPlant' }]
        }]
      // ]--GENERATED

      @ObjectModel.foreignKey.association: '_MaintenancePlannerGroup'
      afih.ingpr                                                         as MaintenancePlannerGroup,

      //--[ GENERATED:012:GFBfhxvv7kY4nH9{xKJeWG

      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_MaintenanceRevisionStdVH',
                     element: 'MaintenanceRevision' },
          additionalBinding: [{ localElement: 'MaintenancePlanningPlant',
                                element: 'MaintenancePlanningPlant' }]
        }]
      // ]--GENERATED

      @ObjectModel.foreignKey.association: '_MaintenanceRevision'
      afih.revnr                                                         as MaintenanceRevision,
      //--[ GENERATED:012:GFBfhxvv7kY4nH9{xKJeWG

      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_MaintenancePlanStdVH',
                     element: 'MaintenancePlan' }
        }]
      // ]--GENERATED

      @ObjectModel.foreignKey.association: '_MaintenancePlan'
      afih.warpl                                                         as MaintenancePlan,

      //--[ GENERATED:012:GFBfhxvv7kY4nH9{xKJeWG

      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_MaintenanceItemStdVH',
                     element: 'MaintenanceItem' }
        }]
      // ]--GENERATED

      @ObjectModel.foreignKey.association: '_MaintenanceItem'
      afih.wapos                                                         as MaintenanceItem,

      //--[ GENERATED:012:GFBfhxvv7kY4nH9{xKJeWG

      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_MaintActyTypeStdVH',
                     element: 'MaintenanceActivityType' }
        }]
      // ]--GENERATED

      @ObjectModel.foreignKey.association: '_MaintenanceActivityType'
      cast( afih.ilart as eam_maint_activity_type preserving type )      as MaintenanceActivityType,

      @ObjectModel.foreignKey.association: '_MainWorkCenter'
      afih.gewrk                                                         as WorkCenterInternalID,

      @ObjectModel.foreignKey.association: '_WorkCenterType'
      afih.pm_objty                                                      as WorkCenterTypeCode,

      afih.addat                                                         as MaintOrderReferenceDate,
      afih.aduhr                                                         as MaintOrderReferenceTime,

      afih.mainworkcompleteddatetime                                     as MainWorkCompletedDateTime,

      @ObjectModel.foreignKey.association: '_MaintOrdPlngDegreeCode'
      afih.plknz                                                         as MaintenanceOrderPlanningCode,

      @ObjectModel.foreignKey.association: '_OperationSystemCondition'
      afih.anlzu                                                         as OperationSystemCondition,

      afih.adpsp                                                         as ReferenceElement,

      afih.obknr                                                         as MaintenanceItemObjectList,

      cast(afih.obknr  as objknr)                                        as MaintenanceOrderObjectList,

      afih.aning                                                         as PersonnelNumber,
      /* Fields to be renamed from I_LogisticsOrder (AUFK, AFKO) */

      afih.maintordprocmtintegscenario                                   as MaintOrdProcmtIntegScenario,

      afih.sermat                                                        as Material,

      afko.aufpl                                                         as MaintOrderRoutingNumber,

      @ObjectModel.foreignKey.association: '_BusinessArea'
      aufk.gsber                                                         as BusinessArea,
      @ObjectModel.foreignKey.association: '_FunctionalArea'
      aufk.func_area                                                     as FunctionalArea,

      @ObjectModel.foreignKey.association: '_MaintenanceOrderType'
      aufk.auart                                                         as MaintenanceOrderType,

      @ObjectModel.foreignKey.association: '_MaintenanceOrderCategory'
      aufk.autyp                                                         as MaintenanceOrderCategory,

      @Semantics.text: true
      aufk.ktext                                                         as MaintenanceOrderDesc,

      @ObjectModel.foreignKey.association: '_ControllingArea'
      aufk.kokrs                                                         as ControllingArea,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_CompanyCodeStdVH', element: 'CompanyCode' } } ]
      @ObjectModel.foreignKey.association: '_CompanyCode'
      aufk.bukrs                                                         as CompanyCode,

      @ObjectModel.foreignKey.association: '_ResponsibleCostCenter'
      @ObjectModel.text.association: '_ResponsibleCostCenterText'
      cast(aufk.kostv as pph_kostl preserving type)                      as ResponsibleCostCenter,

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_ProfitCenterStdVH', element: 'ProfitCenter' } } ]
      @ObjectModel.foreignKey.association: '_ProfitCenter'
      aufk.prctr                                                         as ProfitCenter,

      @ObjectModel.foreignKey.association: '_ControllingObjectClass'
      cast(aufk.scope as pph_scope preserving type)                      as ControllingObjectClass,

      aufk.idat2                                                         as TechnicalCompletionDate,

      @ObjectModel.foreignKey.association: '_BasicSchedulingType'
      afko.terkz                                                         as BasicSchedulingType,

      afko.nauterm                                                       as OrdIsNotSchedldAutomatically,

      afko.gstrp                                                         as MaintOrdBasicStartDate,
      afko.gsuzp                                                         as MaintOrdBasicStartTime,

      afko.gltrp                                                         as MaintOrdBasicEndDate,
      afko.gluzp                                                         as MaintOrdBasicEndTime,

      afko.gstrs                                                         as ScheduledBasicStartDate,
      afko.gsuzs                                                         as ScheduledBasicStartTime,
      afko.gltrs                                                         as ScheduledBasicEndDate,
      afko.gluzs                                                         as ScheduledBasicEndTime,

      afih.maintordpersonresponsible                                     as MaintOrdPersonResponsible,

      aufk.objnr                                                         as MaintenanceOrderInternalID,

      cast(afko.plnnr as billofoperations           preserving type)     as TaskListGroup,
      cast(afko.plnty as billofoperationstype           preserving type) as TaskListType,
      cast(afko.plnal as billofoperationsvariant    preserving type)     as TaskListGroupCounter,

      @ObjectModel.foreignKey.association: '_LocationPlant'
      aufk.sowrk                                                         as MaintenancePlant,

      @Semantics.systemDate.createdAt: true
      aufk.erdat                                                         as CreationDate,
      @Semantics.systemTime.createdAt: true
      aufk.erfzeit                                                       as CreationTime,
      @Semantics.user.createdBy: true
      aufk.ernam                                                         as CreatedByUser,

      @ObjectModel.foreignKey.association: '_OrderHasLongText'
      cast( case when aufk.ltext = '' then ''
                 else 'X' end as pph_aufltxt preserving type)            as OrderHasLongText,

      @Semantics.user.lastChangedBy: true
      aufk.aenam                                                         as LastChangeByUser,
      @ObjectModel.readOnly: true
      afih.changeddatetime                                               as LastChangeDateTime,

      afih.deviceid                                                      as AdditionalDeviceData,

      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_WBSElmntByIntKeyStdVH', element: 'WBSElementInternalID' } } ]
      @ObjectModel.foreignKey.association: '_WBSElement'
      cast( aufk.pspel as vdm_wbs_element_internal preserving type )     as WBSElementInternalID,
      @Consumption.valueHelpDefinition: [ { entity: { name: 'I_ProjectByInternalKeyStdVH', element: 'ProjectInternalID' } } ]
      @ObjectModel.foreignKey.association: '_Project'
      afko.pronr                                                         as ProjectInternalID,
      @ObjectModel.foreignKey.association: '_OrderProcessingGroup'
      aufk.abkrs                                                         as OrderProcessingGroup,
      afko.aufnt                                                         as SuperiorProjectNetwork,
      aufk.vaplz                                                         as MainWorkCenter,
      aufk.wawrk                                                         as MainWorkCenterPlant,
      aufk.kalsm                                                         as CostingSheet,
      aufk.waers                                                         as Currency,

      cast(afih.lacd_date as vdm_lacd_date preserving type )             as LatestAcceptableCompletionDate,

      @ObjectModel.foreignKey.association: '_EAMProcessPhase'
      afih.maintordovrlprocphase                                         as MaintOrdProcessPhaseCode,
      @ObjectModel.foreignKey.association: '_EAMProcessSubPhase'
      afih.maintordovrlprocsubphase                                      as MaintOrdProcessSubPhaseCode,

      afih.maintorderprocessingcontext                                   as MaintOrderProcessingContext,
      afih.service_doc_type                                              as ServiceDocumentType,
      afih.service_doc_id                                                as ServiceDocument,
      afih.service_doc_item_id                                           as ServiceDocumentItem,
      /* Control Parameters*/
      aufk.kvewe                                                         as ConditionUsage,
      aufk.kappl                                                         as ConditionApplication,
      aufk.zschl                                                         as MaintenanceOrderOverheadCode,
      afko.klvarp                                                        as PlannedCostsCostingVariant,
      afko.klvari                                                        as ActualCostsCostingVariant,
      /* maintenance plan */
      afih.abnum                                                         as MaintenanceCall,
      afih.laufn                                                         as LeadingOrder,
      afih.old_lacd_date                                                 as PrevLtstAccptblCompletionDate,
      aufk.rsord                                                         as OrderIsRefurbishmentOrder,
      aufk.bemot                                                         as AccountingIndicatorCode,
      
      _Order,
      _MaintenanceOrderCategory,
      _MaintenanceOrderType,
      _ControllingArea,
      _ResponsibleCostCenter,
      _LocationPlant,
      _BasicSchedulingType,
      _LocationAccountAssignment,
      _MaintenanceNotification,
      _Equipment,
      _CompanyCode,
      _MaintenancePlan,
      _MaintenanceItem,
      _MaintenanceCall,
      _LeadingOrder,
      _OrderItem,
      _MaintenanceTaskList,
      _MaintenancePriorityType,
      _MaintenancePriority,
      _MaintenanceOrderPhase,
      _StatusObject,
      _MaintenanceOrderOperation,
      _MaintenanceOrderComponent,
      _MainWorkCenter,
      _BusinessArea,
      _FunctionalArea,
      _MaintenancePartner,
      _MaintenanceActivityType,
      _MaintenancePlannerGroup,
      _StatusObjectStatus,
      _MaintenancePlanningPlant,
      _Assembly,
      _OperationSystemCondition,
      _MaintenanceOrderCost,
      _WorkCenterType,
      _OrderHasLongText,
      _MaintOrdPlngDegreeCode,
      _MaintenanceRevision,
      _MaintOrderTypeControlParam,
      _StatusObjectActiveStatus,
      _CreatedByUser,
      _MaintenanceItemObject,
      _ResponsibleCostCenterText,
      _ProfitCenter,
      _ControllingObjectClass,
      _OrderProcessingGroup,
      _WBSElement,
      _Project,
      _PMContactEmployee,
      _PersonWorkAgreement,
      _MaintOrderHasOpenMainWork,
      _MaintenancePlanPlant,
      _MaintenanceOrderObjectList,
      _EAMProcessPhase,
      _EAMProcessSubPhase,
      _CtrlgObjectSettlementRule,
      _CostingSheetProcedure,
      _OverheadCode,
      _PlannedCostingVariant,
      _ActualCostingVariant,
      _BillableControl,
      _WrkPmtMaintOrderRelevance
}