P_RSHWCUTILIZATIONPERWEEK
P_RSHWCUTILIZATIONPERWEEK is a CDS View in S/4HANA. 1 CDS views read from this table.
CDS Views using this table (1)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| C_RSHWrkCtrUtilizationKPI | view | from | CONSUMPTION | Work Center Utilization Overview |
@AbapCatalog.sqlViewName: 'PRSHWCUTILPW'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private: true
@VDM.viewType: #CONSUMPTION
@ClientHandling.algorithm: #SESSION_VARIABLE
/*
CONTRACT**********************************************************************************************************************
Name: Work Center Utilization for the supplied period
Specification: This view calculates work center utilization percentage values using
WorkCenterRequiredCapacity and WorkCenterAvailableCapacity
Requires: Time period for which work center utilization needs to be calculated
Ensures: Work Center Utilization is calculated for the supplied time frame
Owners: AN
Contributors: PRP
Unit Test required Y/N: Yes
Additional comments None
END OF CONTRACT***************************************************************************************************************
*/
define view P_RSHWCUtilizationPerWeek
with parameters
P_StartDate : datum,
P_EndDate : datum
as select from P_RSHWCConsumptionPerWeek( P_StartDate : $parameters.P_StartDate, P_EndDate : $parameters.P_EndDate) as Utilization
{
Utilization.WorkCenter,
Utilization.YearWeek,
Utilization.CalendarWeek,
Utilization.Plant,
Utilization.WorkCenterCategoryCode,
Utilization.WorkCenterAvailableCapacity,
Utilization.WorkCenterRequiredCapacity,
case when WorkCenterAvailableCapacity = 0 and WorkCenterRequiredCapacity = 0 then 0
// if capacity is 0, but required work is >0, utilization is 999%
when WorkCenterAvailableCapacity = 0 and WorkCenterRequiredCapacity > 0 then 999
// if capacity is not 0, utilization is required work / capacity. Multiply with 100 to get percentage value
else DIVISION( fltp_to_dec ( WorkCenterRequiredCapacity as abap.dec(24,2)) *100 , fltp_to_dec ( WorkCenterAvailableCapacity as abap.dec(24,2)) , 2 )
end as WorkCenterUtilization,
Utilization.WorkCenterInternalID,
Utilization.WorkCenterTypeCode
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"P_RSHWCCONSUMPTIONPERWEEK"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/