P_RSHWCCapacityDefinitio_Cache

DDL: P_RSHWCCAPACITYDEFINITIO_CACHE SQL: PRSHWCCPDFCACHE Type: view CONSUMPTION

Work Center Capacity Definition

P_RSHWCCapacityDefinitio_Cache is a Consumption CDS View that provides data about "Work Center Capacity Definition" in SAP S/4HANA. It reads from 1 data source (P_RSHWCCapaInterDetails_Cache) and exposes 19 fields with key fields CapacityInternalID, ValidityEndDateendasValidityEndDate, WeekDay, AvailableCapacityShift, CapacityStartTimeasCapacityStartTime.

Data Sources (1)

SourceAliasJoin Type
P_RSHWCCapaInterDetails_Cache header_and_interval from

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName PRSHWCCPDFCACHE view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
VDM.viewType #CONSUMPTION view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Work Center Capacity Definition view
AbapCatalog.preserveKey true view

Fields (19)

KeyFieldSource TableSource FieldDescription
KEY CapacityInternalID P_RSHWCCapaInterDetails_Cache CapacityInternalID Capacity ID
KEY ValidityEndDateendasValidityEndDate
KEY WeekDay
KEY AvailableCapacityShift
KEY CapacityStartTimeasCapacityStartTime
CapacityEndTimeasCapacityEndTime
AvailableCapacityIntervalDurn P_RSHWCCapaInterDetails_Cache AvailableCapacityIntervalDurn
WorkDayRule P_RSHWCCapaInterDetails_Cache WorkDayRule Recurrence Weekdays
CapacityNumberOfCapacities
CapacityPlanUtilizationPercent
WorkCenterInternalID P_RSHWCCapaInterDetails_Cache WorkCenterInternalID Work Center
WorkCenter P_RSHWCCapaInterDetails_Cache WorkCenter Work Center
WorkCenterCategoryCode P_RSHWCCapaInterDetails_Cache WorkCenterCategoryCode
WorkCenterTypeCode P_RSHWCCapaInterDetails_Cache WorkCenterTypeCode Object Type
Plant P_RSHWCCapaInterDetails_Cache Plant Valuation Area
FactoryCalendar P_RSHWCCapaInterDetails_Cache FactoryCalendar Factory Calendar
CapacityActiveVersion P_RSHWCCapaInterDetails_Cache CapacityActiveVersion
IntervalValidityEndDate P_RSHWCCapaInterDetails_Cache IntervalValidityEndDate
ShiftValidityEndDate shift ValidityEndDate ValidTo

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_RSHWCCapacityDefinitio_Cache.
-- 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: PRSHWCCPDFCACHE

CREATE VIEW P_RSHWCCapacityDefinitio_Cache AS
SELECT
  header_and_interval.CapacityInternalID AS CapacityInternalID,
  case when (shift_def.ShiftDefinition is not null and shift_def.ShiftEndDate < header_and_interval.ValidityEndDate ) then shift_def.ShiftEndDate else header_and_interval.ValidityEndDate end as ValidityEndDate AS ValidityEndDateendasValidityEndDate,
  coalesce( right( shift.WeekDay, 1), '1' ) AS WeekDay,
  coalesce( shift.AvailableCapacityShift, '' ) AS AvailableCapacityShift,
  coalesce( coalesce( shift_def.CapacityStartTimeID, shift.CapacityStartTimeID ), header_and_interval.CapacityStartTime ) as CapacityStartTime AS CapacityStartTimeasCapacityStartTime,
  coalesce( coalesce( shift_def.CapacityEndTimeID, shift.CapacityEndTimeID ), header_and_interval.CapacityEndTime) as CapacityEndTime AS CapacityEndTimeasCapacityEndTime,
  header_and_interval.AvailableCapacityIntervalDurn AS AvailableCapacityIntervalDurn,
  header_and_interval.WorkDayRule AS WorkDayRule,
  coalesce( shift.CapacityNumberOfCapacities, header_and_interval.CapacityNumberOfCapacities) AS CapacityNumberOfCapacities,
  coalesce( shift.CapacityPlanUtilizationPercent, header_and_interval.CapacityPlanUtilizationPercent) AS CapacityPlanUtilizationPercent,
  header_and_interval.WorkCenterInternalID AS WorkCenterInternalID,
  header_and_interval.WorkCenter AS WorkCenter,
  header_and_interval.WorkCenterCategoryCode AS WorkCenterCategoryCode,
  header_and_interval.WorkCenterTypeCode AS WorkCenterTypeCode,
  header_and_interval.Plant AS Plant,
  header_and_interval.FactoryCalendar AS FactoryCalendar,
  header_and_interval.CapacityActiveVersion AS CapacityActiveVersion,
  header_and_interval.IntervalValidityEndDate AS IntervalValidityEndDate,
  shift.ValidityEndDate AS ShiftValidityEndDate
FROM P_RSHWCCapaInterDetails_Cache AS header_and_interval
;