P_Empavailabiltybyperiod

DDL: P_EMPAVAILABILTYBYPERIOD SQL: PEMPAVAILBYPER Type: view COMPOSITE

P_Empavailabiltybyperiod is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_AvailabilityByWrkAgrmtAndDte) and exposes 6 fields with key field EmploymentInternalID.

Data Sources (1)

SourceAliasJoin Type
I_AvailabilityByWrkAgrmtAndDte EmpAvailability from

Parameters (1)

NameTypeDefault
P_EndDate sydate

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PEMPAVAILBYPER 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 (6)

KeyFieldSource TableSource FieldDescription
KEY EmploymentInternalID I_AvailabilityByWrkAgrmtAndDte PersonWorkAgreement Personnel No.
CalendarDate I_AvailabilityByWrkAgrmtAndDte CalendarDate Calendar Date
CalendarYear
CalendarYYYY
CalendarMM
PlannedWorkingHours I_AvailabilityByWrkAgrmtAndDte AvailabilityInHours

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_Empavailabiltybyperiod.
-- 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: PEMPAVAILBYPER
-- Parameters: P_EndDate : sydate

CREATE VIEW P_Empavailabiltybyperiod AS
SELECT
  EmpAvailability.PersonWorkAgreement AS EmploymentInternalID,
  EmpAvailability.CalendarDate AS CalendarDate,
  left(EmpAvailability.CalendarDate,4) AS CalendarYear,
  CONCAT(left(EmpAvailability.CalendarDate,4),'-') AS CalendarYYYY,
  substring(EmpAvailability.CalendarDate,5,2) AS CalendarMM,
  EmpAvailability.AvailabilityInHours AS PlannedWorkingHours
FROM I_AvailabilityByWrkAgrmtAndDte AS EmpAvailability
;