P_RSHShiftDefinitionBase

DDL: P_RSHSHIFTDEFINITIONBASE SQL: PRSHSHFTDEFBASE Type: view CONSUMPTION

Shift definition base view

P_RSHShiftDefinitionBase is a Consumption CDS View that provides data about "Shift definition base view" in SAP S/4HANA. It reads from 1 data source (I_ShiftDefinition) and exposes 9 fields with key fields ShiftDefinition, ShiftGrouping, ShiftEndDate.

Data Sources (1)

SourceAliasJoin Type
I_ShiftDefinition I_ShiftDefinition from

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PRSHSHFTDEFBASE view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
VDM.viewType #CONSUMPTION view
EndUserText.label Shift definition base view view

Fields (9)

KeyFieldSource TableSource FieldDescription
KEY ShiftDefinition ShiftDefinition Shift Definition
KEY ShiftGrouping ShiftGrouping Shift Grouping
KEY ShiftEndDate ShiftEndDate Valid To
ShiftDefinitionName
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_RSHShiftDefinitionBase.
-- 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: PRSHSHFTDEFBASE

CREATE VIEW P_RSHShiftDefinitionBase AS
SELECT
  ShiftDefinition,
  ShiftGrouping,
  ShiftEndDate,
  _Text2[1:Language=$session.system_language].ShiftDefinitionName AS ShiftDefinitionName,
  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 ShiftStartTime = '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
;