P_RSHCapacityInOpTimeFrame

DDL: P_RSHCAPACITYINOPTIMEFRAME SQL: PRSHCAPOPTMFR Type: view CONSUMPTION

P_RSHCapacityInOpTimeFrame is a Consumption CDS View in SAP S/4HANA. It reads from 3 data sources (P_RSHCALWORKDAYS, P_RSHOperationTimeFrame, P_RSHWCCapacityWithNights) and exposes 23 fields with key fields CapacityInternalID, CalendarDate.

Data Sources (3)

SourceAliasJoin Type
P_RSHCALWORKDAYS P_RSHCALWORKDAYS from
P_RSHOperationTimeFrame P_RSHOperationTimeFrame cross
P_RSHWCCapacityWithNights WorkCenterCapacity inner

Parameters (2)

NameTypeDefault
P_StartDate datum
P_EndDate datum

Annotations (5)

NameValueLevelField
AbapCatalog.sqlViewName PRSHCAPOPTMFR view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
VDM.viewType #CONSUMPTION view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (23)

KeyFieldSource TableSource FieldDescription
KEY CapacityInternalID date_series CapacityInternalID Capacity ID
KEY CalendarDate CalendarDate Calendar Date
FactoryCalendarDate CalendarDate Calendar Date
WeekDay date_series WeekDay Weekdays
WorkDays WorkDays
ValidityEndDate P_RSHWCCapacityWithNights ValidityEndDate ValidTo
AvailableCapacityShift P_RSHWCCapacityWithNights AvailableCapacityShift Capacity Shift
CapacityStartTime P_RSHWCCapacityWithNights CapacityStartTime
ValidityBeginDate P_RSHWCCapacityWithNights ValidityBeginDate
NightSplitDate P_RSHWCCapacityWithNights NightSplitDate
AvailableCapacityIntervalDurn P_RSHWCCapacityWithNights AvailableCapacityIntervalDurn
WorkDayRule P_RSHWCCapacityWithNights WorkDayRule Recurrence Weekdays
CapacityEndTime P_RSHWCCapacityWithNights CapacityEndTime
TotOperatingDurationInSeconds P_RSHWCCapacityWithNights TotOperatingDurationInSeconds
OperatingDurationInSeconds P_RSHWCCapacityWithNights OperatingDurationInSeconds
CapacityNumberOfCapacities P_RSHWCCapacityWithNights CapacityNumberOfCapacities
CapacityPlanUtilizationPercent P_RSHWCCapacityWithNights CapacityPlanUtilizationPercent
WorkCenterInternalID P_RSHWCCapacityWithNights WorkCenterInternalID Work Center
WorkCenter P_RSHWCCapacityWithNights WorkCenter Work Center
WorkCenterCategoryCode P_RSHWCCapacityWithNights WorkCenterCategoryCode
WorkCenterTypeCode P_RSHWCCapacityWithNights WorkCenterTypeCode Object Type
Plant P_RSHWCCapacityWithNights Plant Valuation Area
FactoryCalendar P_RSHWCCapacityWithNights FactoryCalendar Factory Calendar

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 P_RSHCapacityInOpTimeFrame.
-- 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: PRSHCAPOPTMFR
-- Parameters: P_StartDate : datum, P_EndDate : datum

CREATE VIEW P_RSHCapacityInOpTimeFrame AS
SELECT
  date_series.CapacityInternalID AS CapacityInternalID,
  CalendarDate,
  CalendarDate AS FactoryCalendarDate,
  date_series.WeekDay AS WeekDay,
  WorkDays,
  WorkCenterCapacity.ValidityEndDate AS ValidityEndDate,
  WorkCenterCapacity.AvailableCapacityShift AS AvailableCapacityShift,
  WorkCenterCapacity.CapacityStartTime AS CapacityStartTime,
  WorkCenterCapacity.ValidityBeginDate AS ValidityBeginDate,
  WorkCenterCapacity.NightSplitDate AS NightSplitDate,
  WorkCenterCapacity.AvailableCapacityIntervalDurn AS AvailableCapacityIntervalDurn,
  WorkCenterCapacity.WorkDayRule AS WorkDayRule,
  WorkCenterCapacity.CapacityEndTime AS CapacityEndTime,
  WorkCenterCapacity.TotOperatingDurationInSeconds AS TotOperatingDurationInSeconds,
  WorkCenterCapacity.OperatingDurationInSeconds AS OperatingDurationInSeconds,
  WorkCenterCapacity.CapacityNumberOfCapacities AS CapacityNumberOfCapacities,
  WorkCenterCapacity.CapacityPlanUtilizationPercent AS CapacityPlanUtilizationPercent,
  WorkCenterCapacity.WorkCenterInternalID AS WorkCenterInternalID,
  WorkCenterCapacity.WorkCenter AS WorkCenter,
  WorkCenterCapacity.WorkCenterCategoryCode AS WorkCenterCategoryCode,
  WorkCenterCapacity.WorkCenterTypeCode AS WorkCenterTypeCode,
  WorkCenterCapacity.Plant AS Plant,
  WorkCenterCapacity.FactoryCalendar AS FactoryCalendar
FROM P_RSHCALWORKDAYS
CROSS JOIN P_RSHOperationTimeFrame
INNER JOIN P_RSHWCCapacityWithNights AS WorkCenterCapacity ON /* join condition not captured in parsed metadata */
;