P_CapEvalCalcdField is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (I_WorkCenterCapacity) and exposes 44 fields with key fields WorkCenterInternalID, WorkCenterTypeCode, CapacityCategoryAllocation, CapacityInternalID.
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_CapEvalCalcdField.-- 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: PCAPEVALCALFIELDCREATE VIEW P_CapEvalCalcdField ASSELECT
WorkCenterInternalID,
WorkCenterTypeCode,
CapacityCategoryAllocation,
CapacityInternalID,
cast(' ' as char4) AS WorkCenterEvaluationHorizon,
cast('%' as meins ) AS BaseUnit,
cast(0 as dec10_2 ) AS WorkCenterMaxUtilznInTimePerd,
cast(' ' as char12) AS WorkCenterCapFirstOverloadWk,
cast('00000000' as datum) AS WorkCenterCapFirstOverLoadDte,
cast(0 as dec10_2) AS WorkCenterCapacityBacklogInHrs,
cast(0 as dec10_2) AS WorkCenterTotCapInTimePeriod,
cast(0 as dec10_2 ) AS WorkCenterMinUtilznInTmePeriod,
cast(' ' as char12) AS WorkCenterCapFirstCritlLoadWk,
cast('00000000' as datum) AS WorkCenterCapFirstCritlLoadDte,
cast(0 as dec10_2) AS WorkCenterAvgUtilznInTimePerd,
cast(0 as dec10_2) AS WorkCenterTotAvailCapInTmePerd,
cast(0 as dec10_2) AS WorkCenterTotUtilznInTmePerd,
cast(' ' as numc2) AS CapacityEvaluationTimePeriod,
cast('H' as meins) AS WorkCenterCapacityUnit,
cast(' ' as meins) AS WorkCenterCapUnitText,
cast(0 as dec10_2) AS WorkCenterAvailableCapacity,
cast(0 as dec10_2) AS WorkCenterCapacityRequirement,
cast(' ' as char3) AS CapacityCategoryCode,
cast(' ' as domvalue_l) AS CapacityRequirementOrigin,
cast(' ' as domvalue_l) AS OperationPlanningStatusCode,
cast(' ' as char5) AS OrderStatusCode,
cast(0 as abap.int1) AS Criticality,
cast(0 as abap.int1) AS WorkCenterAvgUtilznCriticality,
_WorkCenter._Plant.PlantName AS PlantName,
cast(0 as dec10_2) AS WorkCenterCumltvLoadInTmePerd,
cast(0 as dec10_2) AS WorkCenterCumltvLoadInHours,
cast(' ' as flag) AS WrkCtrIsUndrMaintInTmePerd,
cast(' ' as char3) AS WorkCenterFltrCodeInTmePerd,
cast(' ' as char10) AS WrkCtrMaintOrdAvailabilityTxt,
cast(cast( '' as abap.char(10)) as cr_hname preserving type) AS WorkCenterGroup,
cast( cast( '' as abap.char(10)) as cr_wrkctrgrptyp preserving type ) AS WorkCenterGroupType,
cast('' as abap.char(40)) AS WorkCenterGroupDescription,
casewhen _WorkCenter._Plant._Address.AddressTimeZone isnot initial then tstmp_to_dats( tstmp_current_utctimestamp(), _WorkCenter._Plant._Address.AddressTimeZone, $session.client, 'NULL' ) elsecast($session.system_date as abap.dats) endas CurrentPlantDate AS datsendasCurrentPlantDate,
cast ('00000000' as dats) AS CapacityEvaluationHorizonDate,
cast ('00000000' as dats) AS HorizonStartDate,
cast ('00000000' as dats) AS HorizonEndDate,
cast ('00000000' as dats) AS CapEvalStartDate,
cast(' ' as char1) AS CapEvalBucketType,
cast ('00000000' as dats) AS CapacityEvaluationOverdueDate
FROM I_WorkCenterCapacity AS WorkCenterCapacity
;