I_SCHEDPRODNOPERATIONS
All scheduled operations
I_SCHEDPRODNOPERATIONS is a CDS View in S/4HANA. All scheduled operations. It contains 16 fields. 6 CDS views read from this table.
CDS Views using this table (6)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| C_SchedProdnDsptchdOps | view | from | CONSUMPTION | Dispatched operations |
| C_SchedProdnProdVersDay | view | left_outer | CONSUMPTION | Production Versions In Day Bucket |
| C_SchedProdnProdVersShift | view | left_outer | CONSUMPTION | Production versions in shift bucket |
| C_SchedProdnProdVersWeek | view | left_outer | CONSUMPTION | Production Versions In Week Bucket |
| P_SchedProdnWrkCtrMntrOps | view | left_outer | CONSUMPTION | Schedule Overview Operations |
| P_WrkCtrMntrCalcFields | view | from | CONSUMPTION | WorkCenter Monitor Calculations |
Fields (16)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| KEY | CapacityRequirement | CapacityRequirement | 3 |
| KEY | CapacityRequirementItem | CapacityRequirementItem | 3 |
| KEY | CapacityRqmtItemCapacity | CapacityRqmtItemCapacity | 3 |
| KEY | OrderCategory | OrderCategory | 4 |
| KEY | OrderID | OrderID | 3 |
| KEY | SimulationSessionID | SimulationSessionID | 3 |
| LtstSchedldExecEndDteTme | LtstSchedldExecEndDteTme | 3 | |
| LtstSchedldExecStrtDteTme | LtstSchedldExecStrtDteTme | 3 | |
| Operation | Operation | 2 | |
| OperationLatestEndDate | OperationLatestEndDate | 2 | |
| OperationLatestEndTime | OperationLatestEndTime | 2 | |
| OperationLatestStartDate | OperationLatestStartDate | 2 | |
| OperationLatestStartTime | OperationLatestStartTime | 2 | |
| OperationPlanningStatusCode | OperationPlanningStatusCode | 3 | |
| SchedldOrdEndDteTme | SchedldOrdEndDteTme | 2 | |
| SchedldOrdStartDteTme | SchedldOrdStartDteTme | 2 |
@AbapCatalog.sqlViewName: 'ISCHEDOPS'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@VDM.viewType: #COMPOSITE
@ObjectModel.usageType.dataClass:#TRANSACTIONAL
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.serviceQuality: #D
@EndUserText.label: 'All scheduled operations'
@ClientHandling.algorithm: #SESSION_VARIABLE
define view I_SchedProdnOperations
// as select from P_SchedOperations as _OrderOperation
// as select from YP_SchedOperations as _OrderOperation
as select from P_SchedOperations_Version_2 as _OrderOperation
left outer join I_SchedProdnPlngDets as _plngdets on _plngdets.UserName = $session.user
and _plngdets.SchedProdnAppName = 'SCH_PROD'
left outer join I_SchedProdnChgOp as _chgoper on _plngdets.SimulationSessionID = _chgoper.SimulationSessionID
and _OrderOperation.OrderID = _chgoper.OrderID
and _OrderOperation.OrderCategory = _chgoper.OrderCategory
and _OrderOperation.CapacityRequirementItem = _chgoper.CapacityRequirementItem
left outer to one join P_SchedFirstOperation_Vers_2 as SchedFrstOp on _OrderOperation.CapacityRequirement = SchedFrstOp.CapacityRequirement
and _OrderOperation.WorkCenterInternalID = SchedFrstOp.WorkCenterInternalID
and _OrderOperation.Operation = SchedFrstOp.Operation
// and ( SchedFrstOp.OperationLatestStartDate <= OriginallyScheduledEndDate
// and SchedFrstOp.OperationLatestEndDate >= OriginallyScheduledStartDate )
//
// left outer join P_SchedProdnChgOrder as _chgorder on _plngdets.SimulationSessionID = _chgorder.SimulationSessionID
// and _OrderOperation.OrderID = _chgorder.OrderID
// and _OrderOperation.OrderCategory = _chgorder.OrderCategory
// and _chgorder.ProductionVersIsChgd = 'X'
association [1..1] to I_Product as _Product on _OrderOperation.Material = _Product.Product
association [1..1] to I_WorkCenter as _SimulatedWorkCenter on _SimulatedWorkCenter.WorkCenterInternalID = _chgoper.WorkCenterInternalID
association [0..1] to I_UnitOfMeasure as _Uom on _Uom.UnitOfMeasure = 'H'
/* added for Setup Group Key and Category */
// association [0..1] to I_SchedProdnVersRtgDetails as _ProdVersDetails on _ProdVersDetails.Material = _OrderOperation.Material
// and _ProdVersDetails.ProductionVersion = _chgoper.ProductionVersion
// and _ProdVersDetails.Operation = _chgoper.Operation
// and _ProdVersDetails.WorkCenterInternalID = _chgoper.WorkCenterInternalID
// and _ProdVersDetails.Plant = _OrderOperation.Plant
//
//
// association [0..1] to I_SchedProdnVersRtgDetails as _ProdnVersRtgDets on _ProdnVersRtgDets.ProductionVersion = _chgoper.ProductionVersion
// and _ProdnVersRtgDets.Operation = _chgoper.Operation
// and _ProdnVersRtgDets.WorkCenterInternalID = _chgoper.WorkCenterInternalID
// and _ProdnVersRtgDets.BillOfOperationsGroup = _OrderOperation.BillOfOperationsGroup
// and _ProdnVersRtgDets.BillOfOperationsType = _OrderOperation.BillOfOperationsType
association [0..1] to I_SchedProdnVersRtgDetails as _ProdnVersRtgDets on _ProdnVersRtgDets.Material = _OrderOperation.Material
and _ProdnVersRtgDets.ProductionVersion = _chgoper.ProductionVersion
and _ProdnVersRtgDets.Operation = _chgoper.Operation
and _ProdnVersRtgDets.WorkCenterInternalID = _chgoper.WorkCenterInternalID
and _ProdnVersRtgDets.Plant = _OrderOperation.Plant
{
key _plngdets.SimulationSessionID,
// key cast( _OrderOperation.OrderID as aufnr preserving type) as OrderID,
// key cast( _OrderOperation.OrderID as pph_cfs_ordernumber) as OrderID,
key _OrderOperation.OrderID as OrderID,
key _OrderOperation.CapacityRequirementItem,
key _OrderOperation.CapacityRqmtItemCapacity,
key _OrderOperation.OrderCategory,
key _OrderOperation.CapacityRequirement,
cast(case
when _chgoper.OrderID is null or _chgoper.ProductionVersIsChgd = ''
then cast ( _OrderOperation.Operation as vornr )
else
cast( _chgoper.Operation as vornr )
end as vornr preserving type ) as Operation,
_Product.ProductGroup,
// _Product.Product as Material,
_Product.Product,
_OrderOperation.Plant,
_OrderOperation.MRPArea,
_OrderOperation.MRPController,
_OrderOperation.LastChangeDateTime,
// _OrderOperation.CapacityRequirement,
case
when _chgoper.OrderID is null or _chgoper.ProductionVersIsChgd = ''
then _OrderOperation.WorkCenter
else
_SimulatedWorkCenter.WorkCenter
end as WorkCenter,
case
when _OrderOperation.PlantCurrentTime >= '240000'
then cast(cast(concat(dats_add_days(_OrderOperation.PlantCurrentDate,1,'NULL'),'000000')as abap.numc(15)) as timestamp)
else
cast(cast(concat(_OrderOperation.PlantCurrentDate,_OrderOperation.PlantCurrentTime)as abap.numc(15)) as timestamp)
end as PlantCurrentDateTime,
_OrderOperation.WorkCenter as MainWorkCenter,
case
when _chgoper.OrderID is null or _chgoper.ProductionVersIsChgd = ''
then _OrderOperation.WorkCenterInternalID
else
_SimulatedWorkCenter.WorkCenterInternalID
end as WorkCenterInternalID,
case
when _chgoper.OrderID is null or _chgoper.ProductionVersIsChgd = ''
then _OrderOperation.WorkCenterTypeCode
else
_SimulatedWorkCenter.WorkCenterTypeCode
end as WorkCenterTypeCode,
case
when _chgoper.OrderID is null or _chgoper.ProductionVersIsChgd = ''
then _OrderOperation.WorkCenterCategoryCode
else
_SimulatedWorkCenter.WorkCenterCategoryCode
end as WorkCenterCategoryCode,
case
when _chgoper.OrderID is null or _chgoper.ProductionVersIsChgd = ''
then _OrderOperation.CapacityInternalID
else
_SimulatedWorkCenter.CapacityInternalID
end as CapacityInternalID,
case
when _chgoper.OrderID is null or _chgoper.ProductionVersIsChgd = ''
then _OrderOperation.CapacityCategoryCode
else
_SimulatedWorkCenter._Capacity.CapacityCategoryCode
end as CapacityCategoryCode,
case
when _chgoper.OrderID is null or _chgoper.ProductionVersIsChgd = ''
then _OrderOperation.WorkCenterResponsible
else
_SimulatedWorkCenter.WorkCenterResponsible
end as WorkCenterResponsible,
case
when _chgoper.OrderID is null or _chgoper.ProductionVersIsChgd = ''
then _OrderOperation.CapacityResponsiblePlanner
else
_SimulatedWorkCenter._Capacity.CapacityResponsiblePlanner
end as CapacityResponsiblePlanner,
case
when _chgoper.OrderID is null or _chgoper.ProductionVersIsChgd = ''
then
_OrderOperation.ProductionVersion
else
_chgoper.ProductionVersion
end as ProductionVersion,
case
when _chgoper.OrderID is null or _chgoper.ProductionVersIsChgd = ''
then _OrderOperation.ProductionLine
else
_SimulatedWorkCenter.WorkCenter
end as ProductionLine,
_OrderOperation.IndustryType,
_OrderOperation.ProductionLine as MainProductionLine,
case
when _chgoper.OrderID is null
then _OrderOperation.OperationPlanningStatusCode
else _chgoper.OperationPlanningStatusCode
end as OperationPlanningStatusCode,
case
when _chgoper.OrderID is null
then
_OrderOperation.OperationLatestStartDate
else
_chgoper.OperationLatestStartDate
end as OperationLatestStartDate,
case
when _chgoper.OrderID is null
then
_OrderOperation.OperationLatestStartTime
else
_chgoper.OperationLatestStartTime
end as OperationLatestStartTime,
case
when _chgoper.OrderID is null
then
_OrderOperation.LtstSchedldExecStrtDteTme
else
_chgoper.LtstSchedldExecStrtDteTme
end as LtstSchedldExecStrtDteTme,
_OrderOperation.LtstSchedldExecStrtDteTme as OrderOperationStartDateTime,
case
when _chgoper.OrderID is null
then
_OrderOperation.OperationLatestEndDate
else
_chgoper.OperationLatestEndDate
end as OperationLatestEndDate,
case
when _chgoper.OrderID is null
then
_OrderOperation.OperationLatestEndTime
else
_chgoper.OperationLatestEndTime
end as OperationLatestEndTime,
case
when _chgoper.OrderID is null
then
_OrderOperation.LtstSchedldExecEndDteTme
else
_chgoper.LtstSchedldExecEndDteTme
end as LtstSchedldExecEndDteTme,
_OrderOperation.LtstSchedldExecEndDteTme as OrderOperationEndDateTime,
_OrderOperation.RequirementDate,
cast( _OrderOperation.OrderPlannedTotalQty as mgvrg preserving type) as OrderPlannedTotalQty,
case
when _chgoper.BaseUnit is null or _chgoper.ProductionVersIsChgd = ''
then
cast( _OrderOperation.BaseUnit as meins)
else
cast( _chgoper.BaseUnit as meins )
end as BaseUnit,
_Uom.UnitOfMeasure,
_Uom.UnitOfMeasure_E,
// _noofSOS.NumberOfSOS,
cast(
case
when _chgoper.OrderID is null or _chgoper.ProductionVersIsChgd = ''
then ( _OrderOperation.RemCapReqOpSegSetupDurnInHours + _OrderOperation.RemCapReqOpSegProcgDurnInHours + _OrderOperation.RemCapReqOpSegTrdwnDurnInHours )
else ( (_chgoper.RemainingCapReqOpSegSetupDurn + _chgoper.RemainingCapReqOpSegProcgDurn + _chgoper.RemainingCapReqOpSegTrdwnDurn) / cast(3600 as abap.fltp) )
end as pph_cfs_sch_required_cap_fltp ) as RemainingCapReqExecutionDurn,
/* case
when _OrderOperation.ScheduledBasicStartTime >= '240000'
then cast(cast(concat(dats_add_days(_OrderOperation.ScheduledBasicStartDate,1,'NULL'),'000000')as abap.numc(15))as timestamp)
else
cast(cast(concat(_OrderOperation.ScheduledBasicStartDate,_OrderOperation.ScheduledBasicStartTime)as abap.numc(15)) as timestamp)
end as SchedldOrdStartDteTme,
case
when _OrderOperation.ScheduledBasicEndTime >= '240000'
then cast(cast(concat(dats_add_days(_OrderOperation.ScheduledBasicEndDate,1,'NULL'),'000000')as abap.numc(15))as timestamp)
else
cast(cast(concat(_OrderOperation.ScheduledBasicEndDate,_OrderOperation.ScheduledBasicEndTime)as abap.numc(15)) as timestamp)
end as SchedldOrdEndDteTme,
*/
_OrderOperation.LtstSchedldExecStrtDteTme as SchedldOrdStartDteTme,
_OrderOperation.LtstSchedldExecEndDteTme as SchedldOrdEndDteTme,
_chgoper.ProductionVersIsChgd,
_OrderOperation.BOOExplosionDate,
_OrderOperation.BOMExplosionDate,
_OrderOperation.PlndOrderPlannedStartDate,
_OrderOperation.PlndOrderPlannedEndDate,
_OrderOperation.ManufacturingOrder,
_OrderOperation.PlannedOrder,
_OrderOperation.OrderInternalID,
_OrderOperation.OrderOperationInternalID, // for Order Operation extensibility
cast( _OrderOperation.OrderID as aufnr) as OrderIDForUsrInterface,
_OrderOperation.OrderObjectInternalID,
case
when _chgoper.OrderID is null
then ''
else 'X'
end as OrderIsChangedInSimulation,
_OrderOperation.OperationIsPhase,
// _OrderOperation.OrderOperationIsFirstInSqnc,
cast(case
when SchedFrstOp.Operation is not initial
then
'X'
when SchedFrstOp.Operation is initial
then ' '
end as ppsch_is_first_operation_ind ) as OrderOperationIsFirstInSqnc,
StatusCode,
_plngdets.SchedulingDirection,
_OrderOperation.OriginallyScheduledStartDate,
_OrderOperation.OriginallyScheduledEndDate,
/*Setup Group Key*/
case
when _chgoper.ProductionVersIsChgd = 'X' then
_ProdnVersRtgDets.OperationSetupGroup
else
_OrderOperation.OperationSetupGroup
end as OperationSetupGroup,
/*Setup Group Category*/
case
when _chgoper.ProductionVersIsChgd = 'X'
then
_ProdnVersRtgDets.OperationSetupGroupCategory
else
_OrderOperation.OperationSetupGroupCategory
end as OperationSetupGroupCategory,
/* Firming Indicator*/
case
when _chgoper.PlannedOrderIsFirm is not null
then
_chgoper.PlannedOrderIsFirm
else
_OrderOperation.PlannedOrderIsFirm
end as PlannedOrderIsFirm,
/* AVC configuration */
OrderHasConfiguration,
@Semantics.dateTime:true
ScheduledOrderReceiptDateTime,
_OrderOperation.MRPAreaText as MRPAreaText,
_OrderOperation.ProductConfiguration as ProductConfiguration, //exposing for AVC configuration
_OrderOperation.OrderIsDependentCollvOrder as OrderIsDependentCollvOrder,
_OrderOperation.SalesOrder,
_OrderOperation.SalesOrderItem,
_OrderOperation.PlantTimeZone
}
where
_plngdets.IndustryType is null
or(
_OrderOperation.IndustryType = _plngdets.IndustryType
or _OrderOperation.OrderCategory = '30'
)
//and ( _chgorder.ProductionVersIsChgd is null or
//(_chgorder.ProductionVersIsChgd = 'X' and _chgoper.CapacityRequirementItem is not null ) )
// and ( SchedFrstOp.OperationLatestStartDate <= OriginallyScheduledEndDate
//and SchedFrstOp.OperationLatestEndDate >= OriginallyScheduledStartDate )
//and _OrderOperation.CapacityRequirement = SchedFrstOp.CapacityRequirement
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CAPACITY",
"I_PRODUCT",
"I_SCHEDPRODNCHGOP",
"I_SCHEDPRODNPLNGDETS",
"I_SCHEDPRODNVERSRTGDETAILS",
"I_UNITOFMEASURE",
"I_WORKCENTER",
"P_SCHEDFIRSTOPERATION_VERS_2",
"P_SCHEDOPERATIONS_VERSION_2"
],
"ASSOCIATED":
[
"I_PRODUCT",
"I_SCHEDPRODNVERSRTGDETAILS",
"I_UNITOFMEASURE",
"I_WORKCENTER"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/