P_EmployeeStatus
P_EmployeeStatus is a Basic CDS View in SAP S/4HANA. It reads from 3 data sources (/shcm/hrp5090, P_EmployeeCl, P_PDOBJECTRELATION) and exposes 4 fields with key fields EmploymentInternalID, PersonnelNumber.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| /shcm/hrp5090 | _details | inner |
| P_EmployeeCl | _Employee | inner |
| P_PDOBJECTRELATION | P_PDOBJECTRELATION | from |
Annotations (4)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.private | true | view | |
| AbapCatalog.sqlViewName | PEMPLOYEESTATUS | view | |
| VDM.viewType | #BASIC | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view |
Fields (4)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | EmploymentInternalID | /shcm/hrp5090 | objid | |
| KEY | PersonnelNumber | object | ObjectID | |
| begdaasValidityStartDate | ||||
| enddaasValidityEndDate |
@VDM.private: true
@AbapCatalog.sqlViewName: 'PEMPLOYEESTATUS'
@VDM.viewType: #BASIC
@AccessControl.authorizationCheck: #NOT_REQUIRED
define view P_EmployeeStatus
as select from P_PDOBJECTRELATION( P_ObjectType: 'XE',
P_RelationShipDirection: 'A',
P_RelationShip: '330',
P_RelatedObjectType: 'XM' ) as object
inner join P_EmployeeCl as _Employee on object.ObjectID = _Employee.PersonnelNumber
inner join /shcm/hrp5090 as _details on object.PlanVersion = _details.plvar and
object.RelatedObjectType = _details.otype and
object.RelatedObjectID = _details.objid
{
key _details.objid as EmploymentInternalID,
key object.ObjectID as PersonnelNumber,
@Semantics.businessDate.from/to
key _details.begda as ValidityStartDate,
@Semantics.businessDate.from/to
_details.endda as ValidityEndDate,
case _details.status
when '1' then 'X'
else ''
end as EmployeeIsActive
} where PlanVersion = '01' and RelationStatus = '1'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"P_EMPLOYEECL",
"P_PDOBJECTRELATION",
"/SHCM/HRP5090"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA