P_WorkCenterShiftDefinition

DDL: P_WORKCENTERSHIFTDEFINITION SQL: PWORKCTRSHIFTDEF Type: view COMPOSITE Package: PPH_VDM_CAP_EVAL

Work Center Shift Definition

P_WorkCenterShiftDefinition is a Composite CDS View that provides data about "Work Center Shift Definition" in SAP S/4HANA. It reads from 1 data source (I_ShiftDefinition) and exposes 8 fields with key fields ShiftDefinition, ShiftGrouping, ShiftEndDate. Part of development package PPH_VDM_CAP_EVAL.

Data Sources (1)

SourceAliasJoin Type
I_ShiftDefinition I_ShiftDefinition from

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PWORKCTRSHIFTDEF view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
VDM.viewType #COMPOSITE view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (8)

KeyFieldSource TableSource FieldDescription
KEY ShiftDefinition ShiftDefinition Shift Definition
KEY ShiftGrouping ShiftGrouping Shift Grouping
KEY ShiftEndDate ShiftEndDate Valid To
timselseShiftEndTimeendasShiftEndTime
int4endasCapacityEndTimeID
ShiftStartDate ShiftStartDate Valid From
int4endasCapacityStartTimeID
ValidityEndDate ValidityEndDate ValidTo

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_WorkCenterShiftDefinition.
-- 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: PWORKCTRSHIFTDEF

CREATE VIEW P_WorkCenterShiftDefinition AS
SELECT
  ShiftDefinition,
  ShiftGrouping,
  ShiftEndDate,
  case when ShiftStartTime = ' ' and ShiftEndTime = ' ' then cast ( '000000' as abap.tims ) when ShiftStartTime >= '000000' and ShiftEndTime = ' ' then cast ( '240000' as abap.tims ) else ShiftEndTime end as ShiftEndTime AS timselseShiftEndTimeendasShiftEndTime,
  case when ShiftStartTime = ' ' and ShiftEndTime = ' ' then 000000 when ShiftStartTime >= '000000' and ShiftEndTime = ' ' then 86400 when ShiftEndTime = '240000' then 86400 else cast( cast( substring(ShiftEndTime, 1, 2) as abap.numc(2) ) as abap.int4 ) * 3600 + cast( cast( substring(ShiftEndTime, 3, 2) as abap.numc(2) ) as abap.int4 ) * 60 + cast( cast( substring(ShiftEndTime, 5, 2) as abap.numc(2) ) as abap.int4 ) end as CapacityEndTimeID AS int4endasCapacityEndTimeID,
  ShiftStartDate,
  case when ShiftStartTime = ' ' and ShiftEndTime = ' ' then 000000 when ShiftStartTime = ' ' and ShiftEndTime >= '000000' then 000000 when ShiftStartTime = '240000' then 86400 else cast( cast( substring(ShiftStartTime, 1, 2) as abap.numc(2) ) as abap.int4 ) * 3600 + cast( cast( substring(ShiftStartTime, 3, 2) as abap.numc(2) ) as abap.int4 ) * 60 + cast( cast( substring(ShiftStartTime, 5, 2) as abap.numc(2) ) as abap.int4 ) end as CapacityStartTimeID AS int4endasCapacityStartTimeID,
  ValidityEndDate
FROM I_ShiftDefinition
;