P_WorkCenterCapShiftOp

DDL: P_WORKCENTERCAPSHIFTOP SQL: PWCCAPSHIFTOP Type: view COMPOSITE

P_WorkCenterCapShiftOp is a Composite CDS View in SAP S/4HANA. It reads from 3 data sources (I_CalendarDate, P_WorkCenterCapMaxMinDte, P_WrkCtrCapOpWithNights) and exposes 59 fields with key fields WorkCenterInternalID, WorkCenterTypeCode, CapacityCategoryAllocation, CapacityInternalID, CalendarDateendasCalendarDate.

Data Sources (3)

SourceAliasJoin Type
I_CalendarDate date_series inner
P_WorkCenterCapMaxMinDte P_WorkCenterCapMaxMinDte cross
P_WrkCtrCapOpWithNights P_WrkCtrCapOpWithNights from

Parameters (3)

NameTypeDefault
P_StartDate datum
P_EndDate datum
P_HorizonFlag char1

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PWCCAPSHIFTOP 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 (59)

KeyFieldSource TableSource FieldDescription
KEY WorkCenterInternalID OperationCapacityPerShift WorkCenterInternalID Work Center
KEY WorkCenterTypeCode OperationCapacityPerShift WorkCenterTypeCode Object Type
KEY CapacityCategoryAllocation OperationCapacityPerShift CapacityCategoryAllocation
KEY CapacityInternalID OperationCapacityPerShift CapacityInternalID Capacity ID
KEY CalendarDateendasCalendarDate
KEY CapacityActiveVersion OperationCapacityPerShift CapacityActiveVersion
KEY AvailableCapacityShift OperationCapacityPerShift AvailableCapacityShift Capacity Shift
KEY ValidityEndDate OperationCapacityPerShift ValidityEndDate ValidTo
KEY WeekDay OperationCapacityPerShift WeekDay Weekdays
CapacityRequirement OperationCapacityPerShift CapacityRequirement
Material OperationCapacityPerShift Material Vehicle Model
OrderID OperationCapacityPerShift OrderID Order ID
Operation OperationCapacityPerShift Operation Transaction
ShiftName OperationCapacityPerShift ShiftName
Plant OperationCapacityPerShift Plant Valuation Area
MRPController OperationCapacityPerShift MRPController MRP Controller
WorkCenter OperationCapacityPerShift WorkCenter Work Center
FactoryCalendar OperationCapacityPerShift FactoryCalendar Factory Calendar
CalendarWeek I_CalendarDate CalendarWeek Calendar Week
CalendarMonth I_CalendarDate CalendarMonth Calendar Month
CalendarYear I_CalendarDate CalendarYear Year
WorkCenterResponsible OperationCapacityPerShift WorkCenterResponsible
WorkCenterCategoryCode OperationCapacityPerShift WorkCenterCategoryCode
FactoryCalendarDate I_CalendarDate CalendarDate Calendar Date
CapacityStartTime OperationCapacityPerShift CapacityStartTime
CapacityEndTime OperationCapacityPerShift CapacityEndTime
CalendarDatethenXendasisStartDay
CalendarDatethenXendasisEndDay
OperatingDurationInSeconds OperationCapacityPerShift OperatingDurationInSeconds
TotOperatingDurationInSeconds OperationCapacityPerShift TotOperatingDurationInSeconds
NightSplitDate OperationCapacityPerShift NightSplitDate
AvailableCapacityIntervalDurn OperationCapacityPerShift AvailableCapacityIntervalDurn
WorkDayRule OperationCapacityPerShift WorkDayRule Recurrence Weekdays
CapacityRequirementOrigin OperationCapacityPerShift CapacityRequirementOrigin
CapacityRequirementUnit OperationCapacityPerShift CapacityRequirementUnit
OrderInternalID OperationCapacityPerShift OrderInternalID Plan No.f.Oper.
OrderType OperationCapacityPerShift OrderType Order Type
OrderCategory OperationCapacityPerShift OrderCategory Order Category
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
RequirementHours OperationCapacityPerShift CapacityRequirementsAreDtmnd
TotRequirementInSeconds OperationCapacityPerShift TotRequirementInSeconds
OrderStatusCode OperationCapacityPerShift OrderStatusCode
OrderFirmingStatusCode OperationCapacityPerShift OrderFirmingStatusCode

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_WorkCenterCapShiftOp.
-- 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: PWCCAPSHIFTOP
-- Parameters: P_StartDate : datum, P_EndDate : datum, P_HorizonFlag : char1

CREATE VIEW P_WorkCenterCapShiftOp AS
SELECT
  OperationCapacityPerShift.WorkCenterInternalID AS WorkCenterInternalID,
  OperationCapacityPerShift.WorkCenterTypeCode AS WorkCenterTypeCode,
  OperationCapacityPerShift.CapacityCategoryAllocation AS CapacityCategoryAllocation,
  OperationCapacityPerShift.CapacityInternalID AS CapacityInternalID,
  case when OperationCapacityPerShift.NightSplitDate = 2 then DATS_ADD_DAYS( date_series.CalendarDate, -1, 'FAIL') else date_series.CalendarDate end as CalendarDate AS CalendarDateendasCalendarDate,
  OperationCapacityPerShift.CapacityActiveVersion AS CapacityActiveVersion,
  OperationCapacityPerShift.AvailableCapacityShift AS AvailableCapacityShift,
  OperationCapacityPerShift.ValidityEndDate AS ValidityEndDate,
  OperationCapacityPerShift.WeekDay AS WeekDay,
  OperationCapacityPerShift.CapacityRequirement AS CapacityRequirement,
  OperationCapacityPerShift.Material AS Material,
  OperationCapacityPerShift.OrderID AS OrderID,
  OperationCapacityPerShift.Operation AS Operation,
  OperationCapacityPerShift.ShiftName AS ShiftName,
  OperationCapacityPerShift.Plant AS Plant,
  OperationCapacityPerShift.MRPController AS MRPController,
  OperationCapacityPerShift.WorkCenter AS WorkCenter,
  OperationCapacityPerShift.FactoryCalendar AS FactoryCalendar,
  date_series.CalendarWeek AS CalendarWeek,
  date_series.CalendarMonth AS CalendarMonth,
  date_series.CalendarYear AS CalendarYear,
  OperationCapacityPerShift.WorkCenterResponsible AS WorkCenterResponsible,
  OperationCapacityPerShift.WorkCenterCategoryCode AS WorkCenterCategoryCode,
  date_series.CalendarDate AS FactoryCalendarDate,
  OperationCapacityPerShift.CapacityStartTime AS CapacityStartTime,
  OperationCapacityPerShift.CapacityEndTime AS CapacityEndTime,
  case when OperationCapacityPerShift.ValidityBeginDate = date_series.CalendarDate then 'X' end as isStartDay AS CalendarDatethenXendasisStartDay,
  case when OperationCapacityPerShift.ValidityEndDate = date_series.CalendarDate then 'X' end as isEndDay AS CalendarDatethenXendasisEndDay,
  OperationCapacityPerShift.OperatingDurationInSeconds AS OperatingDurationInSeconds,
  OperationCapacityPerShift.TotOperatingDurationInSeconds AS TotOperatingDurationInSeconds,
  OperationCapacityPerShift.NightSplitDate AS NightSplitDate,
  OperationCapacityPerShift.AvailableCapacityIntervalDurn AS AvailableCapacityIntervalDurn,
  OperationCapacityPerShift.WorkDayRule AS WorkDayRule,
  OperationCapacityPerShift.CapacityRequirementOrigin AS CapacityRequirementOrigin,
  OperationCapacityPerShift.CapacityRequirementUnit AS CapacityRequirementUnit,
  OperationCapacityPerShift.OrderInternalID AS OrderInternalID,
  OperationCapacityPerShift.OrderType AS OrderType,
  OperationCapacityPerShift.OrderCategory AS OrderCategory,
  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.CapacityRequirementsAreDtmnd AS RequirementHours,
  OperationCapacityPerShift.TotRequirementInSeconds AS TotRequirementInSeconds,
  OperationCapacityPerShift.OrderStatusCode AS OrderStatusCode,
  OperationCapacityPerShift.OrderFirmingStatusCode AS OrderFirmingStatusCode
FROM P_WrkCtrCapOpWithNights
INNER JOIN I_CalendarDate AS date_series ON /* join condition not captured in parsed metadata */
CROSS JOIN P_WorkCenterCapMaxMinDte
;