I_MAINTENANCEORDERSUBOPERATION

CDS View

Maintenance Order Sub-Operation

I_MAINTENANCEORDERSUBOPERATION is a CDS View in S/4HANA. Maintenance Order Sub-Operation. It contains 63 fields. 3 CDS views read from this table.

CDS Views using this table (3)

ViewTypeJoinVDMDescription
C_MaintOrderSubOperationTP_2 view from CONSUMPTION Maint Order SubOperation Details View
I_MaintOrderSubOperTechObj view from COMPOSITE MaintOrder Sub-Operation w/ Tech. Object
I_MaintOrdSubOpStdVH view from COMPOSITE Maintenance Order Suboperation

Fields (63)

KeyField CDS FieldsUsed in Views
KEY MaintenanceOrder MaintenanceOrder 1
KEY MaintenanceOrderOperation MaintenanceOrderOperation 1
KEY MaintenanceOrderSubOperation MaintenanceOrderSubOperation 1
_Assembly _Assembly 1
_EAMProcessPhase _EAMProcessPhase 1
_EAMProcessSubPhase _EAMProcessSubPhase 1
_Language _Language 1
_MaintOperationExecStageCode _MaintOperationExecStageCode 1
_OperationCalculationControl _OperationCalculationControl 1
_OperationControlKey _OperationControlKey 1
_OperationHasLongText _OperationHasLongText 1
_OperationPlanningValues _OperationPlanningValues 1
_OperationSystemCondition _OperationSystemCondition 1
_OpExternalProcessingCurrency _OpExternalProcessingCurrency 1
_PersonResponsible _PersonResponsible 1
_Plant _Plant 1
_StatusObject _StatusObject 1
_Supplier _Supplier 1
_WorkCenter _WorkCenter 1
Assembly Assembly 1
CapacityRequirement CapacityRequirement 1
CapacityRequirementItem CapacityRequirementItem 1
CostCtrActivityType CostCtrActivityType 1
CostElement CostElement 1
Equipment Equipment 1
FunctionalLocation FunctionalLocation 1
Language Language 1
MaintOperationalChecklistType MaintOperationalChecklistType 1
MaintOperationExecStageCode MaintOperationExecStageCode 1
MaintOrderOperationCounter MaintOrderOperationCounter 1
MaintOrderOperationInternalID MaintOrderOperationInternalID 1
MaintOrderRoutingNumber MaintOrderRoutingNumber 1
MaintOrdOpProcessPhaseCode MaintOrdOpProcessPhaseCode 1
MaintOrdOpProcessSubPhaseCode MaintOrdOpProcessSubPhaseCode 1
MaterialGroup MaterialGroup 1
NumberOfCapacities NumberOfCapacities 1
OperationCalculationControl OperationCalculationControl 1
OperationControlKey OperationControlKey 1
OperationDescription OperationDescription 1
OperationGoodsRecipientName OperationGoodsRecipientName 1
OperationHasLongText OperationHasLongText 1
OperationPersonResponsible OperationPersonResponsible 1
OperationPurchasingInfoRecord OperationPurchasingInfoRecord 1
OperationPurgInfoRecdSearchTxt OperationPurgInfoRecdSearchTxt 1
OperationRequisitionerName OperationRequisitionerName 1
OperationSupplier OperationSupplier 1
OperationSystemCondition OperationSystemCondition 1
OperationTrackingNumber OperationTrackingNumber 1
OperationUnloadingPointName OperationUnloadingPointName 1
OperationWorkCenterInternalID OperationWorkCenterInternalID 1
OperationWorkCenterTypeCode OperationWorkCenterTypeCode 1
OperationWorkPercent OperationWorkPercent 1
OpExternalProcessingCurrency OpExternalProcessingCurrency 1
OpExternalProcessingPrice OpExternalProcessingPrice 1
OpExternalProcessingPriceUnit OpExternalProcessingPriceUnit 1
OpPurchaseOutlineAgreement OpPurchaseOutlineAgreement 1
OpPurchaseOutlineAgreementItem OpPurchaseOutlineAgreementItem 1
Plant Plant 1
PurchaseRequisition PurchaseRequisition 1
PurchaseRequisitionItem PurchaseRequisitionItem 1
PurchasingGroup PurchasingGroup 1
PurchasingOrganization PurchasingOrganization 1
ReqgCostCenterControllingArea ReqgCostCenterControllingArea 1
@AbapCatalog.sqlViewName: 'IMAINTORDSOP'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Maintenance Order Sub-Operation'
@VDM.viewType: #BASIC

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

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

define view I_MaintenanceOrderSubOperation
  as select from afvc
    inner join   afvc as afvc_superior on  afvc.aufpl = afvc_superior.aufpl
                                       and afvc.sumnr = afvc_superior.aplzl
    inner join   afko as afko          on  afvc.aufpl = afko.aufpl
                                       and afko.plnaw = 'I'
  association [1..1] to I_MaintOrderOperPlanningValues as _OperationPlanningValues      on  $projection.MaintOrderRoutingNumber    = _OperationPlanningValues.MaintOrderRoutingNumber
                                                                                        and $projection.MaintOrderOperationCounter = _OperationPlanningValues.MaintOrderOperationCounter
  association [0..1] to I_MaintenanceOrderOperation    as _MaintenanceOrderOperation    on  $projection.MaintenanceOrder          = _MaintenanceOrderOperation.MaintenanceOrder
                                                                                        and $projection.MaintenanceOrderOperation = _MaintenanceOrderOperation.MaintenanceOrderOperation
  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.MaintenanceOrderOperation = _MaintenanceOrderComponent.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..1] to I_Supplier                     as _Supplier                     on  $projection.OperationSupplier = _Supplier.Supplier
  association [0..1] to I_PersonWorkAgreement_1        as _PersonResponsible            on  $projection.OperationPersonResponsible = _PersonResponsible.PersonWorkAgreement
  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_MaintenanceOrderConfirmation as _MaintenanceOrderConf         on  $projection.MaintOrderConfirmation  = _MaintenanceOrderConf.MaintOrderConf
                                                                                        and $projection.MaintOrderConfCntrValue = _MaintenanceOrderConf.MaintOrderConfCntrValue
  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,
      //--[ GENERATED:012:GFBfhxvv7kY4nH9{xKJeWG

      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_MaintOrdOpStdVH',
                     element: 'MaintenanceOrderOperation' },
          additionalBinding: [{ localElement: 'MaintenanceOrder',
                                element: 'MaintenanceOrder' }]
        }]
      // ]--GENERATED

      @ObjectModel.foreignKey.association: '_MaintenanceOrderOperation'
      @EndUserText.label: 'Operation'
  key afvc_superior.vornr                                                           as MaintenanceOrderOperation,
      @EndUserText.label: 'Suboperation'
  key afvc.vornr                                                                    as MaintenanceOrderSubOperation,

      afvc.aufpl                                                                    as MaintOrderRoutingNumber,
      afvc.aplzl                                                                    as MaintOrderOperationCounter,
      afvc.sumnr                                                                    as SuperiorOrderIntBillOfOpItem,

      @ObjectModel.foreignKey.association: '_OperationControlKey'
      afvc.steus                                                                    as OperationControlKey,
      afvc.ltxa1                                                                    as OperationDescription,

      // 'Inspection Rounds'-related fields

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


      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_PlantStdVH',
                     element: 'Plant' }
        }]
      @ObjectModel.foreignKey.association: '_Plant'
      afvc.werks                                                                    as Plant,
      'A'                                                                           as OperationWorkCenterTypeCode,
      afvc.arbid                                                                    as OperationWorkCenterInternalID,
      //--[ GENERATED:012:GFBfhxvv7kY4nH9{xKJeWG

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

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

      @DefaultAggregation: #NONE
      afvc.anzzl                                                                    as NumberOfCapacities,

      afvc.sortl                                                                    as OperationPurgInfoRecdSearchTxt,
      afvc.afnam                                                                    as OperationRequisitionerName,
      afvc.wempf                                                                    as OperationGoodsRecipientName,

      @Semantics.amount.currencyCode: 'OpExternalProcessingCurrency'
      @DefaultAggregation: #NONE
      afvc.preis                                                                    as OpExternalProcessingPrice,
      afvc.peinh                                                                    as OpExternalProcessingPriceUnit,
      @ObjectModel.foreignKey.association: '_OpExternalProcessingCurrency'
      @Semantics.currencyCode: true
      afvc.waers                                                                    as OpExternalProcessingCurrency,
      afvc.bednr                                                                    as OperationTrackingNumber,
      afvc.infnr                                                                    as OperationPurchasingInfoRecord,
      afvc.ablad                                                                    as OperationUnloadingPointName,
      cast (afvc.ebeln as konnr)                                                    as OpPurchaseOutlineAgreement,
      cast (afvc.ebelp as ktpnr)                                                    as OpPurchaseOutlineAgreementItem,
      //--[ GENERATED:012:GFBfhxvv7kY4nH9{xKJeWG

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

      @ObjectModel.foreignKey.association: '_Supplier'
      afvc.lifnr                                                                    as OperationSupplier,
      //--[ GENERATED:012:GFBfhxvv7kY4nH9{xKJeWG

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

      @ObjectModel.foreignKey.association: '_Assembly'
      afvc.istru                                                                    as Assembly,
      afvc.anlzu                                                                    as OperationSystemCondition,
      afvc.larnt                                                                    as CostCtrActivityType,
      afvc.anfkokrs                                                                 as ReqgCostCenterControllingArea,
      afvc.indet                                                                    as OperationCalculationControl,
      afvc.prznt                                                                    as OperationWorkPercent,
      afvc.bedid                                                                    as CapacityRequirement,
      afvc.bedzl                                                                    as CapacityRequirementItem,
      afvc.banfn                                                                    as PurchaseRequisition,
      afvc.objnr                                                                    as MaintOrderOperationInternalID,
      afvc.bnfpo                                                                    as PurchaseRequisitionItem,
      afvc.matkl                                                                    as MaterialGroup,
      afvc.sakto                                                                    as CostElement,
      afvc.frdlb                                                                    as ExtProcgOperationHasSubcontrg,
      afvc.ekorg                                                                    as PurchasingOrganization,
      afvc.ekgrp                                                                    as PurchasingGroup,
      -- needed for some associations, e.g. activity type
      afvc.rueck                                                                    as MaintOrderConfirmation,
      afvc.rmzhl                                                                    as MaintOrderConfCntrValue,
      afvc.maintordopprocessphasecode                                               as MaintOrdOpProcessPhaseCode,
      afvc.maintordopprocesssubphasecode                                            as MaintOrdOpProcessSubPhaseCode,

      @ObjectModel.foreignKey.association: '_MaintOperationExecStageCode'
      cast( afvc.maintopexecutionphasecode as eam_premainpost_cds preserving type ) as MaintOperationExecStageCode,

      @ObjectModel.foreignKey.association: '_Language'
      cast(afvc.txtsp as spras)                                                     as Language,
      @ObjectModel.foreignKey.association: '_OperationHasLongText'
      cast (
        case afvc.txtsp
            when '' then ''
            else 'X'
      end as xfeld )                                                                as OperationHasLongText,
      afvc.cl_type                                                                  as MaintOperationalChecklistType,

      _MaintenanceOrder,
      _MaintenanceOrderOperation,
      _StatusObject,
      _OpExternalProcessingCurrency,
      _OperationPlanningValues,
      _WorkCenter,
      _OperationControlKey,
      _OperationSystemCondition,
      _Plant,
      _OperationCalculationControl,
      _Assembly,
      _Language,
      _OperationHasLongText,
      _Supplier,
      _PersonResponsible,
      _Equipment,
      _FunctionalLocation,
      _MaintenanceOrderConf,
      _PMContactEmployee,
      _WorkAssignment,
      _MaintOperationExecStageCode,
      _EAMProcessPhase,
      _EAMProcessSubPhase
}
where
  afvc.sumnr <> '00000000'