P_WrkCtrCapEvalWrkDays

DDL: P_WRKCTRCAPEVALWRKDAYS SQL: PWRKCTREVALWD Type: view COMPOSITE

P_WrkCtrCapEvalWrkDays is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (P_WORKCENTERCAPACITYEVAL, P_WrkCtrAllWrkDayTableFunction) and exposes 50 fields with key fields WorkCenterInternalID, WorkCenterTypeCode, CapacityCategoryAllocation, CapacityInternalID, CalendarDate.

Data Sources (2)

SourceAliasJoin Type
P_WORKCENTERCAPACITYEVAL P_WORKCENTERCAPACITYEVAL left_outer
P_WrkCtrAllWrkDayTableFunction P_WrkCtrAllWrkDayTableFunction from

Parameters (2)

NameTypeDefault
P_StartDate datum
P_EndDate datum

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PWRKCTREVALWD view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #COMPOSITE view
VDM.private true view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (50)

KeyFieldSource TableSource FieldDescription
KEY WorkCenterInternalID WorkDays WorkCenterInternalID Work Center
KEY WorkCenterTypeCode WorkDays WorkCenterTypeCode Object Type
KEY CapacityCategoryAllocation WorkDays CapacityCategoryAllocation
KEY CapacityInternalID WorkDays CapacityInternalID Capacity ID
KEY CalendarDate WorkDays CalendarDate Calendar Date
KEY ShiftName OperationCapacityPerShift ShiftName
AvailableCapacityShift OperationCapacityPerShift AvailableCapacityShift Capacity Shift
Plant WorkDays Plant Valuation Area
MRPController OperationCapacityPerShift MRPController MRP Controller
WorkCenter WorkDays WorkCenter Work Center
FactoryCalendar OperationCapacityPerShift FactoryCalendar Factory Calendar
CalendarWeek WorkDays CalendarWeek Calendar Week
CalendarMonth WorkDays CalendarMonth Calendar Month
CalendarYear WorkDays CalendarYear Year
YearWeek WorkDays YearWeek Year and Calendar Week
WorkCenterResponsible WorkDays WorkCenterResponsible
WorkCenterCategoryCode WorkDays WorkCenterCategoryCode
CapacityCategoryCode WorkDays CapacityCategoryCode
Capacity WorkDays Capacity Engine Capacity
CapacityResponsiblePlanner WorkDays CapacityResponsiblePlanner
CapacityRequirement OperationCapacityPerShift CapacityRequirement
Operation OperationCapacityPerShift Operation Transaction
CapacityRequirementUnit OperationCapacityPerShift CapacityRequirementUnit
CapacityEndTime OperationCapacityPerShift CapacityEndTime
CapacityRequirementOrigin OperationCapacityPerShift CapacityRequirementOrigin
OrderInternalID OperationCapacityPerShift OrderInternalID Plan No.f.Oper.
OrderType OperationCapacityPerShift OrderType Order Type
ProductionVersion OperationCapacityPerShift ProductionVersion Version ID
OrderPlannedTotalQty OperationCapacityPerShift OrderPlannedTotalQty
BaseUnit OperationCapacityPerShift BaseUnit Unit of Measure
OperationPlanningStatusCode OperationCapacityPerShift OperationPlanningStatusCode
OperationLatestStartDate OperationCapacityPerShift OperationLatestStartDate
OperationLatestStartTime OperationCapacityPerShift OperationLatestStartTime
OperationLatestEndDate OperationCapacityPerShift OperationLatestEndDate
OperationLatestEndTime OperationCapacityPerShift OperationLatestEndTime
OpLtstSchedldExecStrtTme OperationCapacityPerShift OpLtstSchedldExecStrtTme
OpLtstSchedldExecEndTme OperationCapacityPerShift OpLtstSchedldExecEndTme
OpLtstSchedldProcgStrtDte OperationCapacityPerShift OpLtstSchedldProcgStrtDte
OpLtstSchedldProcgStrtTme OperationCapacityPerShift OpLtstSchedldProcgStrtTme
OpLtstSchedldTrdwnStrtDte OperationCapacityPerShift OpLtstSchedldTrdwnStrtDte
OpLtstSchedldTrdwnStrtTme OperationCapacityPerShift OpLtstSchedldTrdwnStrtTme
RemainingCapReqOpSegSetupDurn OperationCapacityPerShift RemainingCapReqOpSegSetupDurn
RemainingCapReqOpSegProcgDurn OperationCapacityPerShift RemainingCapReqOpSegProcgDurn
RemainingCapReqOpSegTrdwnDurn OperationCapacityPerShift RemainingCapReqOpSegTrdwnDurn
OrderStatusCode OperationCapacityPerShift OrderStatusCode
RequirementHours OperationCapacityPerShift RequirementHours
CapacityStartTime OperationCapacityPerShift CapacityStartTime
WorkCenterCapacityUnit OperationCapacityPerShift WorkCenterCapacityUnit
WorkDayRule0thenXendasIsNonWorkingDay
IsMaintained IsMaintained

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_WrkCtrCapEvalWrkDays.
-- 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: PWRKCTREVALWD
-- Parameters: P_StartDate : datum, P_EndDate : datum

CREATE VIEW P_WrkCtrCapEvalWrkDays AS
SELECT
  WorkDays.WorkCenterInternalID AS WorkCenterInternalID,
  WorkDays.WorkCenterTypeCode AS WorkCenterTypeCode,
  WorkDays.CapacityCategoryAllocation AS CapacityCategoryAllocation,
  WorkDays.CapacityInternalID AS CapacityInternalID,
  WorkDays.CalendarDate AS CalendarDate,
  OperationCapacityPerShift.ShiftName AS ShiftName,
  OperationCapacityPerShift.AvailableCapacityShift AS AvailableCapacityShift,
  WorkDays.Plant AS Plant,
  OperationCapacityPerShift.MRPController AS MRPController,
  WorkDays.WorkCenter AS WorkCenter,
  OperationCapacityPerShift.FactoryCalendar AS FactoryCalendar,
  WorkDays.CalendarWeek AS CalendarWeek,
  WorkDays.CalendarMonth AS CalendarMonth,
  WorkDays.CalendarYear AS CalendarYear,
  WorkDays.YearWeek AS YearWeek,
  WorkDays.WorkCenterResponsible AS WorkCenterResponsible,
  WorkDays.WorkCenterCategoryCode AS WorkCenterCategoryCode,
  WorkDays.CapacityCategoryCode AS CapacityCategoryCode,
  WorkDays.Capacity AS Capacity,
  WorkDays.CapacityResponsiblePlanner AS CapacityResponsiblePlanner,
  OperationCapacityPerShift.CapacityRequirement AS CapacityRequirement,
  OperationCapacityPerShift.Operation AS Operation,
  OperationCapacityPerShift.CapacityRequirementUnit AS CapacityRequirementUnit,
  OperationCapacityPerShift.CapacityEndTime AS CapacityEndTime,
  OperationCapacityPerShift.CapacityRequirementOrigin AS CapacityRequirementOrigin,
  OperationCapacityPerShift.OrderInternalID AS OrderInternalID,
  OperationCapacityPerShift.OrderType AS OrderType,
  OperationCapacityPerShift.ProductionVersion AS ProductionVersion,
  OperationCapacityPerShift.OrderPlannedTotalQty AS OrderPlannedTotalQty,
  OperationCapacityPerShift.BaseUnit AS BaseUnit,
  OperationCapacityPerShift.OperationPlanningStatusCode AS OperationPlanningStatusCode,
  OperationCapacityPerShift.OperationLatestStartDate AS OperationLatestStartDate,
  OperationCapacityPerShift.OperationLatestStartTime AS OperationLatestStartTime,
  OperationCapacityPerShift.OperationLatestEndDate AS OperationLatestEndDate,
  OperationCapacityPerShift.OperationLatestEndTime AS OperationLatestEndTime,
  OperationCapacityPerShift.OpLtstSchedldExecStrtTme AS OpLtstSchedldExecStrtTme,
  OperationCapacityPerShift.OpLtstSchedldExecEndTme AS OpLtstSchedldExecEndTme,
  OperationCapacityPerShift.OpLtstSchedldProcgStrtDte AS OpLtstSchedldProcgStrtDte,
  OperationCapacityPerShift.OpLtstSchedldProcgStrtTme AS OpLtstSchedldProcgStrtTme,
  OperationCapacityPerShift.OpLtstSchedldTrdwnStrtDte AS OpLtstSchedldTrdwnStrtDte,
  OperationCapacityPerShift.OpLtstSchedldTrdwnStrtTme AS OpLtstSchedldTrdwnStrtTme,
  OperationCapacityPerShift.RemainingCapReqOpSegSetupDurn AS RemainingCapReqOpSegSetupDurn,
  OperationCapacityPerShift.RemainingCapReqOpSegProcgDurn AS RemainingCapReqOpSegProcgDurn,
  OperationCapacityPerShift.RemainingCapReqOpSegTrdwnDurn AS RemainingCapReqOpSegTrdwnDurn,
  OperationCapacityPerShift.OrderStatusCode AS OrderStatusCode,
  OperationCapacityPerShift.RequirementHours AS RequirementHours,
  OperationCapacityPerShift.CapacityStartTime AS CapacityStartTime,
  OperationCapacityPerShift.WorkCenterCapacityUnit AS WorkCenterCapacityUnit,
  case when (WorkDays.WorkDays = 0 and (OperationCapacityPerShift.WorkDayRule = '' or OperationCapacityPerShift.WorkDayRule is null)) or OperationCapacityPerShift.WorkDayRule = '0' then 'X' end as IsNonWorkingDay AS WorkDayRule0thenXendasIsNonWorkingDay,
  IsMaintained
FROM P_WrkCtrAllWrkDayTableFunction
LEFT OUTER JOIN P_WORKCENTERCAPACITYEVAL ON /* join condition not captured in parsed metadata */
;