I_MaintenanceOrderOperation

DDL: I_MAINTENANCEORDEROPERATION SQL: IMAINTORDOP Type: view BASIC

Maintenance Order Operation

I_MaintenanceOrderOperation is a Basic CDS View that provides data about "Maintenance Order Operation" in SAP S/4HANA. It reads from 1 data source (afvc) and exposes 85 fields with key fields MaintenanceOrder, MaintenanceOrderOperation. It has 27 associations to related views.

Data Sources (1)

SourceAliasJoin Type
afvc afvc from

Associations (27)

CardinalityTargetAliasCondition
[1..1] I_MaintOrderOperPlanningValues _OperationPlanningValues $projection.MaintOrderRoutingNumber = _OperationPlanningValues.MaintOrderRoutingNumber and $projection.MaintOrderOperationCounter = _OperationPlanningValues.MaintOrderOperationCounter
[0..1] I_MaintenanceOrder _MaintenanceOrder $projection.MaintenanceOrder = _MaintenanceOrder.MaintenanceOrder
[0..*] I_MaintenanceOrderComponent_2 _MaintenanceOrderComponent $projection.MaintenanceOrder = _MaintenanceOrderComponent.MaintenanceOrder and $projection.MaintOrderRoutingNumber = _MaintenanceOrderComponent.MaintOrderRoutingNumber and $projection.MaintOrderOperationCounter = _MaintenanceOrderComponent.MaintOrderOperationCounter
[0..*] I_MaintenanceOrderSubOperation _MaintenanceOrderSubOperation $projection.MaintenanceOrder = _MaintenanceOrderSubOperation.MaintenanceOrder and $projection.MaintenanceOrderOperation = _MaintenanceOrderSubOperation.MaintenanceOrderOperation
[0..1] I_WorkCenter _WorkCenter $projection.OperationWorkCenterInternalID = _WorkCenter.WorkCenterInternalID and $projection.OperationWorkCenterTypeCode = _WorkCenter.WorkCenterTypeCode
[0..1] I_Currency _OpExternalProcessingCurrency $projection.OpExternalProcessingCurrency = _OpExternalProcessingCurrency.Currency
[0..1] I_StatusObject _StatusObject $projection.MaintOrderOperationInternalID = _StatusObject.StatusObject
[0..1] I_OperationControlProfile _OperationControlKey $projection.OperationControlKey = _OperationControlKey.OperationControlProfile
[0..1] I_MaintOperationSystCondition _OperationSystemCondition $projection.OperationSystemCondition = _OperationSystemCondition.OperationSystemCondition
[0..1] I_Plant _Plant $projection.Plant = _Plant.Plant
[0..1] I_OperationCalculationControl _OperationCalculationControl $projection.OperationCalculationControl = _OperationCalculationControl.OperationCalculationControl
[0..1] I_Material _Assembly $projection.Assembly = _Assembly.Material
[0..1] I_Language _Language $projection.Language = _Language.Language
[0..1] I_Indicator _OperationHasLongText $projection.OperationHasLongText = _OperationHasLongText.IndicatorValue
[0..*] I_StatusObjectActiveStatus _StatusObjectActiveStatus $projection.MaintOrderOperationInternalID = _StatusObjectActiveStatus.StatusObject
[0..1] I_Supplier _Supplier $projection.OperationSupplier = _Supplier.Supplier
[0..1] I_Equipment _Equipment $projection.Equipment = _Equipment.Equipment
[0..1] I_FunctionalLocation _FunctionalLocation $projection.FunctionalLocation = _FunctionalLocation.FunctionalLocation --
[0..1] I_Employment _PersonResponsible $projection.OperationPersonResponsible = _PersonResponsible.EmploymentInternalID
[0..1] I_MaintenanceOrderConfirmation _MaintenanceOrderConf $projection.MaintOrderConfirmation = _MaintenanceOrderConf.MaintOrderConf and $projection.MaintOrderConfCntrValue = _MaintenanceOrderConf.MaintOrderConfCntrValue
[0..*] I_OrderProdnResourceTool _MaintOrderProdnRsceTool _MaintOrderProdnRsceTool.OrderInternalBillOfOperations = $projection.MaintOrderRoutingNumber and _MaintOrderProdnRsceTool.OrderIntBillOfOperationsItem = $projection.MaintOrderOperationCounter
[0..*] I_CostCenterActivityTypeText _CostCenterActivityTypeText $projection.ControllingArea = _CostCenterActivityTypeText.ControllingArea and $projection.CostCtrActivityType = _CostCenterActivityTypeText.CostCtrActivityType
[0..1] I_PMContactCardEmployee _PMContactEmployee $projection.OperationPersonResponsible = _PMContactEmployee.PersonnelNumber
[0..1] I_WorkAssignment _WorkAssignment $projection.OperationPersonResponsible = _WorkAssignment.WorkAssignment
[1..1] I_MaintOperationExecStageCode _MaintOperationExecStageCode $projection.MaintOperationExecStageCode = _MaintOperationExecStageCode.MaintOperationExecStageCode
[0..1] I_EAMProcessPhase _EAMProcessPhase $projection.MaintOrdOpProcessPhaseCode = _EAMProcessPhase.EAMProcessPhaseCode
[0..1] I_EAMProcessSubPhase _EAMProcessSubPhase $projection.MaintOrdOpProcessSubPhaseCode = _EAMProcessSubPhase.EAMProcessSubPhaseCode

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName IMAINTORDOP view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Maintenance Order Operation view
VDM.viewType #BASIC view
ObjectModel.representativeKey MaintenanceOrderOperation view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #XL view

Fields (85)

KeyFieldSource TableSource FieldDescription
KEY MaintenanceOrder afko aufnr
KEY MaintenanceOrderOperation afvc vornr Operation
MaintenanceOrderSubOperation
MaintOrderRoutingNumber afvc aufpl
MaintOrderOperationCounter afvc aplzl
Plant afvc werks
OperationWorkCenterTypeCode
OperationWorkCenterInternalID afvc arbid
OperationControlKey afvc steus
OperationDescription afvc ltxa1
OperationStandardTextCode afvc ktsch
Language
NumberOfTimeTickets afvc loanz
OperationPurgInfoRecdSearchTxt afvc sortl
OperationSupplier afvc lifnr
OpExternalProcessingPrice afvc preis
OpExternalProcessingPriceUnit afvc peinh
CostElement afvc sakto
OpExternalProcessingCurrency afvc waers
OperationPurchasingInfoRecord afvc infnr
PurchasingOrganization afvc ekorg
PurchasingGroup afvc ekgrp
MaterialGroup afvc matkl
OpPurchaseOutlineAgreement
OpPurchaseOutlineAgreementItem
OperationRequisitionerName afvc afnam
OperationTrackingNumber afvc bednr
NumberOfCapacities afvc anzzl
OperationWorkPercent afvc prznt
OperationCalculationControl afvc indet
ActivityType afvc larnt
OperationSystemCondition afvc anlzu
OperationGoodsRecipientName afvc wempf
OperationUnloadingPointName afvc ablad
OperationPersonResponsible afvc pernr
Equipment afvc equnr
FunctionalLocation afvc tplnr
BusinessArea afvc gsber
ProfitCenter afvc prctr
CostingSheet afvc kalsm
TaxJurisdiction afvc txjcd
FunctionalArea afvc func_area
Assembly afvc istru
MaintOperationExecStageCode
CostCtrActivityType afvc larnt
ReqgCostCenterControllingArea afvc anfkokrs
CapacityRequirement afvc bedid
CapacityRequirementItem afvc bedzl
PurchaseRequisition afvc banfn
MaintOrderOperationInternalID afvc objnr
PurchaseRequisitionItem afvc bnfpo
MaintOrderConfirmation afvc rueck
OperationMilestoneUsageCode afvc mlstn
MaintOrderConfCntrValue afvc rmzhl
kokrsasControllingArea
MaintOrdOpProcessPhaseCode afvc maintordopprocessphasecode
MaintOrdOpProcessSubPhaseCode afvc maintordopprocesssubphasecode
MaintOperationalChecklistType afvc cl_type
_MaintenanceOrderComponent _MaintenanceOrderComponent
_MaintenanceOrderSubOperation _MaintenanceOrderSubOperation
_MaintenanceOrder _MaintenanceOrder
_StatusObject _StatusObject
_OpExternalProcessingCurrency _OpExternalProcessingCurrency
_OperationPlanningValues _OperationPlanningValues
_WorkCenter _WorkCenter
_OperationControlKey _OperationControlKey
_OperationSystemCondition _OperationSystemCondition
_Plant _Plant
_OperationCalculationControl _OperationCalculationControl
_Assembly _Assembly
_Language _Language
_OperationHasLongText _OperationHasLongText
_StatusObjectActiveStatus _StatusObjectActiveStatus
_Supplier _Supplier
_PersonResponsible _PersonResponsible
_FunctionalLocation _FunctionalLocation
_Equipment _Equipment
_MaintenanceOrderConf _MaintenanceOrderConf
_MaintOrderProdnRsceTool _MaintOrderProdnRsceTool
_CostCenterActivityTypeText _CostCenterActivityTypeText
_PMContactEmployee _PMContactEmployee
_WorkAssignment _WorkAssignment
_MaintOperationExecStageCode _MaintOperationExecStageCode
_EAMProcessPhase _EAMProcessPhase
_EAMProcessSubPhase _EAMProcessSubPhase
@AbapCatalog.sqlViewName: 'IMAINTORDOP'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #('TRANSACTIONAL_DATA')
@EndUserText.label: 'Maintenance Order Operation'
@VDM.viewType: #BASIC

@ObjectModel.representativeKey: 'MaintenanceOrderOperation'
@ObjectModel.semanticKey:  [ 'MaintenanceOrder', 'MaintenanceOrderOperation' ]

@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.sizeCategory: #XL
@AccessControl.privilegedAssociations: ['_StatusObjectActiveStatus']


define view I_MaintenanceOrderOperation
  as select from           afvc as afvc
  //    inner join   afvv as afvv on  afvc.aufpl = afvv.aufpl

  //                              and afvc.aplzl = afvv.aplzl

  //    inner join   afvu as afvu on  afvc.aufpl = afvu.aufpl

  //                              and afvc.aplzl = afvu.aplzl

    left outer to one join afko as afko on afvc.aufpl = afko.aufpl
    left outer to one join aufk as aufk on aufk.aufnr = afko.aufnr
  //inner join   afih         on afko.aufnr = afih.aufnr -- covered with plnaw = 'I'


  // suboperations are also in AFVC. To find out which main operation number they belong to, need to self-join -- unused

  //  left outer join afvc as afvc_top on  afvc_top.aufpl = afvc.aufpl

  //                                   and afvc_top.aplzl = afvc.sumnr


  association [1..1] to I_MaintOrderOperPlanningValues as _OperationPlanningValues      on  $projection.MaintOrderRoutingNumber    = _OperationPlanningValues.MaintOrderRoutingNumber
                                                                                        and $projection.MaintOrderOperationCounter = _OperationPlanningValues.MaintOrderOperationCounter
  association [0..1] to I_MaintenanceOrder             as _MaintenanceOrder             on  $projection.MaintenanceOrder = _MaintenanceOrder.MaintenanceOrder
  association [0..*] to I_MaintenanceOrderComponent_2  as _MaintenanceOrderComponent    on  $projection.MaintenanceOrder           = _MaintenanceOrderComponent.MaintenanceOrder
                                                                                        and $projection.MaintOrderRoutingNumber    = _MaintenanceOrderComponent.MaintOrderRoutingNumber
                                                                                        and $projection.MaintOrderOperationCounter = _MaintenanceOrderComponent.MaintOrderOperationCounter
  association [0..*] to I_MaintenanceOrderSubOperation as _MaintenanceOrderSubOperation on  $projection.MaintenanceOrder          = _MaintenanceOrderSubOperation.MaintenanceOrder
                                                                                        and $projection.MaintenanceOrderOperation = _MaintenanceOrderSubOperation.MaintenanceOrderOperation
  association [0..1] to I_WorkCenter                   as _WorkCenter                   on  $projection.OperationWorkCenterInternalID = _WorkCenter.WorkCenterInternalID
                                                                                        and $projection.OperationWorkCenterTypeCode   = _WorkCenter.WorkCenterTypeCode
  association [0..1] to I_Currency                     as _OpExternalProcessingCurrency on  $projection.OpExternalProcessingCurrency = _OpExternalProcessingCurrency.Currency
  association [0..1] to I_StatusObject                 as _StatusObject                 on  $projection.MaintOrderOperationInternalID = _StatusObject.StatusObject
  association [0..1] to I_OperationControlProfile      as _OperationControlKey          on  $projection.OperationControlKey = _OperationControlKey.OperationControlProfile
  association [0..1] to I_MaintOperationSystCondition  as _OperationSystemCondition     on  $projection.OperationSystemCondition = _OperationSystemCondition.OperationSystemCondition
  association [0..1] to I_Plant                        as _Plant                        on  $projection.Plant = _Plant.Plant
  association [0..1] to I_OperationCalculationControl  as _OperationCalculationControl  on  $projection.OperationCalculationControl = _OperationCalculationControl.OperationCalculationControl
  association [0..1] to I_Material                     as _Assembly                     on  $projection.Assembly = _Assembly.Material
  association [0..1] to I_Language                     as _Language                     on  $projection.Language = _Language.Language
  association [0..1] to I_Indicator                    as _OperationHasLongText         on  $projection.OperationHasLongText = _OperationHasLongText.IndicatorValue
  association [0..*] to I_StatusObjectActiveStatus     as _StatusObjectActiveStatus     on  $projection.MaintOrderOperationInternalID = _StatusObjectActiveStatus.StatusObject
  association [0..1] to I_Supplier                     as _Supplier                     on  $projection.OperationSupplier = _Supplier.Supplier
  association [0..1] to I_Equipment                    as _Equipment                    on  $projection.Equipment = _Equipment.Equipment
  association [0..1] to I_FunctionalLocation           as _FunctionalLocation           on  $projection.FunctionalLocation = _FunctionalLocation.FunctionalLocation
  --association [0..1] to I_Employment                   as _PersonResponsible            on  $projection.OperationPersonResponsible = _PersonResponsible.EmploymentInternalID
  association [0..1] to I_PersonWorkAgreement_1        as _PersonResponsible            on  $projection.OperationPersonResponsible = _PersonResponsible.PersonWorkAgreement

  association [0..1] to I_MaintenanceOrderConfirmation as _MaintenanceOrderConf         on  $projection.MaintOrderConfirmation  = _MaintenanceOrderConf.MaintOrderConf
                                                                                        and $projection.MaintOrderConfCntrValue = _MaintenanceOrderConf.MaintOrderConfCntrValue
  association [0..*] to I_OrderProdnResourceTool       as _MaintOrderProdnRsceTool      on  _MaintOrderProdnRsceTool.OrderInternalBillOfOperations = $projection.MaintOrderRoutingNumber
                                                                                        and _MaintOrderProdnRsceTool.OrderIntBillOfOperationsItem  = $projection.MaintOrderOperationCounter
  association [0..*] to I_CostCenterActivityTypeText   as _CostCenterActivityTypeText   on  $projection.ControllingArea     = _CostCenterActivityTypeText.ControllingArea
                                                                                        and $projection.CostCtrActivityType = _CostCenterActivityTypeText.CostCtrActivityType
  association [0..1] to I_PMContactCardEmployee        as _PMContactEmployee            on  $projection.OperationPersonResponsible = _PMContactEmployee.PersonnelNumber
  association [0..1] to I_WorkAssignment               as _WorkAssignment               on  $projection.OperationPersonResponsible = _WorkAssignment.WorkAssignment
  association [1..1] to I_MaintOperationExecStageCode  as _MaintOperationExecStageCode  on  $projection.MaintOperationExecStageCode = _MaintOperationExecStageCode.MaintOperationExecStageCode

  association [0..1] to I_EAMProcessPhase              as _EAMProcessPhase              on  $projection.MaintOrdOpProcessPhaseCode = _EAMProcessPhase.EAMProcessPhaseCode
  association [0..1] to I_EAMProcessSubPhase           as _EAMProcessSubPhase           on  $projection.MaintOrdOpProcessSubPhaseCode = _EAMProcessSubPhase.EAMProcessSubPhaseCode

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

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

      @ObjectModel.foreignKey.association: '_MaintenanceOrder'
  key afko.aufnr                                                                    as MaintenanceOrder,
      @EndUserText.label: 'Operation'
      @ObjectModel.text.element: ['OperationDescription']
  key afvc.vornr                                                                    as MaintenanceOrderOperation,
      '0000'                                                                        as MaintenanceOrderSubOperation,
      afvc.aufpl                                                                    as MaintOrderRoutingNumber,
      afvc.aplzl                                                                    as MaintOrderOperationCounter,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_PlantStdVH',
                     element: 'Plant' }
        }]
      @ObjectModel.foreignKey.association: '_Plant'
      afvc.werks                                                                    as Plant,
      'A'                                                                           as OperationWorkCenterTypeCode,
      afvc.arbid                                                                    as OperationWorkCenterInternalID,
      @ObjectModel.foreignKey.association: '_OperationControlKey'
      afvc.steus                                                                    as OperationControlKey,
      @Semantics.text
      afvc.ltxa1                                                                    as OperationDescription,
      afvc.ktsch                                                                    as OperationStandardTextCode,
      @ObjectModel.foreignKey.association: '_Language'
      cast(afvc.txtsp as spras)                                                     as Language,
      afvc.loanz                                                                    as NumberOfTimeTickets,
      //      afvc.loart                                                                    as WageType,

      //      afvc.qualf                                                                    as Suitability,

      //      afvc.logrp                                                                    as WageGroup,

      afvc.sortl                                                                    as OperationPurgInfoRecdSearchTxt,
      //--[ GENERATED:012:GFBfhxvv7kY4nH9{xKJeWG

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

      @ObjectModel.foreignKey.association: '_Supplier'
      afvc.lifnr                                                                    as OperationSupplier,
      //      @Semantics.quantity.unitOfMeasure: 'OperationBaseUnitOfMeasure'

      //      afvv.bmsch                                                                    as OperationQuantity,

      //      @Semantics.unitOfMeasure: true

      //      afvv.meinh                                                                    as OperationBaseUnitOfMeasure,

      @Semantics.amount.currencyCode: 'OpExternalProcessingCurrency'
      @DefaultAggregation: #NONE
      afvc.preis                                                                    as OpExternalProcessingPrice,
      afvc.peinh                                                                    as OpExternalProcessingPriceUnit,
      afvc.sakto                                                                    as CostElement,
      @ObjectModel.foreignKey.association: '_OpExternalProcessingCurrency'
      @Semantics.currencyCode: true
      afvc.waers                                                                    as OpExternalProcessingCurrency,
      afvc.infnr                                                                    as OperationPurchasingInfoRecord,
      afvc.ekorg                                                                    as PurchasingOrganization,
      afvc.ekgrp                                                                    as PurchasingGroup,
      afvc.matkl                                                                    as MaterialGroup,
      cast (afvc.ebeln as konnr)                                                    as OpPurchaseOutlineAgreement,
      cast (afvc.ebelp as ktpnr)                                                    as OpPurchaseOutlineAgreementItem,
      afvc.afnam                                                                    as OperationRequisitionerName,
      afvc.bednr                                                                    as OperationTrackingNumber,
      @DefaultAggregation: #NONE
      afvc.anzzl                                                                    as NumberOfCapacities,
      afvc.prznt                                                                    as OperationWorkPercent,
      afvc.indet                                                                    as OperationCalculationControl,
      afvc.larnt                                                                    as ActivityType,
      afvc.anlzu                                                                    as OperationSystemCondition,
      //afvc.vertl                                                                    as DistrCapReqmts,

      afvc.wempf                                                                    as OperationGoodsRecipientName,
      afvc.ablad                                                                    as OperationUnloadingPointName,
      //--[ GENERATED:012:GFBfhxvv7kY4nH9{xKJeWG

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

      @ObjectModel.foreignKey.association: '_PersonResponsible'
      afvc.pernr                                                                    as OperationPersonResponsible,
      //afvc.fordn                                                                    as FrameworkOrder,

      //afvc.fordp                                                                    as ItemoOfFrameworkOrder,

      //afvv.plifz                                                                    as PlannedDeliveryTimeInDays,

      //@Semantics.quantity.unitOfMeasure: 'NormalDurationUnit'

      //afvv.dauno                                                                    as NormalDurationOfActivity,

      //@Semantics.unitOfMeasure: true

      //afvv.daune                                                                    as NormalDurationUnit,

      //afvv.einsa                                                                    as TypeConstraintStartDate,

      //afvv.einse                                                                    as TypeConstraintFinishDate,

      //@Semantics.quantity.unitOfMeasure: 'UnitForWork'

      //afvv.arbei                                                                    as WorkInvolvedInActivity,

      //      @Semantics.unitOfMeasure: true

      //      afvv.arbeh                                                                    as UnitForWork,

      //      afvv.ntanf                                                                    as ConstraintActivityStartDateBas,

      //      afvv.ntanz                                                                    as ConstraintActivityStartTimeBas,

      //      afvv.ntend                                                                    as ConstraintActivityEndDateBas,

      //      afvv.ntenz                                                                    as ConstraintActivityEndTimeBas,

      //      afvv.aufkt                                                                    as ExecutionFactor,

      // 'Inspection Rounds'-related fields

      afvc.equnr                                                                    as Equipment,
      afvc.tplnr                                                                    as FunctionalLocation, // <-- This is in internal labelling!

      // afvc.frdlb                                                                    as ExtProcOperationSubcontracting,

      //afvu.ilart_op                                                                 as MaintenanceActivityType,

      afvc.gsber                                                                    as BusinessArea,
      //afvc.projn                                                                    as WBSElement,

      afvc.prctr                                                                    as ProfitCenter,
      afvc.kalsm                                                                    as CostingSheet,
      // afvc.zschl                                                                    as Overheadkey,

      afvc.txjcd                                                                    as TaxJurisdiction,
      //afvc.scope                                                                    as ObjectClass,

      afvc.func_area                                                                as FunctionalArea,
      //      @Semantics.quantity.unitOfMeasure: 'UnitForOffsetToStart'

      //      afvv.offstb                                                                   as OffsetToSubOperationStart,

      //      @Semantics.unitOfMeasure: true

      //      afvv.ehoffb                                                                   as UnitForOffsetToStart,

      //      @Semantics.quantity.unitOfMeasure: 'UnitForOffsetToFinish'

      //      afvv.offste                                                                   as OffsetToSubOperationFinish,

      //      @Semantics.unitOfMeasure: true

      //      afvv.ehoffe                                                                   as UnitForOffsetToFinish,

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

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

      @ObjectModel.foreignKey.association: '_Assembly'
      afvc.istru                                                                    as Assembly, //long one - 40 char

      //      afvc.fldlogsdelivisheldonshore                                                as HoldOnShore,

      @ObjectModel.foreignKey.association: '_MaintOperationExecStageCode'
      cast( afvc.maintopexecutionphasecode as eam_premainpost_cds preserving type ) as MaintOperationExecStageCode,
      afvc.larnt                                                                    as CostCtrActivityType,
      afvc.anfkokrs                                                                 as ReqgCostCenterControllingArea,
      afvc.bedid                                                                    as CapacityRequirement,
      afvc.bedzl                                                                    as CapacityRequirementItem,
      afvc.banfn                                                                    as PurchaseRequisition,
      afvc.objnr                                                                    as MaintOrderOperationInternalID,
      afvc.bnfpo                                                                    as PurchaseRequisitionItem,
      afvc.rueck                                                                    as MaintOrderConfirmation,
      afvc.mlstn                                                                    as OperationMilestoneUsageCode,
      afvc.rmzhl                                                                    as MaintOrderConfCntrValue,
      @ObjectModel.foreignKey.association: '_OperationHasLongText'
      cast (
        case afvc.txtsp
            when '' then ''
            else 'X'
      end as xfeld )                                                                as OperationHasLongText,
      -- needed for some associations, e.g. activity type
      aufk.kokrs                                                                    as ControllingArea,
      @ObjectModel.foreignKey.association: '_EAMProcessPhase'
      afvc.maintordopprocessphasecode                                               as MaintOrdOpProcessPhaseCode,
      @ObjectModel.foreignKey.association: '_EAMProcessSubPhase'
      afvc.maintordopprocesssubphasecode                                            as MaintOrdOpProcessSubPhaseCode,
      afvc.cl_type                                                                  as MaintOperationalChecklistType,
      // associations :

      _MaintenanceOrderComponent,
      _MaintenanceOrderSubOperation,
      _MaintenanceOrder,
      _StatusObject,
      _OpExternalProcessingCurrency,
      _OperationPlanningValues,
      _WorkCenter,
      _OperationControlKey,
      _OperationSystemCondition,
      _Plant,
      _OperationCalculationControl,
      _Assembly,
      _Language,
      _OperationHasLongText,
      _StatusObjectActiveStatus,
      _Supplier,
      _PersonResponsible,
      _FunctionalLocation,
      _Equipment,
      _MaintenanceOrderConf,
      _MaintOrderProdnRsceTool,
      _CostCenterActivityTypeText,
      _PMContactEmployee,
      _WorkAssignment,
      _MaintOperationExecStageCode,
      _EAMProcessPhase,
      _EAMProcessSubPhase
}
where
      afvc.sumnr = '00000000'
  and afko.plnaw = 'I'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"AFKO",
"AFVC",
"AUFK"
],
"ASSOCIATED":
[
"I_COSTCENTERACTIVITYTYPETEXT",
"I_CURRENCY",
"I_EAMPROCESSPHASE",
"I_EAMPROCESSSUBPHASE",
"I_EQUIPMENT",
"I_FUNCTIONALLOCATION",
"I_INDICATOR",
"I_LANGUAGE",
"I_MAINTENANCEORDER",
"I_MAINTENANCEORDERCOMPONENT_2",
"I_MAINTENANCEORDERCONFIRMATION",
"I_MAINTENANCEORDERSUBOPERATION",
"I_MAINTOPERATIONEXECSTAGECODE",
"I_MAINTOPERATIONSYSTCONDITION",
"I_MAINTORDEROPERPLANNINGVALUES",
"I_MATERIAL",
"I_OPERATIONCALCULATIONCONTROL",
"I_OPERATIONCONTROLPROFILE",
"I_ORDERPRODNRESOURCETOOL",
"I_PERSONWORKAGREEMENT_1",
"I_PLANT",
"I_PMCONTACTCARDEMPLOYEE",
"I_STATUSOBJECT",
"I_STATUSOBJECTACTIVESTATUS",
"I_SUPPLIER",
"I_WORKASSIGNMENT",
"I_WORKCENTER"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/