P_Empworkinghours

DDL: P_EMPWORKINGHOURS SQL: PEMPWORKHR Type: view COMPOSITE

P_Empworkinghours is a Composite CDS View in SAP S/4HANA. It reads from 3 data sources (I_CalendarDate, I_PersonWorkAgrmtStatus, I_PersonWorkAgrmtPlndWrkgTime) and exposes 4 fields with key fields PersonWorkAgreement, CalendarDate.

Data Sources (3)

SourceAliasJoin Type
I_CalendarDate CalendarDate left_outer
I_PersonWorkAgrmtStatus EmpStatus inner
I_PersonWorkAgrmtPlndWrkgTime WorkSchedule left_outer

Annotations (6)

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

Fields (4)

KeyFieldSource TableSource FieldDescription
KEY PersonWorkAgreement Employment PersonWorkAgreement Personnel No.
KEY CalendarDate I_CalendarDate CalendarDate Calendar Date
Difference
UnitOfMeasure

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_Empworkinghours.
-- 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: PEMPWORKHR

CREATE VIEW P_Empworkinghours AS
SELECT
  Employment.PersonWorkAgreement AS PersonWorkAgreement,
  CalendarDate.CalendarDate AS CalendarDate,
  ((WorkSchedule.WeeklyWorkdays)-cast(cast(CalendarDate._WeekDay.WeekDay as numc1 )as abap.dec(5,2))) AS Difference,
  cast('H' as meinh) AS UnitOfMeasure
INNER JOIN I_PersonWorkAgrmtStatus AS EmpStatus ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_CalendarDate AS CalendarDate ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_PersonWorkAgrmtPlndWrkgTime AS WorkSchedule ON /* join condition not captured in parsed metadata */
;