I_MFGORDEROPERATIONCUBE

CDS View

Manufacturing Order Operation - Cube

I_MFGORDEROPERATIONCUBE is a CDS View in S/4HANA. Manufacturing Order Operation - Cube. It contains 92 fields. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
I_MfgOrderOperationDurnCube view from COMPOSITE Manufacturing Order Operation Duration - Cube

Fields (92)

KeyField CDS FieldsUsed in Views
KEY OrderIntBillOfOperationsItem OrderIntBillOfOperationsItem 1
KEY OrderInternalBillOfOperations OrderInternalBillOfOperations 1
_BillOfOperationsType _BillOfOperationsType 1
_CapacityRequirement _CapacityRequirement 1
_CapacityRequirementItem _CapacityRequirementItem 1
_CompanyCode _CompanyCode 1
_ControllingArea _ControllingArea 1
_Language _Language 1
_ManufacturingOrder _ManufacturingOrder 1
_MfgOrder _MfgOrder 1
_MfgOrderCategory _MfgOrderCategory 1
_MfgOrderSequence _MfgOrderSequence 1
_MfgOrderType _MfgOrderType 1
_OperationConfirmation _OperationConfirmation 1
_OperationControlProfile _OperationControlProfile 1
_OrderInternalID _OrderInternalID 1
_OrdInternalBillOfOperations _OrdInternalBillOfOperations 1
_ProductionPlant _ProductionPlant 1
_ProductionSupervisor _ProductionSupervisor 1
_WorkCenter _WorkCenter 1
_WorkCenterBySemanticKey _WorkCenterBySemanticKey 1
_WorkCenterType _WorkCenterType 1
BillOfOperationsType BillOfOperationsType 1
CapacityRequirement CapacityRequirement 1
CapacityRequirementItem CapacityRequirementItem 1
CompanyCode CompanyCode 1
ControllingArea ControllingArea 1
Language Language 1
ManufacturingOrder ManufacturingOrder 1
ManufacturingOrderCategory ManufacturingOrderCategory 1
ManufacturingOrderOperation ManufacturingOrderOperation 1
ManufacturingOrderSequence ManufacturingOrderSequence 1
ManufacturingOrderSubOperation ManufacturingOrderSubOperation 1
ManufacturingOrderType ManufacturingOrderType 1
MfgOrderOperationIsPhase MfgOrderOperationIsPhase 1
MfgOrderOperationText MfgOrderOperationText 1
MfgOrderPhaseSuperiorOperation MfgOrderPhaseSuperiorOperation 1
NumberOfCapacities NumberOfCapacities 1
NumberOfConfirmationSlips NumberOfConfirmationSlips 1
NumberOfOperationConfirmations NumberOfOperationConfirmations 1
OpActualExecutionEndDate ActualExecutionEndDate,OpActualExecutionEndDate 1
OpActualExecutionEndTime ActualExecutionEndTime,OpActualExecutionEndTime 1
OpActualExecutionStartDate OpActualExecutionStartDate 1
OpActualExecutionStartTime OpActualExecutionStartTime 1
OpActualProcessingEndDate OpActualProcessingEndDate 1
OpActualProcessingEndTime OpActualProcessingEndTime 1
OpActualProcessingStartDate OpActualProcessingStartDate 1
OpActualProcessingStartTime OpActualProcessingStartTime 1
OpActualSetupEndDate OpActualSetupEndDate 1
OpActualSetupEndTime OpActualSetupEndTime 1
OpActualTeardownStartDate OpActualTeardownStartDate 1
OpActualTeardownStartTme OpActualTeardownStartTme 1
OperationConfirmation OperationConfirmation 1
OperationConfirmedEndDate OperationConfirmedEndDate 1
OperationConfirmedStartDate OperationConfirmedStartDate 1
OperationControlProfile OperationControlProfile 1
OperationImportance OperationImportance 1
OperationIsClosed OperationIsClosed 1
OperationIsConfirmed OperationIsConfirmed 1
OperationIsCreated OperationIsCreated 1
OperationIsDelivered OperationIsDelivered 1
OperationIsPartiallyConfirmed OperationIsPartiallyConfirmed 1
OperationIsPartiallyDelivered OperationIsPartiallyDelivered 1
OperationIsPrinted OperationIsPrinted 1
OperationIsReleased OperationIsReleased 1
OperationIsScheduled OperationIsScheduled 1
OperationIsTechlyCompleted OperationIsTechlyCompleted 1
OpErlstSchedldExecEndDte OpErlstSchedldExecEndDte 1
OpErlstSchedldExecEndTme OpErlstSchedldExecEndTme 1
OpErlstSchedldExecStrtDte OpErlstSchedldExecStrtDte 1
OpErlstSchedldExecStrtTme OpErlstSchedldExecStrtTme 1
OpErlstSchedldProcgStrtDte OpErlstSchedldProcgStrtDte 1
OpErlstSchedldProcgStrtTme OpErlstSchedldProcgStrtTme 1
OpErlstSchedldTrdwnStrtDte OpErlstSchedldTrdwnStrtDte 1
OpErlstSchedldTrdwnStrtTme OpErlstSchedldTrdwnStrtTme 1
OpLtstSchedldExecEndDte OpLtstSchedldExecEndDte 1
OpLtstSchedldExecEndTme OpLtstSchedldExecEndTme 1
OpLtstSchedldExecStrtDte OpLtstSchedldExecStrtDte 1
OpLtstSchedldExecStrtTme OpLtstSchedldExecStrtTme 1
OpLtstSchedldProcgStrtDte OpLtstSchedldProcgStrtDte 1
OpLtstSchedldProcgStrtTme OpLtstSchedldProcgStrtTme 1
OpLtstSchedldTrdwnStrtDte OpLtstSchedldTrdwnStrtDte 1
OpLtstSchedldTrdwnStrtTme OpLtstSchedldTrdwnStrtTme 1
PlannedActualEndDateDvtnDurn PlannedActualEndDateDvtnDurn 1
PlannedActualStartDateDvtnDurn PlannedActualStartDateDvtnDurn 1
PlannedCurrentEndDateDvtnDurn PlannedCurrentEndDateDvtnDurn 1
PlannedCurrentStrtDateDvtnDurn PlannedCurrentStrtDateDvtnDurn 1
ProductionPlant ProductionPlant 1
ProductionSupervisor ProductionSupervisor 1
WorkCenter WorkCenter 1
WorkCenterInternalID WorkCenterInternalID 1
WorkCenterTypeCode WorkCenterTypeCode 1
@AbapCatalog.sqlViewName: 'IPPMFGORDEROPC'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
--@AbapCatalog.dbHints: [ {dbSystem: #HDB, hint: ['NO_JOIN_THRU_AGGR', 'NO_JOIN_THRU_JOIN'] } ] "due to new SADL ATC Prio2
@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.personalData.blocking: #NOT_REQUIRED
@Analytics.dataCategory: #CUBE
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.allowExtensions: true
@ObjectModel.modelingPattern: #ANALYTICAL_CUBE
@ObjectModel.supportedCapabilities: [#ANALYTICAL_PROVIDER]
@ObjectModel.usageType: {serviceQuality: #D, sizeCategory: #XL, dataClass: #MIXED}
@VDM.viewType: #COMPOSITE
@EndUserText.label: 'Manufacturing Order Operation - Cube'

define view I_MfgOrderOperationCube
  as select from P_MfgOrderOperationDelay     as oper     
    left outer to one join P_MfgOrderOpDayDurnInSeconds (im_clnt : $session.client) 
                                              as ddis on  ddis.sapclient                      = mandt
                                                      and ddis.ManufacturingOrder             = oper.ManufacturingOrder
                                                      and ddis.ManufacturingOrderSequence     = oper.ManufacturingOrderSequence
                                                      and ddis.ManufacturingOrderOperation    = oper.ManufacturingOrderOperation
                                                      and ddis.ManufacturingOrderSubOperation = oper.ManufacturingOrderSubOperation
                                                      and ddis.OpLtstSchedldExecStrtDte       = oper.OpLtstSchedldExecStrtDte
                                                      and ddis.OpLtstSchedldExecStrtTme       = oper.OpLtstSchedldExecStrtTme
                                                      and ddis.OpLtstSchedldExecEndDte        = oper.OpLtstSchedldExecEndDte
                                                      and ddis.OpLtstSchedldExecEndTme        = oper.OpLtstSchedldExecEndTme
                                                      and ddis.OpActualExecutionStartDate     = oper.OpActualExecutionStartDate
                                                      and ddis.OpActualExecutionStartTime     = oper.OpActualExecutionStartTime
                                                      and ddis.OpActualExecutionEndDate       = oper.OpActualExecutionEndDate
                                                      and ddis.OpActualExecutionEndTime       = oper.OpActualExecutionEndTime
                                                  
    inner join P_OrderOperationStatusBasicAgg as stat on  stat.ObjectInternalID = oper.ManufacturingObject // Status


  association [1..1] to I_CalendarDate            as _StartDate               on  $projection.OpErlstSchedldExecStrtDte = _StartDate.CalendarDate
  association [1..1] to I_ManufacturingOrder      as _ManufacturingOrder      on  $projection.ManufacturingOrder = _ManufacturingOrder.ManufacturingOrder
  association [1..1] to I_OrderInternalID         as _OrderInternalID         on  $projection.OrderInternalBillOfOperations = _OrderInternalID.OrderInternalID
  association [0..1] to I_WorkCenterBySemanticKey as _WorkCenterBySemanticKey on  $projection.WorkCenter      = _WorkCenterBySemanticKey.WorkCenter
                                                                              and $projection.ProductionPlant = _WorkCenterBySemanticKey.Plant
{
      // Technical Key

      @ObjectModel.foreignKey.association: '_OrdInternalBillOfOperations'
  key oper.OrderInternalBillOfOperations,
  key oper.OrderIntBillOfOperationsItem,

      // Semantical Key

      @ObjectModel.foreignKey.association: '_MfgOrder'
      oper.ManufacturingOrder,
      @ObjectModel.foreignKey.association: '_MfgOrderSequence'
      oper.ManufacturingOrderSequence,
      @ObjectModel.text.element: ['MfgOrderOperationText']
      oper.ManufacturingOrderOperation,
      @ObjectModel.text.element: ['MfgOrderOperationText']
      oper.ManufacturingOrderSubOperation,

      // Order header data

      @ObjectModel.foreignKey.association: '_MfgOrderCategory'
      oper.ManufacturingOrderCategory,
      @ObjectModel.foreignKey.association: '_MfgOrderType'
      oper.ManufacturingOrderType,
      @ObjectModel.foreignKey.association: '_ProductionSupervisor'
      oper.ProductionSupervisor,
      @ObjectModel.foreignKey.association: '_MRPController'
      oper.MRPController,
      @ObjectModel.foreignKey.association: '_ResponsiblePlannerGroup'
      oper.ResponsiblePlannerGroup,
      oper.ProductConfiguration,

      // Text

      @Semantics.text: true
      oper.MfgOrderOperationText,
      oper.OperationHasLongText,
      @ObjectModel.foreignKey.association: '_Language'
      oper.Language,
      @ObjectModel.foreignKey.association: '_OperationStandardTextCode'      
      oper.OperationStandardTextCode,

      // Attributes

      oper.MfgOrderOperationIsPhase,
      oper.MfgOrderPhaseSuperiorOperation,
      oper.NumberOfCapacities,
      oper.NumberOfConfirmationSlips,
      oper.NumberOfOperationConfirmations,
      oper.OperationImportance,

      // Status

      oper.ManufacturingObject as ObjectInternalID,
      stat.OperationIsCreated,
      stat.OperationIsReleased,
      stat.OperationIsPrinted,
      stat.OperationIsConfirmed,
      stat.OperationIsPartiallyConfirmed,
      stat.OperationIsDeleted,
      stat.OperationIsTechlyCompleted,
      stat.OperationIsClosed,
      stat.OperationIsScheduled,
      stat.OperationIsPartiallyDelivered,
      stat.OperationIsDelivered,

      // Assignments

      @ObjectModel.foreignKey.association: '_ProductionPlant'
      oper.ProductionPlant,
      @ObjectModel.foreignKey.association: '_WorkCenter'
      oper.WorkCenterInternalID,
      @ObjectModel.foreignKey.association: '_WorkCenterType'   
      oper.WorkCenterTypeCode_2 as WorkCenterTypeCode,  
      @ObjectModel.foreignKey.association: '_WorkCenterBySemanticKey'
      cast(oper._WorkCenter_2.WorkCenter as pph_arbpl preserving type) as WorkCenter,
      @ObjectModel.foreignKey.association: '_OperationControlProfile'
      oper.OperationControlProfile,
      @ObjectModel.foreignKey.association: '_BillOfOperationsType'
      oper.BillOfOperationsType,
      @ObjectModel.foreignKey.association: '_BillOfOperationsGroup'
      oper.BillOfOperationsGroup,
      @ObjectModel.foreignKey.association: '_BillOfOperationsVariant'
      oper.BillOfOperationsVariant,
      @ObjectModel.foreignKey.association: '_BillOfOperationsSequence'
      oper.BillOfOperationsSequence,
      oper.BillOfOperationsVersion,
      @ObjectModel.foreignKey.association: '_BOOOperationInternalID'
      oper.BOOOperationInternalID,
      @ObjectModel.foreignKey.association: '_OperationConfirmation'
      oper.OperationConfirmation,
      @ObjectModel.foreignKey.association: '_CapacityRequirement'
      oper.CapacityRequirement,
      @ObjectModel.foreignKey.association: '_CapacityRequirementItem'
      oper.CapacityRequirementItem,

      // Assignments Purchasing

      @ObjectModel.foreignKey.association: '_PurchasingOrganization'
      oper.PurchasingOrganization,
      @ObjectModel.foreignKey.association: '_PurchasingGroup'
      oper.PurchasingGroup,
--    @ObjectModel.foreignKey.association: '_PurchaseRequisition'
      oper.PurchaseRequisition,
--    @ObjectModel.foreignKey.association: '_PurchaseRequisitionItem'
      oper.PurchaseRequisitionItem,
--    @ObjectModel.foreignKey.association: '_PurchaseOrder'
      oper.PurchaseOrder,
--    @ObjectModel.foreignKey.association: '_PurchaseOrderItem'
      oper.PurchaseOrderItem,
--    @ObjectModel.foreignKey.association: '_PurchasingInfoRecord'
      oper.PurchasingInfoRecord,
      oper.PurgInfoRecdDataIsFixed,
      oper.PurchasingInfoRecordCategory,

      // Amount and Currency

      @Semantics.currencyCode: true
      oper.OpExternalProcessingCurrency,
      @DefaultAggregation: #SUM
      @Semantics.amount.currencyCode: 'OpExternalProcessingCurrency'
      oper.OpExternalProcessingPrice,
      oper.NumberOfOperationPriceUnits,

      // Assignments FI/CO

      @ObjectModel.foreignKey.association: '_CompanyCode'
      oper.CompanyCode,
      @ObjectModel.foreignKey.association: '_BusinessArea'
      oper.BusinessArea,
      @ObjectModel.foreignKey.association: '_ControllingArea'
      oper.ControllingArea,
      oper.ProfitCenter,
      oper.RequestingCostCenter,
      oper.CostElement,
      oper.CostingVariant,
      oper.CostingSheet,
      oper.CostEstimate,
      @ObjectModel.foreignKey.association: '_ControllingObjectClass'
      oper.ControllingObjectClass,
      @ObjectModel.foreignKey.association: '_FunctionalArea'
      oper.FunctionalArea,
      oper.TaxJurisdiction,
      
      // Assignments HR

      oper.EmployeeWageType,
      @ObjectModel.foreignKey.association: '_EmployeeWageGroup'
      oper.EmployeeWageGroup,
      @ObjectModel.foreignKey.association: '_EmployeeSuitability'
      oper.EmployeeSuitability,
      oper.NumberOfTimeTickets,
      oper.NumberOfEmployees,

      // Setup and Overlapping

      @ObjectModel.foreignKey.association: '_OperationSetupGroupCategory'      
      oper.OperationSetupGroupCategory,
      @ObjectModel.foreignKey.association: '_OperationSetupGroup'
      oper.OperationSetupGroup,
      @ObjectModel.foreignKey.association: '_OperationSetupType'
      oper.OperationSetupType,
      oper.OperationOverlappingIsRequired,
      oper.OperationOverlappingIsPossible,
      oper.OperationsIsAlwaysOverlapping,
      oper.OperationSplitIsRequired,
      oper.MaximumNumberOfSplits,
      @ObjectModel.foreignKey.association: '_LeadTimeReductionStrategy'
      oper.LeadTimeReductionStrategy,
      oper.OpSchedldReductionLevel,

      // Dates and Times

      @Semantics.calendarItem.dtStart: true
      oper.OpErlstSchedldExecStrtDte,
      oper.OpErlstSchedldExecStrtTme,
      @Semantics.calendarItem.dtStart: true
      oper.OpErlstSchedldProcgStrtDte,
      oper.OpErlstSchedldProcgStrtTme,
      @Semantics.calendarItem.dtStart: true
      oper.OpErlstSchedldTrdwnStrtDte,
      oper.OpErlstSchedldTrdwnStrtTme,
      @Semantics.calendarItem.dtEnd: true
      oper.OpErlstSchedldExecEndDte,
      oper.OpErlstSchedldExecEndTme,
      @Semantics.calendarItem.dtStart: true
      oper.OpLtstSchedldExecStrtDte,
      oper.OpLtstSchedldExecStrtTme,
      @Semantics.calendarItem.dtStart: true
      oper.OpLtstSchedldProcgStrtDte,
      oper.OpLtstSchedldProcgStrtTme,
      @Semantics.calendarItem.dtStart: true
      oper.OpLtstSchedldTrdwnStrtDte,
      oper.OpLtstSchedldTrdwnStrtTme,
      @Semantics.calendarItem.dtEnd: true
      oper.OpLtstSchedldExecEndDte,
      oper.OpLtstSchedldExecEndTme,
      @Semantics.calendarItem.dtStart: true
      oper.OperationConfirmedStartDate,
      oper.OperationConfirmedEndDate,
      @Semantics.calendarItem.dtStart: true
      oper.OpActualExecutionStartDate,
      oper.OpActualExecutionStartTime,
      @Semantics.calendarItem.dtEnd: true
      oper.OpActualSetupEndDate,
      oper.OpActualSetupEndTime,
      @Semantics.calendarItem.dtStart: true
      oper.OpActualProcessingStartDate,
      oper.OpActualProcessingStartTime,
      @Semantics.calendarItem.dtEnd: true
      oper.OpActualProcessingEndDate,
      oper.OpActualProcessingEndTime,
      @Semantics.calendarItem.dtStart: true
      oper.OpActualTeardownStartDate,
      oper.OpActualTeardownStartTme,
      @Semantics.calendarItem.dtEnd: true
      oper.OpActualExecutionEndDate,
      oper.OpActualExecutionEndTime,
      // Forecast Dates and Times

      @Semantics.calendarItem.dtEnd: true
      oper.ActualForecastEndDate,
      oper.ActualForecastEndTime,
      @Semantics.calendarItem.dtStart: true
      oper.SchedldFcstdEarliestStartDate,
      oper.SchedldFcstdEarliestStartTime,
      @Semantics.calendarItem.dtEnd: true
      oper.SchedldFcstdEarliestEndDate,
      oper.SchedldFcstdEarliestEndTime,
      @Semantics.calendarItem.dtStart: true
      oper.LatestSchedldFcstdStartDate,
      oper.SchedldFcstdLatestStartTime,
      @Semantics.calendarItem.dtEnd: true
      oper.LatestSchedldFcstdEndDate,
      oper.SchedldFcstdLatestEndTime,
      // Wait Date and Times

      @Semantics.calendarItem.dtStart: true
      oper.EarliestScheduledWaitStartDate,
      oper.EarliestScheduledWaitStartTime,
      @Semantics.calendarItem.dtEnd: true
      oper.EarliestScheduledWaitEndDate,
      oper.EarliestScheduledWaitEndTime,
      @Semantics.calendarItem.dtStart: true
      oper.LatestScheduledWaitStartDate,
      oper.LatestScheduledWaitStartTime,
      @Semantics.calendarItem.dtEnd: true
      oper.LatestScheduledWaitEndDate,
      oper.LatestScheduledWaitEndTime,

      // Durations

      @Semantics.calendarItem.duration: true
      ddis.ActualWorkdayDurnInSeconds     as ActualWorkdayDurnInSeconds,
      @Semantics.calendarItem.duration: true
      ddis.PlannedWorkdayDurnInSeconds    as PlannedWorkdayDurnInSeconds,
      @Semantics.calendarItem.duration: true
      ddis.DeviationDurationInSeconds     as DeviationWorkdayDurnInSeconds,

      // former TF content is replaced by SQL function in P_MfgOrderOperationDelay view

      @Semantics.calendarItem.duration: true
      oper.PlannedActualStartDateDvtnDurn,
      @Semantics.calendarItem.duration: true
      oper.PlannedActualEndDateDvtnDurn,
      @Semantics.calendarItem.duration: true
      oper.PlannedCurrentStrtDateDvtnDurn,
      @Semantics.calendarItem.duration: true
      oper.PlannedCurrentEndDateDvtnDurn, 

      // Duration Unit calculation

      @Semantics.unitOfMeasure: true
      case 
        when ddis.ActualWorkdayDurnInSeconds < 60        then cast('S'   as actualdurationunit)
        when ddis.ActualWorkdayDurnInSeconds < 3600      then cast('MIN' as actualdurationunit)
        when ddis.ActualWorkdayDurnInSeconds < 86400     then cast('STD' as actualdurationunit)
        when ddis.ActualWorkdayDurnInSeconds < 604800    then cast('TAG' as actualdurationunit)
        when ddis.ActualWorkdayDurnInSeconds < 2592000   then cast('WCH' as actualdurationunit)    
        when ddis.ActualWorkdayDurnInSeconds < 31536000  then cast('MON' as actualdurationunit)        
        else cast('JHR' as actualdurationunit)      
      end as ActualDurationUnit,

      @Semantics.unitOfMeasure: true
      case
        when ddis.PlannedWorkdayDurnInSeconds < 60        then cast('S'   as planneddurationunit)
        when ddis.PlannedWorkdayDurnInSeconds < 3600      then cast('MIN' as planneddurationunit)
        when ddis.PlannedWorkdayDurnInSeconds < 86400     then cast('STD' as planneddurationunit)
        when ddis.PlannedWorkdayDurnInSeconds < 604800    then cast('TAG' as planneddurationunit)
        when ddis.PlannedWorkdayDurnInSeconds < 2592000   then cast('WCH' as planneddurationunit)    
        when ddis.PlannedWorkdayDurnInSeconds < 31536000  then cast('MON' as planneddurationunit)        
        else cast('JHR' as planneddurationunit)      
      end as PlannedDurationUnit,

      @Semantics.unitOfMeasure: true
      case 
        when ddis.DeviationDurationInSecondsABS < 60        then cast('S'   as deviationdurationunit)
        when ddis.DeviationDurationInSecondsABS < 3600      then cast('MIN' as deviationdurationunit)
        when ddis.DeviationDurationInSecondsABS < 86400     then cast('STD' as deviationdurationunit)
        when ddis.DeviationDurationInSecondsABS < 604800    then cast('TAG' as deviationdurationunit)
        when ddis.DeviationDurationInSecondsABS < 2592000   then cast('WCH' as deviationdurationunit)    
        when ddis.DeviationDurationInSecondsABS < 31536000  then cast('MON' as deviationdurationunit)        
        else cast('JHR' as deviationdurationunit)      
      end as DeviationDurationUnit,

      @Semantics.unitOfMeasure: true
      cast('S' as durationunit) as DurationUnit,  //always in seconds


      // Offset

      @ObjectModel.foreignKey.association: '_StartDateOffsetReferenceCode'
      oper.StartDateOffsetReferenceCode,
      @Semantics.unitOfMeasure: true
      oper.StartDateOffsetDurationUnit,
      @Semantics.calendarItem.duration: true
      oper.StartDateOffsetDuration,
      @ObjectModel.foreignKey.association: '_EndDateOffsetReferenceCode'  
      oper.EndDateOffsetReferenceCode,
      @Semantics.unitOfMeasure: true
      oper.EndDateOffsetDurationUnit,
      @Semantics.calendarItem.duration: true
      oper.EndDateOffsetDuration,

      // Quantities and UoM

      @Semantics.unitOfMeasure: true
      oper.OperationUnit,
      @Semantics.quantity.unitOfMeasure: 'OperationUnit'
      @DefaultAggregation: #MAX
      oper.OperationReferenceQuantity,
      @Semantics.quantity.unitOfMeasure: 'OperationUnit'
      @DefaultAggregation: #SUM
      oper.OpPlannedTotalQuantity,
      @Semantics.quantity.unitOfMeasure: 'OperationUnit'
      @DefaultAggregation: #SUM
      oper.OpPlannedScrapQuantity,
      @Semantics.quantity.unitOfMeasure: 'OperationUnit'
      @DefaultAggregation: #SUM
      oper.OpPlannedYieldQuantity,
      @Semantics.quantity.unitOfMeasure: 'OperationUnit'
      @DefaultAggregation: #SUM
      oper.OpTotalConfirmedYieldQty,
      @Semantics.quantity.unitOfMeasure: 'OperationUnit'
      @DefaultAggregation: #SUM
      oper.OpTotalConfirmedScrapQty,
      @Semantics.quantity.unitOfMeasure: 'OperationUnit'
      @DefaultAggregation: #SUM
      oper.OperationConfirmedReworkQty,
      @Semantics.quantity.unitOfMeasure: 'OperationUnit'
      @DefaultAggregation: #MAX
      cast( case stat.OperationIsConfirmed
        when 'X' then (oper.OpTotalConfirmedYieldQty - oper.OpPlannedYieldQuantity)
        else 0
      end as opyielddeviationqty) as OperationYieldDeviationQty,
      @Semantics.unitOfMeasure: true
      oper.ProductionUnit,
      @Semantics.quantity.unitOfMeasure: 'ProductionUnit'
      @DefaultAggregation: #SUM
      oper.OpTotConfdYieldQtyInOrdQtyUnit,

      // Confirmed Work Quantities and UoM

      @Semantics.unitOfMeasure: true
      OpWorkQuantityUnit1,
      @Semantics.quantity.unitOfMeasure: 'OpWorkQuantityUnit1'
      @DefaultAggregation: #SUM
      OpConfirmedWorkQuantity1,
      NoFurtherOpWorkQuantity1IsExpd,
      @Semantics.unitOfMeasure: true
      OpWorkQuantityUnit2,
      @Semantics.quantity.unitOfMeasure: 'OpWorkQuantityUnit2'
      @DefaultAggregation: #SUM
      OpConfirmedWorkQuantity2,
      NoFurtherOpWorkQuantity2IsExpd,
      @Semantics.unitOfMeasure: true
      OpWorkQuantityUnit3,
      @Semantics.quantity.unitOfMeasure: 'OpWorkQuantityUnit3'
      @DefaultAggregation: #SUM
      OpConfirmedWorkQuantity3,
      NoFurtherOpWorkQuantity3IsExpd,
      @Semantics.unitOfMeasure: true
      OpWorkQuantityUnit4,
      @Semantics.quantity.unitOfMeasure: 'OpWorkQuantityUnit4'
      @DefaultAggregation: #SUM
      OpConfirmedWorkQuantity4,
      NoFurtherOpWorkQuantity4IsExpd,
      @Semantics.unitOfMeasure: true
      OpWorkQuantityUnit5,
      @Semantics.quantity.unitOfMeasure: 'OpWorkQuantityUnit5'
      @DefaultAggregation: #SUM
      OpConfirmedWorkQuantity5,
      NoFurtherOpWorkQuantity5IsExpd,
      @Semantics.unitOfMeasure: true
      OpWorkQuantityUnit6,
      @Semantics.quantity.unitOfMeasure: 'OpWorkQuantityUnit6'
      @DefaultAggregation: #SUM
      OpConfirmedWorkQuantity6,
      NoFurtherOpWorkQuantity6IsExpd,

      // Work Quantities and UoM

      @Semantics.unitOfMeasure: true
      WorkCenterStandardWorkQtyUnit1,
      @Semantics.quantity.unitOfMeasure: 'WorkCenterStandardWorkQtyUnit1'
      @DefaultAggregation: #SUM
      WorkCenterStandardWorkQty1,
      CostCtrActivityType1,
      @Semantics.unitOfMeasure: true
      WorkCenterStandardWorkQtyUnit2,
      @Semantics.quantity.unitOfMeasure: 'WorkCenterStandardWorkQtyUnit2'
      @DefaultAggregation: #SUM
      WorkCenterStandardWorkQty2,
      CostCtrActivityType2,
      @Semantics.unitOfMeasure: true
      WorkCenterStandardWorkQtyUnit3,
      @Semantics.quantity.unitOfMeasure: 'WorkCenterStandardWorkQtyUnit3'
      @DefaultAggregation: #SUM
      WorkCenterStandardWorkQty3,
      CostCtrActivityType3,
      @Semantics.unitOfMeasure: true
      WorkCenterStandardWorkQtyUnit4,
      @Semantics.quantity.unitOfMeasure: 'WorkCenterStandardWorkQtyUnit4'
      @DefaultAggregation: #SUM
      WorkCenterStandardWorkQty4,
      CostCtrActivityType4,
      @Semantics.unitOfMeasure: true
      WorkCenterStandardWorkQtyUnit5,
      @Semantics.quantity.unitOfMeasure: 'WorkCenterStandardWorkQtyUnit5'
      @DefaultAggregation: #SUM
      WorkCenterStandardWorkQty5,
      CostCtrActivityType5,
      @Semantics.unitOfMeasure: true
      WorkCenterStandardWorkQtyUnit6,
      @Semantics.quantity.unitOfMeasure: 'WorkCenterStandardWorkQtyUnit6'
      @DefaultAggregation: #SUM
      WorkCenterStandardWorkQty6,
      CostCtrActivityType6,

      // Forecast Work Quantities

      @Semantics.quantity.unitOfMeasure: 'WorkCenterStandardWorkQtyUnit1'
      @DefaultAggregation: #SUM
      ForecastWorkQuantity1,
      @Semantics.quantity.unitOfMeasure: 'WorkCenterStandardWorkQtyUnit2'      
      @DefaultAggregation: #SUM
      ForecastWorkQuantity2,
      @Semantics.quantity.unitOfMeasure: 'WorkCenterStandardWorkQtyUnit3'
      @DefaultAggregation: #SUM
      ForecastWorkQuantity3,
      @Semantics.quantity.unitOfMeasure: 'WorkCenterStandardWorkQtyUnit4'
      @DefaultAggregation: #SUM
      ForecastWorkQuantity4,
      @Semantics.quantity.unitOfMeasure: 'WorkCenterStandardWorkQtyUnit5'
      @DefaultAggregation: #SUM
      ForecastWorkQuantity5,
      @Semantics.quantity.unitOfMeasure: 'WorkCenterStandardWorkQtyUnit6'
      @DefaultAggregation: #SUM
      ForecastWorkQuantity6,

      // Business Process

      @ObjectModel.foreignKey.association: '_BusinessProcess'
      oper.BusinessProcess,
      @Semantics.unitOfMeasure: true
      oper.BusinessProcessEntryUnit,
      @Semantics.quantity.unitOfMeasure: 'BusinessProcessEntryUnit'
      @DefaultAggregation: #SUM
      oper.BusinessProcessConfirmedQty,
      oper.NoFurtherBusinessProcQtyIsExpd,

      // Associations

      _ManufacturingOrder,
      _OrderInternalID,
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: '_OrderInternalID'
      oper._OrdInternalBillOfOperations,
      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: '_ManufacturingOrder'
      oper._MfgOrder,
      oper._MfgOrderSequence,
      oper._MfgOrderCategory,
      oper._MfgOrderType,
      oper._OperationStandardTextCode,
      oper._ProductionPlant,
      oper._ProductionSupervisor,
      oper._ProductionUnit,
      oper._OperationUnit,
      oper._OperationControlProfile,
      oper._BillOfOperationsType,
      oper._BillOfOperationsSequence,
      oper._BillOfOperationsGroup,
      oper._BillOfOperationsVariant,
      oper._BOOOperationInternalID,
      oper._WorkCenter_2 as _WorkCenter,
      oper._WorkCenterType_2 as _WorkCenterType,
      _WorkCenterBySemanticKey,
      oper._MRPController,
      oper._ResponsiblePlannerGroup,
      oper._CapacityRequirement,
      oper._CapacityRequirementItem,
      oper._OperationConfirmation,
      oper._PurchasingOrganization,
      oper._PurchasingGroup,
      oper._PurchaseOrder,
      oper._PurchaseOrderItem,
--    oper._PurchaseRequisition,
--    oper._PurchaseRequisitionItem,
      oper._PurchasingInfoRecord,
      oper._OpExternalProcessingCurrency,
      oper._EmployeeWageGroup,
      oper._EmployeeSuitability,
      oper._CompanyCode,
      oper._ProfitCenter,
      oper._ControllingArea,
      oper._ControllingObjectClass,
      oper._FunctionalArea,
      oper._BusinessArea,
      oper._BusinessProcess,
      oper._BusinessProcessEntryUnit,
      oper._OperationSetupGroupCategory,
      oper._OperationSetupGroup,
      oper._OperationSetupType,
      oper._LeadTimeReductionStrategy,
      oper._StartDateOffsetReferenceCode,
      oper._EndDateOffsetReferenceCode,
      oper._Language,
      _StartDate
}
where oper.OperationIsToBeDeleted = ''; //Non-deleted operations only

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_WORKCENTER",
"P_MFGORDEROPERATIONDELAY",
"P_ORDEROPERATIONSTATUSBASICAGG"
],
"ASSOCIATED":
[
"I_BILLOFOPERATIONS",
"I_BILLOFOPERATIONSGROUP",
"I_BILLOFOPERATIONSSEQUENCE",
"I_BILLOFOPERATIONSTYPE",
"I_BOOOPERATIONINTERNALID",
"I_BUSINESSAREA",
"I_BUSINESSPROCESS",
"I_CALENDARDATE",
"I_CAPACITYREQUIREMENT",
"I_CAPACITYREQUIREMENTITEM",
"I_COMPANYCODE",
"I_CONFIRMATIONGROUP",
"I_CONTROLLINGAREA",
"I_CONTROLLINGOBJECTCLASS",
"I_CURRENCY",
"I_EMPLOYEESUITABILITY",
"I_EMPLOYEEWAGEGROUP",
"I_FUNCTIONALAREA",
"I_LANGUAGE",
"I_LEADTIMEREDUCTIONSTRATEGY",
"I_MANUFACTURINGORDER",
"I_MFGORDER",
"I_MFGORDERCATEGORY",
"I_MFGORDERSEQUENCE",
"I_MFGORDERTYPE",
"I_MRPCONTROLLER",
"I_OPERATIONCONTROLPROFILE",
"I_OPERATIONDATEOFFSETREFCODE",
"I_OPERATIONSETUPGROUP",
"I_OPERATIONSETUPGROUPCATEGORY",
"I_OPERATIONSETUPTYPE",
"I_OPERATIONSTANDARDTEXT",
"I_ORDERINTERNALID",
"I_ORDINTERNALBILLOFOPERATIONS",
"I_PLANT",
"I_PRODUCTIONSUPERVISOR",
"I_PROFITCENTER",
"I_PURCHASEORDERAPI01",
"I_PURCHASEORDERITEMAPI01",
"I_PURCHASINGGROUP",
"I_PURCHASINGINFORECORDAPI01",
"I_PURCHASINGORGANIZATION",
"I_RESPONSIBLEPLANNERGROUP",
"I_UNITOFMEASURE",
"I_WORKCENTER",
"I_WORKCENTERBYSEMANTICKEY",
"I_WORKCENTERTYPE"
],
"BASE":
[
"P_MFGORDEROPERATIONDELAY"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/