P_WrkCtrCapOpWrkDays

DDL: P_WRKCTRCAPOPWRKDAYS SQL: PWCCAPOPWRKDAYS Type: view COMPOSITE Package: PPH_VDM_CAP_EVAL

Capacity Load Distribution with working days

P_WrkCtrCapOpWrkDays is a Composite CDS View that provides data about "Capacity Load Distribution with working days" in SAP S/4HANA. It reads from 2 data sources (P_WorkCenterCapShiftOp, P_WrkCtrAllWrkDayTableFunction) and exposes 57 fields with key fields WorkCenterInternalID, WorkCenterTypeCode, CapacityCategoryAllocation, CapacityInternalID, WeekDay. Part of development package PPH_VDM_CAP_EVAL.

Data Sources (2)

SourceAliasJoin Type
P_WorkCenterCapShiftOp P_WorkCenterCapShiftOp from
P_WrkCtrAllWrkDayTableFunction P_WrkCtrAllWrkDayTableFunction inner

Parameters (3)

NameTypeDefault
P_StartDate datum
P_EndDate datum
P_HorizonFlag char1

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PWCCAPOPWRKDAYS 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 (57)

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 WeekDay OperationCapacityPerShift WeekDay Weekdays
KEY ValidityEndDate OperationCapacityPerShift ValidityEndDate ValidTo
KEY CapacityActiveVersion OperationCapacityPerShift CapacityActiveVersion
KEY AvailableCapacityShift OperationCapacityPerShift AvailableCapacityShift Capacity Shift
KEY CapacityRequirement OperationCapacityPerShift CapacityRequirement
KEY Operation OperationCapacityPerShift Operation Transaction
KEY CalendarDate WorkDays CalendarDate Calendar Date
ShiftName OperationCapacityPerShift ShiftName
Material OperationCapacityPerShift Material Vehicle Model
OrderID OperationCapacityPerShift OrderID Order ID
Plant OperationCapacityPerShift Plant Valuation Area
MRPController OperationCapacityPerShift MRPController MRP Controller
WorkCenter OperationCapacityPerShift WorkCenter Work Center
FactoryCalendar OperationCapacityPerShift FactoryCalendar Factory Calendar
CalendarWeek WorkDays CalendarWeek Calendar Week
CalendarMonth WorkDays CalendarMonth Calendar Month
CalendarYear WorkDays CalendarYear Year
WorkCenterResponsible OperationCapacityPerShift WorkCenterResponsible
WorkCenterCategoryCode OperationCapacityPerShift WorkCenterCategoryCode
FactoryCalendarDate OperationCapacityPerShift FactoryCalendarDate Calendar Date
CapacityStartTime
CapacityEndTime
CalendarDatethenXendasisStartDay
CalendarDatethenXendasisEndDay
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 RequirementHours
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_WrkCtrCapOpWrkDays.
-- 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: PWCCAPOPWRKDAYS
-- Parameters: P_StartDate : datum, P_EndDate : datum, P_HorizonFlag : char1

CREATE VIEW P_WrkCtrCapOpWrkDays AS
SELECT
  OperationCapacityPerShift.WorkCenterInternalID AS WorkCenterInternalID,
  OperationCapacityPerShift.WorkCenterTypeCode AS WorkCenterTypeCode,
  OperationCapacityPerShift.CapacityCategoryAllocation AS CapacityCategoryAllocation,
  OperationCapacityPerShift.CapacityInternalID AS CapacityInternalID,
  OperationCapacityPerShift.WeekDay AS WeekDay,
  OperationCapacityPerShift.ValidityEndDate AS ValidityEndDate,
  OperationCapacityPerShift.CapacityActiveVersion AS CapacityActiveVersion,
  OperationCapacityPerShift.AvailableCapacityShift AS AvailableCapacityShift,
  OperationCapacityPerShift.CapacityRequirement AS CapacityRequirement,
  OperationCapacityPerShift.Operation AS Operation,
  WorkDays.CalendarDate AS CalendarDate,
  OperationCapacityPerShift.ShiftName AS ShiftName,
  OperationCapacityPerShift.Material AS Material,
  OperationCapacityPerShift.OrderID AS OrderID,
  OperationCapacityPerShift.Plant AS Plant,
  OperationCapacityPerShift.MRPController AS MRPController,
  OperationCapacityPerShift.WorkCenter AS WorkCenter,
  OperationCapacityPerShift.FactoryCalendar AS FactoryCalendar,
  WorkDays.CalendarWeek AS CalendarWeek,
  WorkDays.CalendarMonth AS CalendarMonth,
  WorkDays.CalendarYear AS CalendarYear,
  OperationCapacityPerShift.WorkCenterResponsible AS WorkCenterResponsible,
  OperationCapacityPerShift.WorkCenterCategoryCode AS WorkCenterCategoryCode,
  OperationCapacityPerShift.FactoryCalendarDate AS FactoryCalendarDate,
  cast(OperationCapacityPerShift.CapacityStartTime as abap.fltp) / cast(3600 as abap.fltp) AS CapacityStartTime,
  cast(OperationCapacityPerShift.CapacityEndTime as abap.fltp)/ cast(3600 as abap.fltp) AS CapacityEndTime,
  case when OperationCapacityPerShift.OperationLatestStartDate = WorkDays.CalendarDate then 'X' end as isStartDay AS CalendarDatethenXendasisStartDay,
  case when OperationCapacityPerShift.OperationLatestEndDate = WorkDays.CalendarDate then 'X' end as isEndDay AS CalendarDatethenXendasisEndDay,
  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.RequirementHours AS RequirementHours,
  OperationCapacityPerShift.TotRequirementInSeconds AS TotRequirementInSeconds,
  OperationCapacityPerShift.OrderStatusCode AS OrderStatusCode,
  OperationCapacityPerShift.OrderFirmingStatusCode AS OrderFirmingStatusCode
FROM P_WorkCenterCapShiftOp
INNER JOIN P_WrkCtrAllWrkDayTableFunction ON /* join condition not captured in parsed metadata */
;