P_RSHWCCapaHdrAndIntrval_Cache

DDL: P_RSHWCCAPAHDRANDINTRVAL_CACHE SQL: PRSHWCINTCACHE Type: view CONSUMPTION

The view lists all the intervals

P_RSHWCCapaHdrAndIntrval_Cache is a Consumption CDS View that provides data about "The view lists all the intervals" in SAP S/4HANA. It reads from 1 data source (P_RSHWCHeaderCapacity_Cache) and exposes 29 fields with key fields CapacityInternalID, ValidityEndDate.

Data Sources (1)

SourceAliasJoin Type
P_RSHWCHeaderCapacity_Cache header from

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName PRSHWCINTCACHE view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
VDM.private true view
VDM.viewType #CONSUMPTION view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label The view lists all the intervals view

Fields (29)

KeyFieldSource TableSource FieldDescription
KEY CapacityInternalID P_RSHWCHeaderCapacity_Cache CapacityInternalID Capacity ID
KEY ValidityEndDate
HeaderValidityBeginDate P_RSHWCHeaderCapacity_Cache ValidityBeginDate
HeaderValidityEndDate P_RSHWCHeaderCapacity_Cache ValidityEndDate ValidTo
IntervalValidityEndDate interval ValidityEndDate ValidTo
WorkCenterInternalID P_RSHWCHeaderCapacity_Cache WorkCenterInternalID Work Center
ValidityBeginDate P_RSHWCHeaderCapacity_Cache ValidityBeginDate
CapacityStartTime P_RSHWCHeaderCapacity_Cache CapacityStartTime
CapacityEndTime P_RSHWCHeaderCapacity_Cache CapacityEndTime
CapacityNumberOfCapacities P_RSHWCHeaderCapacity_Cache CapacityNumberOfCapacities
CapacityPlanUtilizationPercent P_RSHWCHeaderCapacity_Cache CapacityPlanUtilizationPercent
CapacityBreakDuration P_RSHWCHeaderCapacity_Cache CapacityBreakDuration
wehave0capacitythen0Calculatethecapacity
basedonCapacityStartDate
EndDate
BreakdownDuration
fltpendasTotOperatingDurationInSeconds
fltpendasOperatingDurationInSeconds
WorkCenter P_RSHWCHeaderCapacity_Cache WorkCenter Work Center
WorkCenterCategoryCode P_RSHWCHeaderCapacity_Cache WorkCenterCategoryCode
WorkCenterTypeCode P_RSHWCHeaderCapacity_Cache WorkCenterTypeCode Object Type
Plant P_RSHWCHeaderCapacity_Cache Plant Valuation Area
FactoryCalendar P_RSHWCHeaderCapacity_Cache FactoryCalendar Factory Calendar
ShiftGroup P_RSHWCHeaderCapacity_Cache ShiftGroup Shift Grouping
CapacityActiveVersion P_RSHWCHeaderCapacity_Cache CapacityActiveVersion
AvailableCapacityIntervalDurn
WorkDayRule
StdAvailableCapacityIsValid interval StdAvailableCapacityIsValid
AvailableCapacityType interval AvailableCapacityType

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_RSHWCCapaHdrAndIntrval_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: PRSHWCINTCACHE

CREATE VIEW P_RSHWCCapaHdrAndIntrval_Cache AS
SELECT
  header.CapacityInternalID AS CapacityInternalID,
  coalesce( interval.ValidityEndDate, header.ValidityEndDate ) AS ValidityEndDate,
  header.ValidityBeginDate AS HeaderValidityBeginDate,
  header.ValidityEndDate AS HeaderValidityEndDate,
  interval.ValidityEndDate AS IntervalValidityEndDate,
  header.WorkCenterInternalID AS WorkCenterInternalID,
  header.ValidityBeginDate AS ValidityBeginDate,
  header.CapacityStartTime AS CapacityStartTime,
  header.CapacityEndTime AS CapacityEndTime,
  header.CapacityNumberOfCapacities AS CapacityNumberOfCapacities,
  header.CapacityPlanUtilizationPercent AS CapacityPlanUtilizationPercent,
  header.CapacityBreakDuration AS CapacityBreakDuration,
  we have 0 capacity then 0 AS wehave0capacitythen0Calculatethecapacity,
  based on Capacity Start Date AS basedonCapacityStartDate,
  End Date AS EndDate,
  Break down Duration AS BreakdownDuration,
  number of Capacities and plan utilization percent else cast((header.OperatingDurationWithoutBreak - header.CapacityBreakDuration) as abap.fltp) * cast(header.CapacityNumberOfCapacities as abap.fltp) * cast(header.CapacityPlanUtilizationPercent as abap.fltp )/ cast(100 as abap.fltp) end as TotOperatingDurationInSeconds AS fltpendasTotOperatingDurationInSeconds,
  EndTime and Break Duration. AS fltpendasOperatingDurationInSeconds,
  header.WorkCenter AS WorkCenter,
  header.WorkCenterCategoryCode AS WorkCenterCategoryCode,
  header.WorkCenterTypeCode AS WorkCenterTypeCode,
  header.Plant AS Plant,
  header.FactoryCalendar AS FactoryCalendar,
  header.ShiftGroup AS ShiftGroup,
  header.CapacityActiveVersion AS CapacityActiveVersion,
  coalesce( interval.AvailableCapacityIntervalDurn, '01' ) AS AvailableCapacityIntervalDurn,
  coalesce( interval.WorkDayRule, '' ) AS WorkDayRule,
  interval.StdAvailableCapacityIsValid AS StdAvailableCapacityIsValid,
  interval.AvailableCapacityType AS AvailableCapacityType
FROM P_RSHWCHeaderCapacity_Cache AS header
;