P_WORKCENTEROPDISTRPCT

CDS View

WorkCenter- Operation Total capactiy

P_WORKCENTEROPDISTRPCT is a CDS View in S/4HANA. WorkCenter- Operation Total capactiy. 2 CDS views read from this table.

CDS Views using this table (2)

ViewTypeJoinVDMDescription
P_WORKCENTERCAPACITYEVAL view left_outer COMPOSITE WorkCenter - Capacity Evaluation
P_WrkCtrOpShiftLoadDistr view inner COMPOSITE Load Distribution at shift level for operations
@AbapCatalog.sqlViewName: 'PWCOPDISTRPCT'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.viewType: #COMPOSITE
@VDM: {
  private: true
}
@ClientHandling.algorithm: #SESSION_VARIABLE

define view P_WorkCenterOpDistrPct
    with parameters 
    P_StartDate : datum,
    P_EndDate   : datum
  as select from P_WrkCtrCapOpWrkDays(P_StartDate : $parameters.P_StartDate, 
                                        P_EndDate : $parameters.P_EndDate,
                                        P_HorizonFlag:'N') as CapacityPerShift
{
  key CapacityPerShift.WorkCenterInternalID,
  key CapacityPerShift.WorkCenterTypeCode,
  key CapacityPerShift.CapacityCategoryAllocation,
  key CapacityPerShift.CapacityInternalID,
  key CapacityPerShift.CapacityRequirement,
  key CapacityPerShift.Operation,
  CapacityPerShift.WorkCenter,
  CapacityPerShift.TotRequirementInSeconds,
  sum(CapacityPerShift.CalCapacityInParallel)      as TotalAvailableCapacity,
  ((cast(CapacityPerShift.TotRequirementInSeconds as abap.fltp)  / cast( sum(CapacityPerShift.CalCapacityInParallel) as abap.fltp)) * cast( 100 as abap.fltp)) as CapacityDistrPercent
}
where CeiledCalCapInParellel <> 0
group by
  CapacityPerShift.WorkCenterInternalID,
  CapacityPerShift.WorkCenterTypeCode,
  CapacityPerShift.CapacityCategoryAllocation,
  CapacityPerShift.WorkCenter,
  CapacityPerShift.CapacityInternalID,
  CapacityPerShift.CapacityRequirement,
  TotRequirementInSeconds,
  CapacityPerShift.Operation