P_ETDetailsOfEE

DDL: P_ETDETAILSOFEE SQL: PETDETAILSOFEE Type: view CONSUMPTION

Employment Details of Employee

P_ETDetailsOfEE is a Consumption CDS View that provides data about "Employment Details of Employee" in SAP S/4HANA. It reads from 1 data source (I_EmployOrgDet) and exposes 20 fields with key fields EmploymentInternalID, StartDate. It has 2 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_EmployOrgDet details from

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_EmploymentManager _Manager $projection.EmploymentInternalID = _Manager.EmploymentInternalID and _Manager.ValidityStartDate <= $projection.EndDate and _Manager.ValidityEndDate >= $projection.EndDate
[0..1] I_ActiveEmployee _ActiveEmployee $projection.EmploymentInternalID = _ActiveEmployee.EmploymentInternalID and $projection.StartDate >= _ActiveEmployee.ValidityStartDate and $projection.EndDate <= _ActiveEmployee.ValidityEndDate association[0..*] to I_EmploymentStatusText as _EmploymentStatusText on $projection.EmployeeIsActive = _EmploymentStatusText.EmploymentStatus

Annotations (5)

NameValueLevelField
VDM.private true view
AbapCatalog.sqlViewName PETDETAILSOFEE view
VDM.viewType #CONSUMPTION view
EndUserText.label Employment Details of Employee view
AccessControl.authorizationCheck #NOT_REQUIRED view

Fields (20)

KeyFieldSource TableSource FieldDescription
KEY EmploymentInternalID I_EmployOrgDet EmploymentInternalID WorkForce Assgmt ID
KEY StartDate I_EmployOrgDet StartDate Valid From
PersonnelNumber I_EmployOrgDet PersonnelNumber Personnel No.
CompanyCode I_EmployOrgDet CompanyCode Receiver Company Code
CompanyCodeName
EndDate I_EmployOrgDet EndDate Term to
Job I_EmployOrgDet Job Undefined range (can be used for patch levels)
ManagerFullName
ManagerEmployee
Department I_EmployOrgDet OrganizationalUnit Org. Unit ID
OrganizationalUnitCode I_EmployOrgDet OrganizationalUnitCode Zone name
CostCenter I_EmployOrgDet CostCenter Cost Center
JobName
JobCode I_EmployOrgDet JobCode Zone name
DepartmentName
CostcenterName
Name
_CostCenter I_EmployOrgDet _CostCenter
_Manager _Manager
_EmploymentStatusText _EmploymentStatusText

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_ETDetailsOfEE.
-- 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: PETDETAILSOFEE

CREATE VIEW P_ETDetailsOfEE AS
SELECT
  details.EmploymentInternalID AS EmploymentInternalID,
  details.StartDate AS StartDate,
  details.PersonnelNumber AS PersonnelNumber,
  details.CompanyCode AS CompanyCode,
  details._CompanyCode.CompanyCodeName AS CompanyCodeName,
  details.EndDate AS EndDate,
  details.Job AS Job,
  cast( '' as bu_name1tx ) AS ManagerFullName,
  cast ( '' as bu_id_number) AS ManagerEmployee,
  details.OrganizationalUnit AS Department,
  details.OrganizationalUnitCode AS OrganizationalUnitCode,
  details.CostCenter AS CostCenter,
  cast ( '' as /shcm/job_title ) AS JobName,
  details.JobCode AS JobCode,
  cast ( '' as /shcm/department_name) AS DepartmentName,
  cast ( '' as ktext) AS CostcenterName,
  cast ( '' as ddtext) AS Name,
  details._CostCenter AS _CostCenter
FROM I_EmployOrgDet AS details
LEFT OUTER JOIN I_EmploymentManager AS _Manager ON EmploymentInternalID = _Manager.EmploymentInternalID AND _Manager.ValidityStartDate <= EndDate AND _Manager.ValidityEndDate >= EndDate  -- association [0..1]
LEFT OUTER JOIN I_ActiveEmployee AS _ActiveEmployee ON EmploymentInternalID = _ActiveEmployee.EmploymentInternalID AND StartDate >= _ActiveEmployee.ValidityStartDate AND EndDate <= _ActiveEmployee.ValidityEndDate association[0..*] to I_EmploymentStatusText as _EmploymentStatusText on EmployeeIsActive = _EmploymentStatusText.EmploymentStatus  -- association [0..1]
;