P_SchedChngOpersLiveCacheMap

DDL: P_SCHEDCHNGOPERSLIVECACHEMAP SQL: PSCHCOPERLC Type: view COMPOSITE

P_SchedChngOpersLiveCacheMap is a Composite CDS View in SAP S/4HANA. It reads from 6 data sources and exposes 23 fields with key fields OrderID, CapacityRequirementItem, CapacityRqmtItemCapacity, OrderCategory. It has 1 association to related views.

Data Sources (6)

SourceAliasJoin Type
I_CapacityRequirementItemCap CapRqmtItmCap from
I_CapacityRequirementItemCap CapRqmtItmCap union_all
I_SchedProdnOrderTimeZone OrderTimeZone left_outer
I_BillOfOperationsOpBasic Routing left_outer
I_CapacityRequirementItemCap SupCapRqmt left_outer
I_CapacityRequirementItemCap SupCapRqmt left_outer

Parameters (2)

NameTypeDefault
P_StartDate datum
P_EndDate datum

Associations (1)

CardinalityTargetAliasCondition
[1..1] P_SchedOrderOperationStatus _OrderStatus CapRqmtItmCap.OrderObjectInternalID = _OrderStatus.StatusObject

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName PSCHCOPERLC view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
VDM.private true view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.serviceQuality #B view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (23)

KeyFieldSource TableSource FieldDescription
KEY OrderID
KEY CapacityRequirementItem I_CapacityRequirementItemCap CapacityRequirementItem
KEY CapacityRqmtItemCapacity I_CapacityRequirementItemCap CapacityRqmtItemCapacity
KEY OrderCategory
CapacityRequirement I_CapacityRequirementItemCap CapacityRequirement Id number
OperationIsPhase I_CapacityRequirementItemCap OperationIsPhase Phase
SuperiorOperationInternalID I_CapacityRequirementItemCap SuperiorOperationInternalID Sup. Op. Node
OrderInternalID
OrderOperationInternalID I_CapacityRequirementItemCap OrderOperationInternalID
OperationasvornrendasOperation
OperationasvornrendendasSupOperation
Plant
WorkCenterInternalID I_CapacityRequirementItemCap WorkCenterInternalID Work Center
WorkCenter
CapacityInternalID I_CapacityRequirementItemCap CapacityInternalID Capacity ID
ProductionLineendasProductionLine
ResourceID
ScheduledBasicStartDate
ScheduledBasicStartTime
ScheduledBasicEndDate
ScheduledBasicEndTime
PlndOrderPlannedStartDate
char17endasLastChangeDateTime

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_SchedChngOpersLiveCacheMap.
-- 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: PSCHCOPERLC
-- Parameters: P_StartDate : datum, P_EndDate : datum

CREATE VIEW P_SchedChngOpersLiveCacheMap AS
SELECT
  cast(CapRqmtItmCap.OrderID as pph_cfs_ordernumber) AS OrderID,
  CapRqmtItmCap.CapacityRequirementItem AS CapacityRequirementItem,
  CapRqmtItmCap.CapacityRqmtItemCapacity AS CapacityRqmtItemCapacity,
  cast(CapRqmtItmCap._Order.OrderCategory as pph_cfs_sch_ordercategory) AS OrderCategory,
  CapRqmtItmCap.CapacityRequirement AS CapacityRequirement,
  CapRqmtItmCap.OperationIsPhase AS OperationIsPhase,
  CapRqmtItmCap.SuperiorOperationInternalID AS SuperiorOperationInternalID,
  cast(CapRqmtItmCap.OrderInternalID as abap.char(10)) AS OrderInternalID,
  CapRqmtItmCap.OrderOperationInternalID AS OrderOperationInternalID,
  case CapRqmtItmCap.Operation when '' then cast('1' as vornr) else cast ( CapRqmtItmCap.Operation as vornr ) end as Operation AS OperationasvornrendasOperation,
  case CapRqmtItmCap.OperationIsPhase when '2' then cast(SupCapRqmt.Operation as vornr) else case CapRqmtItmCap.Operation when '' then cast('1' as vornr) else cast ( CapRqmtItmCap.Operation as vornr ) end end as SupOperation AS OperationasvornrendendasSupOperation,
  CapRqmtItmCap._WorkCenter.Plant AS Plant,
  CapRqmtItmCap.WorkCenterInternalID AS WorkCenterInternalID,
  CapRqmtItmCap._WorkCenter.WorkCenter AS WorkCenter,
  CapRqmtItmCap.CapacityInternalID AS CapacityInternalID,
  case when CapRqmtItmCap._Order.OrderCategory = '30' then CapRqmtItmCap._WorkCenter.WorkCenter else CapRqmtItmCap._Order._OrderMainItem._ProductionVersion.ProductionLine end as ProductionLine AS ProductionLineendasProductionLine,
  concat(concat(concat(CapRqmtItmCap.WorkCenterInternalID,'A'),CapRqmtItmCap._WorkCenter.Plant), CapRqmtItmCap.CapacityInternalID) AS ResourceID,
  CapRqmtItmCap._Order.ScheduledBasicStartDate AS ScheduledBasicStartDate,
  CapRqmtItmCap._Order.ScheduledBasicStartTime AS ScheduledBasicStartTime,
  CapRqmtItmCap._Order.ScheduledBasicEndDate AS ScheduledBasicEndDate,
  CapRqmtItmCap._Order.ScheduledBasicEndTime AS ScheduledBasicEndTime,
  cast('00000000' as psttr) AS PlndOrderPlannedStartDate,
  case CapRqmtItmCap._Order.LastChangeDate when '00000000' then cast( dats_tims_to_tstmp( CapRqmtItmCap._Order.CreationDate, CapRqmtItmCap._Order.CreationTime , OrderTimeZone.TimeZoneID, $session.client, 'NULL' ) as abap.char(17)) else cast( dats_tims_to_tstmp( CapRqmtItmCap._Order.LastChangeDate, CapRqmtItmCap._Order.LastChangeTime , OrderTimeZone.TimeZoneID, $session.client, 'NULL' ) as abap.char(17)) end as LastChangeDateTime AS char17endasLastChangeDateTime
FROM I_CapacityRequirementItemCap AS CapRqmtItmCap
LEFT OUTER JOIN I_CapacityRequirementItemCap AS SupCapRqmt ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_SchedProdnOrderTimeZone AS OrderTimeZone ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_BillOfOperationsOpBasic AS Routing ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_SchedOrderOperationStatus AS _OrderStatus ON CapRqmtItmCap.OrderObjectInternalID = _OrderStatus.StatusObject  -- association [1..1]
-- UNION ALL with additional select branch(es): I_CapacityRequirementItemCap
;