@AbapCatalog.sqlViewName: 'IMPEMANOPERTP' // ABAP view still used in BOPF Object -> https://wiki.one.int.sap/wiki/display/CDSDDIC/Usage+of+SQL+View+Name+and+its+mitigation
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
//@AccessControl.privilegedAssociations: ['_Extension'] shall not be privileged
@Search.searchable: true
@AbapCatalog.preserveKey: true
@ObjectModel.usageType: {serviceQuality: #D, sizeCategory: #XL, dataClass: #MIXED}
@VDM.viewType: #TRANSACTIONAL
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel: {
compositionRoot: true,
transactionalProcessingEnabled: true,
writeActivePersistence: 'IMPEMANOPERTP',
createEnabled: false,
updateEnabled: false,
deleteEnabled: false
}
@EndUserText.label: 'Production Operations Transactional BOPF'
define view I_ManageOperationsTP
as select from I_MfgOrderOperationDelay as _OrderOperation
// inner join P_MfgOperListDistinct as _AORListDistinct on _AORListDistinct.OrderInternalID = _OrderOperation.OrderInternalBillOfOperations
// and _AORListDistinct.OrderOperationInternalID = _OrderOperation.OrderIntBillOfOperationsItem
inner join P_MfgOperationsList as _AORListDistinct on _AORListDistinct.OrderInternalID = _OrderOperation.OrderInternalBillOfOperations
and _AORListDistinct.OrderOperationInternalID = _OrderOperation.OrderIntBillOfOperationsItem
association [0..1] to I_ProductionRoutingVersion as _ProductionRoutingVersion on $projection.BillOfOperationsType = _ProductionRoutingVersion.BillOfOperationsType
and $projection.BillOfOperationsGroup = _ProductionRoutingVersion.BillOfOperationsGroup
and $projection.BillOfOperationsVariant = _ProductionRoutingVersion.BillOfOperationsVariant
and $projection.BillOfOperationsVersion = _ProductionRoutingVersion.BillOfOperationsVersion
association [1..1] to I_MfgOrder as _MfgOrderBasic on $projection.ManufacturingOrder = _MfgOrderBasic.ManufacturingOrder
and $projection.ProductionSupervisor = _MfgOrderBasic.ProductionSupervisor
and _MfgOrderBasic.ManufacturingOrderCategory = '10'
and $projection.OrderInternalBillOfOperations = _MfgOrderBasic.OrderInternalBillOfOperations
association [1..1] to E_OrderOperation as _Extension on OrderInternalBillOfOperations = _Extension.OrderInternalID
and OrderIntBillOfOperationsItem = _Extension.OrderOperationInternalID
{
@UI.hidden : true
key OrderInternalBillOfOperations,
@UI.hidden : true
key OrderIntBillOfOperationsItem,
// @ObjectModel.foreignKey.association: '_MfgOrderBasic'
// @Search: {defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8}
cast(ManufacturingOrder as aufnr preserving type) as ManufacturingOrder,
@ObjectModel.text.element: 'MfgOrderOperationText'
ManufacturingOrderOperation,
@UI.hidden : true
// @Search: {defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8}
MfgOrderOperationText,
@UI.hidden: true
cast (case _MfgOrderBasic.SerialNumberAssgmtProfile when '' then '' else 'X' end as boolean preserving type ) as SerialNmbrAssgmtProfileIsAssgd,
// @UI.hidden : true
ManufacturingOrderSubOperation,
@UI.hidden : true
@Search: {defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8}
_MfgOrderBasic._Material._Text[1: Language=$session.system_language].MaterialName,
_MfgOrderBasic.Material,
_MfgOrderBasic.Batch,
_MfgOrderBasic.SalesOrder,
_MfgOrderBasic.SalesOrderItem,
@ObjectModel.text.element: 'ProdnProcgFlexibilityIndName'
@UI.textArrangement: #TEXT_ONLY
cast(_MfgOrderBasic.ProdnProcgIsFlexible as mpe_procg_flexibility_ind preserving type) as ProdnProcgIsFlexible,
@UI.hidden : true
@Semantics.text: true
_MfgOrderBasic._ProdnProcgFlexibilityIndTxt[1: Language=$session.system_language].ProdnProcgFlexibilityIndName,
ManufacturingOrderSequence,
// @ObjectModel.text.element: 'ProductionPlantName'
@ObjectModel.foreignKey.association: '_ProductionPlant'
ProductionPlant,
@UI.hidden : true
// @Search: {defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8}
WorkCenterInternalID,
@ObjectModel.foreignKey.association: '_WorkCenterBySemanticKey'
// @Search: {defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8}
// @EndUserText.quickInfo: 'Manufacturing Operation Work center'
WorkCenter,
@UI.hidden : true
WorkCenterTypeCode,
ManufacturingOrderCategory,
ManufacturingOrderType,
ProductionSupervisor,
// @EndUserText.quickInfo: 'Manufacturing Operation MRP Controller'
MRPController,
// @EndUserText.quickInfo: 'Manufacturing Operation MRP Controller Name'
_MRPController.MRPControllerName,
@UI.hidden : true
NumberOfConfirmationSlips,
@UI.hidden : true
OperationImportance,
@UI.hidden : true
NumberOfTimeTickets,
//@UI.hidden: true
//Cast done to preserve text from data element
cast(OperationControlProfile as steus preserving type) as OperationControlProfile,
//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,
//Quantities and Unit
@Semantics.quantity.unitOfMeasure: 'OperationUnit'
OpPlannedTotalQuantity,
@Semantics.quantity.unitOfMeasure: 'OperationUnit'
OpTotalConfirmedYieldQty,
OperationReferenceQuantity,
OpPlannedScrapQuantity,
OperationConfirmedReworkQty,
OpTotalConfirmedScrapQty,
@Semantics.unitOfMeasure: true
@Search: {defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8}
@ObjectModel.foreignKey.association: '_OperationUnit'
OperationUnit,
//External Processing
_OrderOperation.GoodsRecipientName,
_OrderOperation.UnloadingPointName,
//Dates
OpLtstSchedldExecStrtDte,
@UI.hidden: true
OpLtstSchedldExecStrtTme,
OpLtstSchedldExecEndDte,
@UI.hidden: true
OpLtstSchedldExecEndTme,
OpActualExecutionStartDate,
@UI.hidden: true
OpActualExecutionStartTime,
OpActualExecutionEndDate,
@UI.hidden: true
OpActualExecutionEndTime,
//Delay & Delay Calculation
@UI.hidden: true
OperationExecutionEndIsLate,
@UI.hidden: true
OperationExecutionStartIsLate,
@UI.hidden: true
OperationYieldDeviationQty,
@UI.hidden: true
PlannedCurrentStrtDateDvtnDurn,
@UI.hidden: true
PlannedActualStartDateDvtnDurn,
@UI.hidden: true
PlannedCurrentEndDateDvtnDurn,
@UI.hidden: true
PlannedActualEndDateDvtnDurn,
@UI.hidden: true
case OperationExecutionStartIsLate
when 'X' then
case when (OperationIsPartiallyConfirmed = ' ' and OperationIsReleased = 'X' and OperationIsConfirmed = '' and (PlannedCurrentStrtDateDvtnDurn > 0 ))
then (cast(PlannedCurrentStrtDateDvtnDurn as abap.fltp) / 3600.00)
else (cast(PlannedActualStartDateDvtnDurn as abap.fltp) / 3600.00)
end
else 0
end as ExecutionStartLatenessInHours,
@UI.hidden: true
case OperationExecutionEndIsLate
when 'X' then
case when (OperationIsConfirmed = ' ' and OperationIsPartiallyConfirmed = 'X' and OperationIsConfirmed = '' and (PlannedCurrentEndDateDvtnDurn > 0 ) )
then (cast(PlannedCurrentEndDateDvtnDurn as abap.fltp) / 3600.00)
else (cast(PlannedActualEndDateDvtnDurn as abap.fltp) / 3600.00)
end
else 0
end as ExecutionEndLatenessInHours,
@UI.hidden: true
case OperationExecutionStartIsLate
when 'X' then
case when (OperationIsPartiallyConfirmed = ' ' and OperationIsReleased = 'X' and OperationIsConfirmed = '' and (PlannedCurrentStrtDateDvtnDurn > 0 ))
then (cast(PlannedCurrentStrtDateDvtnDurn as abap.fltp) / 60.00)
else (cast(PlannedActualStartDateDvtnDurn as abap.fltp) / 60.00)
end
else 0
end as ExecutionStartLatenessInMins,
@UI.hidden: true
case OperationExecutionEndIsLate
when 'X' then
case when (OperationIsConfirmed = ' ' and OperationIsPartiallyConfirmed = 'X' and OperationIsConfirmed = '' and (PlannedCurrentEndDateDvtnDurn > 0 ) )
then (cast(PlannedCurrentEndDateDvtnDurn as abap.fltp) / 60.00)
else (cast(PlannedActualEndDateDvtnDurn as abap.fltp) / 60.00)
end
else 0
end as ExecutionEndLatenessInMinutes,
@UI.hidden: true
cast(PlannedCurrentStrtDateDvtnDurn as abap.fltp)/ 86400.00 as OperationStartDeviationDays,
@UI.hidden: true
cast(PlannedCurrentEndDateDvtnDurn as abap.fltp)/ 86400.00 as PlannedEndDateDvtnInDays,
ProductConfiguration,
BillOfOperationsType,
BillOfOperationsGroup,
BillOfOperationsVariant,
BillOfOperationsVersion,
cast(case
when _ProductionRoutingVersion.OrderID <> '' then 'O'
when _ProductionRoutingVersion.RoutingIsReworkRouting <> '' then 'R'
else 'V'
end as mpe_op_rtg_origin preserving type) as MfgOrderOperationOrigin,
@UI.hidden: true
SetupOpActyNtwkInstance,
@UI.hidden: true
ProduceOpActyNtwkInstance,
@UI.hidden: true
TeardownOpActyNtwkInstance,
@UI.hidden: true
_MfgOrderBasic.ManufacturingObject,
@UI.hidden : true
case _MfgOrderBasic._InspectionLot.InspectionLotType
when '03'
then _MfgOrderBasic.InspectionLot
else ' '
end as InspectionLot,
@UI.hidden: true
_MfgOrderBasic.EffectivityParameterVariant,
_MfgOrderBasic._BillOfOperations._BillOfOperationsVersionType.BOOVersionChangeRecordIsRqd,
// Fashion Manufacturing Fields
@UI.hidden : true
_MfgOrderBasic.MasterProductionOrder,
_MfgOrderBasic.ProductSeasonYear,
_MfgOrderBasic.ProductSeason,
_MfgOrderBasic.ProductCollection,
_MfgOrderBasic.ProductTheme,
// Segmentation
_MfgOrderBasic.StockSegment,
_MfgOrderBasic.Reservation,
//associations
// @UI.selectionField.exclude: true
_MfgOrderBasic as _MfgOrder,
@UI.selectionField.exclude: true
_WorkCenterBySemanticKey,
@UI.selectionField.exclude: true
_ProductionPlant,
@UI.selectionField.exclude: true
_OperationUnit,
@UI.selectionField.exclude: true
_MfgOrderBasic._Material,
//Associations
_OrdInternalBillOfOperations,
// _MfgOrder,
_MfgOrderSequence,
_MfgOrderCategory,
_MfgOrderType,
// _OperationStandardTextCode,
_ProductionSupervisor,
// _ProductionUnit,
// _OperationUnit,
// _OperationControlProfile,
// _BillOfOperationsType,
// _BillOfOperationsApplication,
_WorkCenter,
_WorkCenterType,
// _WorkCenterBySemanticKey,
_MRPController
// _ResponsiblePlannerGroup,
// _CapacityRequirement,
// _CapacityRequirementItem,
// _OperationConfirmation,
// _PurchasingOrganization,
// _PurchasingGroup,
// _PurchaseOrder,
// _PurchaseOrderItem,
// _PurchaseRequisition,
// _PurchaseRequisitionItem,
// _PurchasingInfoRecord,
// _Supplier,
// _OpExternalProcessingCurrency,
// _EmployeeWageGroup,
// _EmployeeSuitability,
// _Employee,
// _CompanyCode,
// _ProfitCenter,
// _ControllingArea,
// _ControllingObjectClass,
// _FunctionalArea,
// _BusinessArea,
// _BusinessProcess,
// _BusinessProcessEntryUnit,
// _OperationSetupGroupCategory,
// _OperationSetupGroup,
// _OperationSetupType,
// _LeadTimeReductionStrategy,
// _Language,
// _StartDate
}
where
ManufacturingOrderCategory = '10'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BILLOFOPERATIONS",
"I_BILLOFOPERATIONSVERSIONTYPE",
"I_INSPECTIONLOT",
"I_MATERIAL",
"I_MATERIALTEXT",
"I_MFGORDER",
"I_MFGORDEROPERATIONDELAY",
"I_MRPCONTROLLER",
"I_PRODNPROCGFLEXIBILITYINDTXT",
"I_PRODUCTIONROUTINGVERSION",
"P_MFGOPERATIONSLIST"
],
"ASSOCIATED":
[
"E_ORDEROPERATION",
"I_MATERIAL",
"I_MFGORDER",
"I_MFGORDERCATEGORY",
"I_MFGORDERSEQUENCE",
"I_MFGORDERTYPE",
"I_MRPCONTROLLER",
"I_ORDINTERNALBILLOFOPERATIONS",
"I_PLANT",
"I_PRODUCTIONROUTINGVERSION",
"I_PRODUCTIONSUPERVISOR",
"I_UNITOFMEASURE",
"I_WORKCENTER",
"I_WORKCENTERBYSEMANTICKEY",
"I_WORKCENTERTYPE"
],
"BASE":
[
"I_MFGORDER",
"I_MFGORDEROPERATIONDELAY"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/