I_MAINTORDEROPERATIONBASIC

CDS View

Maintenance Order Operation

I_MAINTORDEROPERATIONBASIC is a CDS View in S/4HANA. Maintenance Order Operation. It contains 57 fields. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
I_MaintenanceOrderOperation view from BASIC Maintenance Order Operation

Fields (57)

KeyField CDS FieldsUsed in Views
KEY MaintenanceOrder MaintenanceOrder 1
KEY MaintenanceOrderOperation MaintenanceOrderOperation 1
ActivityType ActivityType 1
Assembly Assembly 1
BusinessArea BusinessArea 1
CapacityRequirement CapacityRequirement 1
CapacityRequirementItem CapacityRequirementItem 1
CostCtrActivityType CostCtrActivityType 1
CostElement CostElement 1
CostingSheet CostingSheet 1
Equipment Equipment 1
FunctionalArea FunctionalArea 1
FunctionalLocation FunctionalLocation 1
Language Language 1
MaintOperationalChecklistType MaintOperationalChecklistType 1
MaintOperationExecStageCode MaintOperationExecStageCode 1
MaintOrderConfCntrValue MaintOrderConfCntrValue 1
MaintOrderConfirmation MaintOrderConfirmation 1
MaintOrderOperationCounter MaintOrderOperationCounter 1
MaintOrderOperationInternalID MaintOrderOperationInternalID 1
MaintOrderRoutingNumber MaintOrderRoutingNumber 1
MaintOrdOpProcessPhaseCode MaintOrdOpProcessPhaseCode 1
MaintOrdOpProcessSubPhaseCode MaintOrdOpProcessSubPhaseCode 1
MaintOrdOpProcgPriceUnitValue OpExternalProcessingPriceUnit 1
MaterialGroup MaterialGroup 1
NumberOfCapacities NumberOfCapacities 1
NumberOfTimeTickets NumberOfTimeTickets 1
OperationCalculationControl OperationCalculationControl 1
OperationControlKey OperationControlKey 1
OperationDescription OperationDescription 1
OperationGoodsRecipientName OperationGoodsRecipientName 1
OperationHasLongText OperationHasLongText 1
OperationMilestoneUsageCode OperationMilestoneUsageCode 1
OperationPersonResponsible OperationPersonResponsible 1
OperationPurchasingInfoRecord OperationPurchasingInfoRecord 1
OperationPurgInfoRecdSearchTxt OperationPurgInfoRecdSearchTxt 1
OperationRequisitionerName OperationRequisitionerName 1
OperationStandardTextCode OperationStandardTextCode 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
OpPurchaseOutlineAgreement OpPurchaseOutlineAgreement 1
OpPurchaseOutlineAgreementItem OpPurchaseOutlineAgreementItem 1
Plant Plant 1
ProfitCenter ProfitCenter 1
PurchaseRequisition PurchaseRequisition 1
PurchaseRequisitionItem PurchaseRequisitionItem 1
PurchasingGroup PurchasingGroup 1
PurchasingOrganization PurchasingOrganization 1
ReqgCostCenterControllingArea ReqgCostCenterControllingArea 1
TaxJurisdiction TaxJurisdiction 1
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #MANDATORY
@EndUserText.label: 'Maintenance Order Operation'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
  serviceQuality: #A,
  sizeCategory: #XL,
  dataClass: #TRANSACTIONAL
}

@AccessControl.personalData.blocking: #('TRANSACTIONAL_DATA')
@VDM.lifecycle.contract.type: #PUBLIC_LOCAL_API
@VDM.viewType: #BASIC

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

@ObjectModel.sapObjectNodeType.name: 'MaintenanceOrderOperation'
@ObjectModel.supportedCapabilities: [ #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE, #CDS_MODELING_ASSOCIATION_TARGET ]


define view entity I_MaintOrderOperationBasic as select from  afvc as afvc
    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
    
    association [0..1] to I_MaintenanceOrderBasic        as _MaintenanceOrder             on  $projection.MaintenanceOrder = _MaintenanceOrder.MaintenanceOrder
    association [0..1] to I_Plant                        as _Plant                        on  $projection.Plant = _Plant.Plant
    association [0..1] to I_OperationControlProfile      as _OperationControlKey          on  $projection.OperationControlKey = _OperationControlKey.OperationControlProfile
    association [0..1] to I_Language                     as _Language                     on  $projection.Language = _Language.Language
    association [0..1] to I_Supplier                     as _Supplier                     on  $projection.OperationSupplier = _Supplier.Supplier
    association [0..1] to I_Currency                     as _OpExternalProcessingCurrency on  $projection.OpExternalProcessingCurrency = _OpExternalProcessingCurrency.Currency
    association [0..1] to I_PersonWorkAgreement_1        as _PersonResponsible            on  $projection.OperationPersonResponsible = _PersonResponsible.PersonWorkAgreement
    association [0..1] to I_Material                     as _Assembly                     on  $projection.Assembly = _Assembly.Material
    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

{

      @ObjectModel.foreignKey.association: '_MaintenanceOrder'
  key afko.aufnr                                                                    as MaintenanceOrder,
  
        @ObjectModel.text.element: ['OperationDescription']
  key cast (afvc.vornr as  maintenanceorderoperation  preserving type )             as MaintenanceOrderOperation,
      cast ( '0000'  as maintenanceordersuboperation )  as MaintenanceOrderSubOperation,
       afvc.aufpl                                                                    as MaintOrderRoutingNumber,
      afvc.aplzl                                                                    as MaintOrderOperationCounter,


      @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 preserving type )                                                     as Language,
      afvc.loanz                                                                    as NumberOfTimeTickets,
   
      afvc.sortl                                                                    as OperationPurgInfoRecdSearchTxt,

      @ObjectModel.foreignKey.association: '_Supplier'
      afvc.lifnr                                                                    as OperationSupplier,

      @Semantics.amount.currencyCode: 'OpExternalProcessingCurrency'
      @Aggregation.default: #NONE
      afvc.preis                                                                    as OpExternalProcessingPrice,
//       @Semantics.quantity.unitOfMeasur

      afvc.peinh                                                                    as MaintOrdOpProcgPriceUnitValue,
      afvc.sakto                                                                    as CostElement,
      @ObjectModel.foreignKey.association: '_OpExternalProcessingCurrency'
      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 preserving type )                                   as OpPurchaseOutlineAgreement,
      cast (afvc.ebelp as ktpnr preserving type)                                    as OpPurchaseOutlineAgreementItem,
      afvc.afnam                                                                    as OperationRequisitionerName,
      afvc.bednr                                                                    as OperationTrackingNumber,
      @Aggregation.default: #NONE
      afvc.anzzl                                                                    as NumberOfCapacities,
      afvc.prznt                                                                    as OperationWorkPercent,
      afvc.indet                                                                    as OperationCalculationControl,
      afvc.larnt                                                                    as ActivityType,
      @ObjectModel.foreignKey.association: '_OperationSystemCondition'
      afvc.anlzu                                                                    as OperationSystemCondition,
      //afvc.vertl                                                                    as DistrCapReqmts,

      afvc.wempf                                                                    as OperationGoodsRecipientName,
      afvc.ablad                                                                    as OperationUnloadingPointName,

      @ObjectModel.foreignKey.association: '_PersonResponsible'
      afvc.pernr                                                                    as OperationPersonResponsible,
      afvc.equnr                                                                    as Equipment,
      cast( afvc.tplnr  as vdm_eam_tplnr preserving type )                          as FunctionalLocation, 
      afvc.gsber                                                                    as BusinessArea,
  
      afvc.prctr                                                                    as ProfitCenter,
      afvc.kalsm                                                                    as CostingSheet,
     
      afvc.txjcd                                                                    as TaxJurisdiction,
    
      afvc.func_area                                                                as FunctionalArea,
     
      @ObjectModel.foreignKey.association: '_Assembly'
      afvc.istru                                                                    as Assembly, //long one - 40 char

  
      @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,
      
      cast (
        case afvc.txtsp
            when '' then ''
            else 'X'
      end as xfeld preserving type)                                                 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 :

      _MaintenanceOrder,
      _Plant,
      _OperationControlKey,
      _Language,
      _Supplier,
      _OpExternalProcessingCurrency,
      _PersonResponsible,
      _Assembly,
      _MaintOperationExecStageCode,
      _EAMProcessPhase,
      _EAMProcessSubPhase
      
}
where
      afvc.sumnr = '00000000'
  and afko.plnaw = 'I'