@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Order Operation Work Center Schedule'
//@Search.searchable: true
@ObjectModel.usageType: {serviceQuality: #D, sizeCategory: #XL, dataClass: #MIXED}
@UI.headerInfo: {
title : { type: #STANDARD, value: 'ManufacturingOrder' },
description : { type: #STANDARD, value: 'ManufacturingOrderOperation' },
typeName: 'Work Center Operation',
typeNamePlural: 'Work Center Operations'
}
@VDM.viewType: #CONSUMPTION
@Consumption.dbHints: [ 'OPTIMIZATION_LEVEL(MINIMAL_COST_BASED)','NO_RECOMPILE_WITH_SQL_PARAMETERS','NO_USE_HEX_PLAN' ]
define view entity C_OrderWorkCenterSchedule
as select from P_ManageOperations as _OrderOperation
association [0..1] to P_Mfgcompsmissaggr as _Component on $projection.OrderInternalBillOfOperations = _Component.OrderInternalBillOfOperations
and $projection.OrderIntBillOfOperationsItem = _Component.OrderIntBillOfOperationsItem
association [1..1] to P_MfgOrderOperationIsOnHold as _MfgOrderOperationIsOnHold on $projection.OrderInternalBillOfOperations = _MfgOrderOperationIsOnHold.OrderInternalID
and $projection.OrderIntBillOfOperationsItem = _MfgOrderOperationIsOnHold.OrderOperationInternalID
association [0..1] to I_ManufacturingFeatureStatus as _ManufacturingFeatureStatus on $projection.ProductionPlant = _ManufacturingFeatureStatus.Plant
and _ManufacturingFeatureStatus.ManufacturingFeature = 'EPO'
association [0..1] to P_MPEInspIssuesByOperation as _QualityIssue on $projection.OrderInternalBillOfOperations = _QualityIssue.OrderInternalBillOfOperations
and $projection.OrderIntBillOfOperationsItem = _QualityIssue.InspPlanOperationInternalID
and $projection.InspectionLot = _QualityIssue.InspectionLot
association [0..1] to I_OrderItem as _OrderItem on $projection.ManufacturingOrder = _OrderItem.OrderID
and _OrderItem.OrderItem = '0001'
association [0..1] to I_MfgOrderOperationOrigin as _MfgOrderOperationOrigin on $projection.MfgOrderOperationOrigin = _MfgOrderOperationOrigin.MfgOrderOperationOrigin
association [1..1] to E_OrderOperation as _Extension on $projection.OrderInternalBillOfOperations = _Extension.OrderInternalID
and $projection.OrderIntBillOfOperationsItem = _Extension.OrderOperationInternalID
{
@UI.hidden : true
key OrderInternalBillOfOperations,
@UI.hidden : true
key OrderIntBillOfOperationsItem,
@ObjectModel.foreignKey.association: '_MfgOrder'
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_MfgOrderStdVH', element: 'ManufacturingOrder' } } ]
// @Search: {defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8}
cast(ManufacturingOrder as aufnr preserving type) as ManufacturingOrder, // 1
@ObjectModel.text.element: [ 'MfgOrderOperationText']
@UI.hidden : true
ManufacturingOrderOperation, // 5
@UI.hidden : true
// @Search: {defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8}
MfgOrderOperationText, // 9
// @UI.hidden: true
// cast (case _OrderItem.SerialNumberAssgmtProfile when '' then '' else 'X' end as boolean preserving type ) as SerialNmbrAssgmtProfileIsAssgd,
// @UI.hidden : true
// ManufacturingOrderSubOperation,
// @UI.hidden : true
// _MfgOrderSequence.MfgOrderSequenceCategory as MfgOrderSequenceCategory,
@UI.hidden : true
// @Search: {defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8}
MaterialName, // 6
// @Search: {defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8}
@ObjectModel.foreignKey.association: '_Material'
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_MaterialStdVH', element: 'Material' } } ]
@EndUserText.quickInfo: 'Manufacturing Operation Material'
Material, // 7
ManufacturingOrderSequence, // 4
// @ObjectModel.text.element: '_ProductionPlant.PlantName'
@ObjectModel.foreignKey.association: '_ProductionPlant'
ProductionPlant, // 8
@UI.hidden : true
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_WorkCenterStdVH', element: 'WorkCenterInternalID' } } ]
// @Search: {defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8}
WorkCenterInternalID,
@ObjectModel.foreignKey.association: '_WorkCenterBySemanticKey'
@Consumption.valueHelpDefinition: [ { entity: { name: 'I_WrkCtrBySemanticKeyStdVH', element: 'WorkCenter' } } ]
// @Search: {defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8}
@EndUserText.quickInfo: 'Manufacturing Operation Work center'
WorkCenter, // 11
// @UI.hidden: true
// @Search: {defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8}
// _WorkCenter._Text[1: Language=$session.system_language].WorkCenterText,
@UI.hidden : true
WorkCenterTypeCode,
ManufacturingOrderCategory,
ManufacturingOrderType,
ProductionSupervisor,
_OrderOperation._ProductionSupervisor.ProductionSupervisorName,
@EndUserText.quickInfo: 'Manufacturing Operation MRP Controller'
MRPController,
@EndUserText.quickInfo: 'Manufacturing Operation MRP Controller Name'
MRPControllerName,
// @UI.hidden : true
// NumberOfConfirmationSlips,
// @UI.hidden : true
// OperationImportance,
_OrderOperation._ProductionPlant.PlantName as ProductionPlantName,
cast(_ProductionPlant._Address.AddressTimeZone as co_plant_timezone ) as PlantTimeZone,
// @UI.hidden : true
// NumberOfTimeTickets,
// @UI.hidden: true
// OperationControlProfile,
// @UI.hidden: true
// _ControlProfile.ConfirmationIsNotPossible,
//Status
@UI.hidden: true
OperationIsClosed,
@UI.hidden: true
OperationIsTechlyCompleted,
@UI.hidden: true
OperationIsDelivered,
@UI.hidden: true
OperationIsPartiallyDelivered,
@UI.hidden: true
OperationIsPartiallyConfirmed,
@UI.hidden: true
OperationIsPrinted,
@UI.hidden: true
OperationIsReleased,
@UI.hidden: true
OperationIsCreated,
@UI.hidden: true
OperationIsScheduled,
@UI.hidden: true
OperationIsConfirmed,
@UI.hidden: true
OperationIsDeleted,
//Internal keys for mapping the status, this is requried for sorting, flitering and display current status in the UI
@UI.hidden: true
cast( case
when OperationIsDeleted = 'X' then '10'
when OperationIsClosed = 'X' then '09'
when OperationIsTechlyCompleted = 'X' then '08'
when OperationIsDelivered = 'X' then '07'
when OperationIsPartiallyDelivered = 'X' then '06'
when OperationIsConfirmed = 'X' then '05'
when OperationIsPartiallyConfirmed = 'X' then '04'
when OperationIsReleased = 'X' then '03'
when OperationIsScheduled = 'X' then '02'
when OperationIsCreated = 'X' then '01'
end as abap.numc(2)) as OperationStatusInternalID, // 18
//Quantities and Unit
@Semantics.quantity.unitOfMeasure: 'OperationUnit'
OpPlannedTotalQuantity, // 13
@Semantics.quantity.unitOfMeasure: 'OperationUnit'
OpTotalConfirmedYieldQty, // 10
@Semantics.quantity.unitOfMeasure: 'OPERATIONUNIT'
@EndUserText.quickInfo: 'Manufacturing Operation Base Quantity'
OperationReferenceQuantity,
// OpPlannedScrapQuantity,
@Semantics.quantity.unitOfMeasure: 'OPERATIONUNIT'
OperationConfirmedReworkQty,
@Semantics.quantity.unitOfMeasure: 'OPERATIONUNIT'
OpTotalConfirmedScrapQty,
--Ready quantity
@UI.hidden: true
@Semantics.quantity.unitOfMeasure: 'OperationUnit'
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_MPE_OPERREADY_QTY'
cast( 0 as mpe_ready_qty) as MfgOrderOperationReadyQuantity, // 16
-- Not Ready Quantity
@UI.hidden: true
@Semantics.quantity.unitOfMeasure: 'OperationUnit'
@ObjectModel.virtualElement
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_MPE_OPERREADY_QTY'
cast( 0 as mpe_not_ready_qty) as MfgOrderOperationNotReadyQty, // 17
// @Search: {defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8}
@ObjectModel.foreignKey.association: '_OperationUnit'
OperationUnit, // 12
//Dates
OpLtstSchedldExecStrtDte, // 22
@UI.hidden: true
OpLtstSchedldExecStrtTme, // 21
OpLtstSchedldExecEndDte, // 23
@UI.hidden: true
OpLtstSchedldExecEndTme, // 24
OpActualExecutionStartDate, // 19
@UI.hidden: true
OpActualExecutionStartTime, // 20
// OpActualExecutionEndDate,
// @UI.hidden: true
// OpActualExecutionEndTime,
// @UI.hidden : true
// case OpActualExecutionStartDate
// when '00000000'
// then OpLtstSchedldExecStrtDte
// else OpActualExecutionStartDate
// end as OperationStartDate,
//End Date checks
// @UI.hidden : true
// case OpActualExecutionEndDate
// when '00000000'
// then 'X'
// else ' '
// end as OpExecutionIsNotComplete,
// @UI.hidden : true
// case OpActualExecutionStartDate
// when '00000000'
// then 'X'
// else ' '
// end as OperationExecutionIsNotStarted,
//Quality Issue Calculation
@UI.hidden: true
case when OpTotalConfirmedScrapQty > OpPlannedScrapQuantity
then 'X'
else ' '
end as OperationHasScrapQualityIssue,
//Missing Components
@UI.hidden: true
case when _Component.combined_operns_miss_comp = 'X' then 'X'
else ''
end as OperationHasMissingComponents,
//Reservation Finally Issued
// @UI.hidden: true
// case when _Component.ReservationIsFinallyIssued = 'X' then 'X'
// else ''
// end as ReservationIsFinallyIssued,
//Missing Quantity
@UI.hidden : true
@Semantics.quantity.unitOfMeasure: 'OperationUnit'
cast( case when _OrderOperation.OperationYieldDeviationQty < 0 then ( - 1 * _OrderOperation.OperationYieldDeviationQty ) else 0 end as abap.quan(13,3) ) as MissingQuantity,
// @UI.hidden : true
// @Semantics.quantity.unitOfMeasure: 'OperationUnit'
// case when OperationYieldDeviationQty < 0 then 0
// else OperationYieldDeviationQty
// end as OverDeliveryQuantity,
// @UI.hidden : true
// case OpPlannedTotalQuantity
// when 0
// then 0
// else
// case when OperationYieldDeviationQty < 0 then ( cast(( - 1 * OperationYieldDeviationQty * 100) as abap.fltp ) / cast(OpPlannedTotalQuantity as abap.fltp) )
// else 0.0
// end
// end as MissingQuantityInPercent,
// @UI.hidden : true
// case OpPlannedTotalQuantity
// when 0
// then 0
// else
// case when OperationYieldDeviationQty < 0 then 0.0
// else ((cast((OperationYieldDeviationQty * 100) as abap.fltp ) / cast(OpPlannedTotalQuantity as abap.fltp)))
// end
// end as OverdeliveryInPercent,
//Delay & Delay Calculation
@UI.hidden: true
OperationExecutionEndIsLate, // 14
@UI.hidden: true
OperationExecutionStartIsLate, // 15
@Semantics.quantity.unitOfMeasure: 'OPERATIONUNIT'
@UI.hidden: true
OperationYieldDeviationQty,
// @UI.hidden : true
// ExecutionStartLatenessInHours,
// @UI.hidden : true
// ExecutionEndLatenessInHours,
@UI.hidden : true
ExecutionStartLatenessInMins,
@UI.hidden : true
ExecutionEndLatenessInMinutes,
// @UI.hidden : true
// OperationStartDeviationDays,
// @UI.hidden : true
// PlannedEndDateDvtnInDays,
@UI.hidden : true
InspectionLot,
@UI.hidden : true
_QualityIssue.InspHasRejectedCharc,
@UI.hidden : true
_QualityIssue.InspHasRejectedInspSubset,
@UI.hidden : true
_QualityIssue.InspHasRejectedInspLot,
@UI.hidden : true
cast( case
when _MfgOrderOperationIsOnHold.OperationHasProductionHold = 'X'
then 'X'
else '-'
end as boolean preserving type) as OperationHasProductionHold, // 3
// @UI.hidden : true
// _OrderStatus.OrderIsShopFloorOrder,
// @UI.hidden : true
// ProductConfiguration,
//associations
@UI.selectionField: [ {exclude: true }]
_MfgOrder,
@UI.selectionField: [ {exclude: true }]
_WorkCenter,
@Consumption.filter.hidden: true
_WorkCenterBySemanticKey,
@UI.selectionField: [ {exclude: true }]
_ProductionPlant,
@UI.selectionField: [ {exclude: true }]
_Material,
@UI.selectionField: [ {exclude: true }]
_OperationUnit,
// @UI.hidden : true
// _ManufacturingFeatureStatus.ManufacturingFeature,
// @UI.hidden : true
// _ManufacturingFeatureStatus.ManufacturingFeatureIsActive,
@UI.hidden : true
_ManufacturingFeatureStatus.MfgFeatureIsActiveInAnyPlant, // 2
-- Effectivity Parameter
@UI.hidden: true
_OrderItem.EffectivityParameterVariant,
@ObjectModel: {
virtualElement: true,
virtualElementCalculatedBy: 'ABAP:CL_MPE_GET_EFFECTIVITY_VALUE'
}
cast('' as mpe_effectivity_parameter_desc) as EffectivityParameterDesc, // 25
@UI.hidden: true
@ObjectModel: {
virtualElement: true,
virtualElementCalculatedBy: 'ABAP:CL_MPE_GET_EFFECTIVITY_VALUE'
}
cast('' as abap.sstring( 256 )) as EffctyTypeCnctntdParamDesc, // 26
_OrderOperation._MfgOrder._BillOfOperations._BillOfOperationsVersionType.BOOVersionChangeRecordIsRqd,
@UI.hidden: true
BillOfOperationsType,
@UI.lineItem: [ {qualifier: 'Routing' }]
cast(BillOfOperationsGroup as mpe_rtg_routing_group preserving type ) as BillOfOperationsGroup,
@UI.lineItem: [ {qualifier: 'Routing' }]
cast(BillOfOperationsVariant as mpe_rtg_routing_variant preserving type) as BillOfOperationsVariant,
@UI.lineItem: [ {qualifier: 'Routing' }]
BillOfOperationsVersion,
@UI.lineItem: [ {qualifier: 'Routing' }]
@UI.hidden:true
MfgOrderOperationOrigin,
_MfgOrderOperationOrigin._Text[1: Language=$session.system_language].MfgOrderOperationOriginName
-- Highlight Impacted Operations
// @UI.hidden: true
// @ObjectModel: { filter: { transformedBy: 'ABAP:CL_MPE_CIMA_SADL_FILTER_CONV' } }
// cast( ' ' as abap.char( 255 ) ) as NetChangeAnalysisPath,
// @UI.hidden: true
// @ObjectModel: { filter: { transformedBy: 'ABAP:CL_MPE_CIMA_SADL_FILTER_CONV' } }
// cast( ' ' as boole_d preserving type ) as ChangeImpactRelevanceFlagIsSet,
// @UI.hidden: true
// @ObjectModel: { filter: { transformedBy: 'ABAP:CL_MPE_CIMA_SADL_FILTER_CONV' } }
// cast( ' ' as boole_d preserving type ) as OperationIsImpacted,
// @UI.hidden: true
// ManufacturingObject
}
where
_OrderOperation.ManufacturingOrderCategory = '10'
and _OrderOperation.ManufacturingOrderSubOperation is null
and _OrderOperation._MfgOrderSequence.MfgOrderSequenceCategory = '0'