I_WorkCenterAvailableCapacity

DDL: I_WORKCENTERAVAILABLECAPACITY SQL: IWRKCTRAVAILCAP Type: view COMPOSITE Package: PPH_VDM_CAP_EVAL

Total Available Capacity of Work Center

I_WorkCenterAvailableCapacity is a Composite CDS View that provides data about "Total Available Capacity of Work Center" in SAP S/4HANA. It reads from 1 data source (P_WorkCenterAvailableCapacity) and exposes 33 fields with key fields WorkCenterInternalID, WorkCenterTypeCode, CapacityCategoryAllocation, CapacityInternalID, CapacityActiveVersion. It has 2 associations to related views. Part of development package PPH_VDM_CAP_EVAL.

Data Sources (1)

SourceAliasJoin Type
P_WorkCenterAvailableCapacity availCapa from

Associations (2)

CardinalityTargetAliasCondition
[0..*] I_ShiftDefinitionText _Text $projection.ShiftDefinition = _Text.ShiftDefinition and $projection.ShiftGrouping = _Text.ShiftGrouping
[1..1] I_Capacity _Capacity $projection.CapacityInternalID = _Capacity.CapacityInternalID

Annotations (9)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.sqlViewName IWRKCTRAVAILCAP view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #COMPOSITE view
EndUserText.label Total Available Capacity of Work Center view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view

Fields (33)

KeyFieldSource TableSource FieldDescription
KEY WorkCenterInternalID P_WorkCenterAvailableCapacity WorkCenterInternalID Work Center
KEY WorkCenterTypeCode P_WorkCenterAvailableCapacity WorkCenterTypeCode Object Type
KEY CapacityCategoryAllocation P_WorkCenterAvailableCapacity CapacityCategoryAllocation
KEY CapacityInternalID P_WorkCenterAvailableCapacity CapacityInternalID Capacity ID
KEY CapacityActiveVersion P_WorkCenterAvailableCapacity CapacityActiveVersion
KEY ValidityEndDate P_WorkCenterAvailableCapacity ValidityEndDate ValidTo
KEY WeekDay P_WorkCenterAvailableCapacity WeekDay Weekdays
KEY AvailableCapacityShift
KEY CalendarDate P_WorkCenterAvailableCapacity CalendarDate Calendar Date
ShiftStartDate
ShiftStartTime
ShiftEndDate
ShiftEndTime
CapacityBreakDuration
WorkCenterCapacityUnit P_WorkCenterAvailableCapacity WorkCenterCapacityUnit
WorkCenterUtilizationUnit P_WorkCenterAvailableCapacity WorkCenterUtilizationUnit
ValidityBeginDate
CalendarMonth P_WorkCenterAvailableCapacity CalendarMonth Calendar Month
CalendarYear P_WorkCenterAvailableCapacity CalendarYear Year
CalendarWeek P_WorkCenterAvailableCapacity CalendarWeek Calendar Week
WorkDays
ShiftName
ShiftDefinition P_WorkCenterAvailableCapacity ShiftDefinition
ShiftDefinitionName
ShiftGrouping P_WorkCenterAvailableCapacity ShiftGrouping Shift Grouping
WorkDayRule
FactoryCalendar P_WorkCenterAvailableCapacity FactoryCalendar Factory Calendar
CapacityStartTime
CapacityEndTime
CapacityNumberOfCapacities P_WorkCenterAvailableCapacity CapacityNumberOfCapacities
CapacityPlanUtilizationPercent P_WorkCenterAvailableCapacity CapacityPlanUtilizationPercent
TotOperatingDurationInHours
_Capacity _Capacity

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view I_WorkCenterAvailableCapacity.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: IWRKCTRAVAILCAP

CREATE VIEW I_WorkCenterAvailableCapacity AS
SELECT
  availCapa.WorkCenterInternalID AS WorkCenterInternalID,
  availCapa.WorkCenterTypeCode AS WorkCenterTypeCode,
  availCapa.CapacityCategoryAllocation AS CapacityCategoryAllocation,
  availCapa.CapacityInternalID AS CapacityInternalID,
  availCapa.CapacityActiveVersion AS CapacityActiveVersion,
  availCapa.ValidityEndDate AS ValidityEndDate,
  availCapa.WeekDay AS WeekDay,
  cast (availCapa.AvailableCapacityShift as char1) AS AvailableCapacityShift,
  availCapa.CalendarDate AS CalendarDate,
  cast (availCapa.ShiftStartDate as datub) AS ShiftStartDate,
  cast (availCapa.ShiftStartTime as kapbegzeit) AS ShiftStartTime,
  cast (availCapa.ShiftEndDate as datub) AS ShiftEndDate,
  cast (availCapa.ShiftEndTime as kapbegzeit) AS ShiftEndTime,
  fltp_to_dec(availCapa.CapacityBreakDuration as pph_cap_eval_breakhours) AS CapacityBreakDuration,
  availCapa.WorkCenterCapacityUnit AS WorkCenterCapacityUnit,
  availCapa.WorkCenterUtilizationUnit AS WorkCenterUtilizationUnit,
  cast (availCapa.ValidityBeginDate as datub) AS ValidityBeginDate,
  availCapa.CalendarMonth AS CalendarMonth,
  availCapa.CalendarYear AS CalendarYear,
  availCapa.CalendarWeek AS CalendarWeek,
  cast (availCapa.workdays as int4) AS WorkDays,
  cast (availCapa.ShiftName as char4) AS ShiftName,
  availCapa.ShiftDefinition AS ShiftDefinition,
  _Text[1:Language=$session.system_language].ShiftDefinitionName AS ShiftDefinitionName,
  availCapa.ShiftGrouping AS ShiftGrouping,
  cast (availCapa.WorkDayRule as kapfabtag) AS WorkDayRule,
  availCapa.FactoryCalendar AS FactoryCalendar,
  cast (availCapa.CapacityStartTime as kapbegzt) AS CapacityStartTime,
  cast( availCapa.CapacityEndTime as kapendzt) AS CapacityEndTime,
  availCapa.CapacityNumberOfCapacities AS CapacityNumberOfCapacities,
  availCapa.CapacityPlanUtilizationPercent AS CapacityPlanUtilizationPercent,
  cast(round(fltp_to_dec(availCapa.TotOperatingDurationInHours as abap.dec(10,5)),2) as kapazit_eh) AS TotOperatingDurationInHours
FROM P_WorkCenterAvailableCapacity AS availCapa
LEFT OUTER JOIN I_ShiftDefinitionText AS _Text ON ShiftDefinition = _Text.ShiftDefinition AND ShiftGrouping = _Text.ShiftGrouping  -- association [0..*]
LEFT OUTER JOIN I_Capacity AS _Capacity ON CapacityInternalID = _Capacity.CapacityInternalID  -- association [1..1]
;