P_WrkCtrShiftWithReq

DDL: P_WRKCTRSHIFTWITHREQ SQL: PWCCAPWITHREQ Type: view COMPOSITE

P_WrkCtrShiftWithReq is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (P_WorkCtrCapWithNightShift, P_WrkCtrCapOpDateRange) and exposes 51 fields with key fields WorkCenterInternalID, WorkCenterTypeCode, CapacityCategoryAllocation, CapacityInternalID, OrderID.

Data Sources (2)

SourceAliasJoin Type
P_WorkCtrCapWithNightShift CapacityPerShift from
P_WrkCtrCapOpDateRange P_WrkCtrCapOpDateRange left_outer

Parameters (2)

NameTypeDefault
P_StartDate datum
P_EndDate datum

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PWCCAPWITHREQ 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 (51)

KeyFieldSource TableSource FieldDescription
KEY WorkCenterInternalID P_WorkCtrCapWithNightShift WorkCenterInternalID Work Center
KEY WorkCenterTypeCode P_WorkCtrCapWithNightShift WorkCenterTypeCode Object Type
KEY CapacityCategoryAllocation P_WorkCtrCapWithNightShift CapacityCategoryAllocation
KEY CapacityInternalID P_WorkCtrCapWithNightShift CapacityInternalID Capacity ID
KEY OrderID WrkCtrCapPplineOp OrderID Order ID
KEY Material WrkCtrCapPplineOp Material Vehicle Model
KEY ShiftNameendasShiftName
KEY WeekDay P_WorkCtrCapWithNightShift WeekDay Weekdays
KEY ValidityBeginDate P_WorkCtrCapWithNightShift ValidityBeginDate
KEY ValidityEndDate P_WorkCtrCapWithNightShift ValidityEndDate ValidTo
Plant WrkCtrCapPplineOp Plant Valuation Area
MRPController WrkCtrCapPplineOp MRPController MRP Controller
WorkCenter P_WorkCtrCapWithNightShift WorkCenter Work Center
CapacityRequirement WrkCtrCapPplineOp CapacityRequirement
WorkCenterResponsible WrkCtrCapPplineOp WorkCenterResponsible
WorkCenterCategoryCode WrkCtrCapPplineOp WorkCenterCategoryCode
CapacityRequirementOrigin WrkCtrCapPplineOp CapacityRequirementOrigin
Operation WrkCtrCapPplineOp Operation Transaction
CapacityRequirementUnit WrkCtrCapPplineOp CapacityRequirementUnit
OrderInternalID WrkCtrCapPplineOp OrderInternalID Plan No.f.Oper.
OrderType WrkCtrCapPplineOp OrderType Order Type
ProductionVersion WrkCtrCapPplineOp ProductionVersion Version ID
OrderPlannedTotalQty WrkCtrCapPplineOp OrderPlannedTotalQty
BaseUnit WrkCtrCapPplineOp BaseUnit Unit of Measure
AvailableCapacityShift P_WorkCtrCapWithNightShift AvailableCapacityShift Capacity Shift
AvailableCapacityIntervalDurn P_WorkCtrCapWithNightShift AvailableCapacityIntervalDurn
TotOperatingDurationInSeconds P_WorkCtrCapWithNightShift TotOperatingDurationInSeconds
OperatingDurationInSeconds P_WorkCtrCapWithNightShift OperatingDurationInSeconds
CapacityStartTime P_WorkCtrCapWithNightShift CapacityStartTime
CapacityEndTime P_WorkCtrCapWithNightShift CapacityEndTime
NightSplitDate P_WorkCtrCapWithNightShift NightSplitDate
WorkDayRule P_WorkCtrCapWithNightShift WorkDayRule Recurrence Weekdays
FactoryCalendar P_WorkCtrCapWithNightShift FactoryCalendar Factory Calendar
OperationPlanningStatusCode WrkCtrCapPplineOp OperationPlanningStatusCode
OperationLatestStartDate WrkCtrCapPplineOp OperationLatestStartDate
OperationLatestStartTime WrkCtrCapPplineOp OperationLatestStartTime
OperationLatestEndDate WrkCtrCapPplineOp OperationLatestEndDate
OperationLatestEndTime WrkCtrCapPplineOp OperationLatestEndTime
OpLtstSchedldExecStrtTme WrkCtrCapPplineOp OpLtstSchedldExecStrtTme
OpLtstSchedldExecEndTme WrkCtrCapPplineOp OpLtstSchedldExecEndTme
OpLtstSchedldProcgStrtDte WrkCtrCapPplineOp OpLtstSchedldProcgStrtDte
OpLtstSchedldProcgStrtTme WrkCtrCapPplineOp OpLtstSchedldProcgStrtTme
OpLtstSchedldTrdwnStrtDte WrkCtrCapPplineOp OpLtstSchedldTrdwnStrtDte
OpLtstSchedldTrdwnStrtTme WrkCtrCapPplineOp OpLtstSchedldTrdwnStrtTme
RemainingCapReqOpSegSetupDurn WrkCtrCapPplineOp RemainingCapReqOpSegSetupDurn
RemainingCapReqOpSegProcgDurn WrkCtrCapPplineOp RemainingCapReqOpSegProcgDurn
RemainingCapReqOpSegTrdwnDurn WrkCtrCapPplineOp RemainingCapReqOpSegTrdwnDurn
CapacityRequirementsAreDtmnd WrkCtrCapPplineOp CapacityRequirementsAreDtmnd
OrderStatusCode WrkCtrCapPplineOp OrderStatusCode
OrderFirmingStatusCode WrkCtrCapPplineOp OrderFirmingStatusCode
OrderCategory WrkCtrCapPplineOp OrderCategory Order Category

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_WrkCtrShiftWithReq.
-- 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: PWCCAPWITHREQ
-- Parameters: P_StartDate : datum, P_EndDate : datum

CREATE VIEW P_WrkCtrShiftWithReq AS
SELECT
  CapacityPerShift.WorkCenterInternalID AS WorkCenterInternalID,
  CapacityPerShift.WorkCenterTypeCode AS WorkCenterTypeCode,
  CapacityPerShift.CapacityCategoryAllocation AS CapacityCategoryAllocation,
  CapacityPerShift.CapacityInternalID AS CapacityInternalID,
  WrkCtrCapPplineOp.OrderID AS OrderID,
  WrkCtrCapPplineOp.Material AS Material,
  case when (CapacityPerShift.ShiftName = '' and CapacityPerShift.AvailableCapacityShift <> '') then concat('SH ', CapacityPerShift.AvailableCapacityShift) else CapacityPerShift.ShiftName end as ShiftName AS ShiftNameendasShiftName,
  CapacityPerShift.WeekDay AS WeekDay,
  CapacityPerShift.ValidityBeginDate AS ValidityBeginDate,
  CapacityPerShift.ValidityEndDate AS ValidityEndDate,
  WrkCtrCapPplineOp.Plant AS Plant,
  WrkCtrCapPplineOp.MRPController AS MRPController,
  CapacityPerShift.WorkCenter AS WorkCenter,
  WrkCtrCapPplineOp.CapacityRequirement AS CapacityRequirement,
  WrkCtrCapPplineOp.WorkCenterResponsible AS WorkCenterResponsible,
  WrkCtrCapPplineOp.WorkCenterCategoryCode AS WorkCenterCategoryCode,
  WrkCtrCapPplineOp.CapacityRequirementOrigin AS CapacityRequirementOrigin,
  WrkCtrCapPplineOp.Operation AS Operation,
  WrkCtrCapPplineOp.CapacityRequirementUnit AS CapacityRequirementUnit,
  WrkCtrCapPplineOp.OrderInternalID AS OrderInternalID,
  WrkCtrCapPplineOp.OrderType AS OrderType,
  WrkCtrCapPplineOp.ProductionVersion AS ProductionVersion,
  WrkCtrCapPplineOp.OrderPlannedTotalQty AS OrderPlannedTotalQty,
  WrkCtrCapPplineOp.BaseUnit AS BaseUnit,
  CapacityPerShift.AvailableCapacityShift AS AvailableCapacityShift,
  CapacityPerShift.AvailableCapacityIntervalDurn AS AvailableCapacityIntervalDurn,
  CapacityPerShift.TotOperatingDurationInSeconds AS TotOperatingDurationInSeconds,
  CapacityPerShift.OperatingDurationInSeconds AS OperatingDurationInSeconds,
  CapacityPerShift.CapacityStartTime AS CapacityStartTime,
  CapacityPerShift.CapacityEndTime AS CapacityEndTime,
  CapacityPerShift.NightSplitDate AS NightSplitDate,
  CapacityPerShift.WorkDayRule AS WorkDayRule,
  CapacityPerShift.FactoryCalendar AS FactoryCalendar,
  WrkCtrCapPplineOp.OperationPlanningStatusCode AS OperationPlanningStatusCode,
  WrkCtrCapPplineOp.OperationLatestStartDate AS OperationLatestStartDate,
  WrkCtrCapPplineOp.OperationLatestStartTime AS OperationLatestStartTime,
  WrkCtrCapPplineOp.OperationLatestEndDate AS OperationLatestEndDate,
  WrkCtrCapPplineOp.OperationLatestEndTime AS OperationLatestEndTime,
  WrkCtrCapPplineOp.OpLtstSchedldExecStrtTme AS OpLtstSchedldExecStrtTme,
  WrkCtrCapPplineOp.OpLtstSchedldExecEndTme AS OpLtstSchedldExecEndTme,
  WrkCtrCapPplineOp.OpLtstSchedldProcgStrtDte AS OpLtstSchedldProcgStrtDte,
  WrkCtrCapPplineOp.OpLtstSchedldProcgStrtTme AS OpLtstSchedldProcgStrtTme,
  WrkCtrCapPplineOp.OpLtstSchedldTrdwnStrtDte AS OpLtstSchedldTrdwnStrtDte,
  WrkCtrCapPplineOp.OpLtstSchedldTrdwnStrtTme AS OpLtstSchedldTrdwnStrtTme,
  WrkCtrCapPplineOp.RemainingCapReqOpSegSetupDurn AS RemainingCapReqOpSegSetupDurn,
  WrkCtrCapPplineOp.RemainingCapReqOpSegProcgDurn AS RemainingCapReqOpSegProcgDurn,
  WrkCtrCapPplineOp.RemainingCapReqOpSegTrdwnDurn AS RemainingCapReqOpSegTrdwnDurn,
  WrkCtrCapPplineOp.CapacityRequirementsAreDtmnd AS CapacityRequirementsAreDtmnd,
  WrkCtrCapPplineOp.OrderStatusCode AS OrderStatusCode,
  WrkCtrCapPplineOp.OrderFirmingStatusCode AS OrderFirmingStatusCode,
  WrkCtrCapPplineOp.OrderCategory AS OrderCategory
FROM P_WorkCtrCapWithNightShift AS CapacityPerShift
LEFT OUTER JOIN P_WrkCtrCapOpDateRange ON /* join condition not captured in parsed metadata */
;