P_WORKCENTERHEADERCAPACITY
Work Center Header Capacity
P_WORKCENTERHEADERCAPACITY is a CDS View in S/4HANA. Work Center Header Capacity. It contains 15 fields. 1 CDS views read from this table.
CDS Views using this table (1)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| P_WorkCenterCapacityDefinition | view | from | COMPOSITE | Work Center Capacity Definition |
Fields (15)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| KEY | CapacityCategoryAllocation | CapacityCategoryAllocation | 1 |
| KEY | CapacityInternalID | CapacityInternalID | 1 |
| KEY | WorkCenterInternalID | WorkCenterInternalID | 1 |
| KEY | WorkCenterTypeCode | WorkCenterTypeCode | 1 |
| Capacity | Capacity | 1 | |
| CapacityCategoryCode | CapacityCategoryCode | 1 | |
| CapacityCategoryName | CapacityCategoryName | 1 | |
| CapacityResponsiblePlanner | CapacityResponsiblePlanner | 1 | |
| FactoryCalendar | FactoryCalendar | 1 | |
| Plant | Plant | 1 | |
| ShiftGroup | ShiftGrouping | 1 | |
| WorkCenter | WorkCenter | 1 | |
| WorkCenterCategoryCode | WorkCenterCategoryCode | 1 | |
| WorkCenterDesc | WorkCenterDesc | 1 | |
| WorkCenterResponsible | WorkCenterResponsible | 1 |
@AbapCatalog.sqlViewName: 'PWORKCTRHDRCAP'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM: {
private: true,
viewType: #COMPOSITE
}
@ClientHandling.algorithm: #SESSION_VARIABLE
//@EndUserText.label: 'Work Center Header Capacity'
define view P_WorkCenterHeaderCapacity
as select from P_WorkCenterHeaderCapDef as Capacity {
key Capacity.WorkCenterInternalID as WorkCenterInternalID,
key Capacity.WorkCenterTypeCode as WorkCenterTypeCode,
key Capacity.CapacityCategoryAllocation as CapacityCategoryAllocation,
key Capacity.CapacityInternalID as CapacityInternalID,
Capacity.WorkCenter as WorkCenter,
Capacity.Plant as Plant,
Capacity.FactoryCalendar as FactoryCalendar,
Capacity.WorkCenterResponsible as WorkCenterResponsible,
Capacity.WorkCenterDesc as WorkCenterDesc,
Capacity.WorkCenterCategoryCode as WorkCenterCategoryCode,
cast('00000000' as dats) as ValidityBeginDate,
cast('99991231' as dats) as ValidityEndDate,
Capacity.CapacityEndTime as CapacityEndTime,
Capacity.CapacityStartTime as CapacityStartTime,
Capacity.CapacityNumberOfCapacities as CapacityNumberOfCapacities,
Capacity.CapacityPlanUtilizationPercent as CapacityPlanUtilizationPercent,
Capacity.CapacityBreakDuration as CapacityBreakDuration,
Capacity.CapacityCategoryCode as CapacityCategoryCode,
Capacity.CapacityCategoryName as CapacityCategoryName,
Capacity.Capacity as Capacity,
// Capacity.CapacityText as CapacityText,
Capacity.CapacityResponsiblePlanner as CapacityResponsiblePlanner,
case when OperatingDurationWithoutBreak <= CapacityBreakDuration
-- if the break is longer or equal to the opening hours, we have 0 capacity
then 0
-- Calculate the capacity, based on Capacity Start Date, End Date , Break down Duration, number of Capacities and plan utilization percent
else cast((OperatingDurationWithoutBreak - CapacityBreakDuration) as abap.fltp) * cast(CapacityNumberOfCapacities as abap.fltp) * cast(CapacityPlanUtilizationPercent as abap.fltp )/ cast(100 as abap.fltp)
end as OverallCapacity,
case when OperatingDurationWithoutBreak <= CapacityBreakDuration
-- if the break is longer or equal to the opening hours, we have 0 capacity
then 0
-- Calculate the Single capacity based on Capacity StartTime, EndTime and Break Duration
else OperatingDurationWithoutBreak - CapacityBreakDuration
end as SingleCapacity,
case when OperatingDurationWithoutBreak <= CapacityBreakDuration
-- if the break is longer or equal to the opening hours, we have 0 capacity
then 0
-- Calculate the capacity, based on Capacity Start Date, End Date and plan utilization percent
else cast((OperatingDurationWithoutBreak - CapacityBreakDuration) as abap.fltp) * cast(CapacityPlanUtilizationPercent as abap.fltp )/ cast(100 as abap.fltp)
end as CapacityOperatingDuration,
Capacity.ShiftGroup as ShiftGroup,
Capacity.CapacityActiveVersion as CapacityActiveVersion
}