P_EmployeeLineManager
P_EmployeeLineManager is a Basic CDS View in SAP S/4HANA. It reads from 4 data sources (wfd_d_assgmtdets, pa0001, wfd_d_new_pers, wfd_d_new_pers) and exposes 6 fields with key fields EmploymentInternalID, ValidityStartDate, ValidityStartDate.
Data Sources (4)
| Source | Alias | Join Type |
|---|---|---|
| wfd_d_assgmtdets | assgmtdets | union_all |
| pa0001 | Employee | from |
| wfd_d_new_pers | switch | left_outer |
| wfd_d_new_pers | switch | inner |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PLINEMANAGER | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.viewType | #BASIC | view | |
| AbapCatalog.preserveKey | true | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| VDM.private | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.dataClass | #MASTER | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view |
Fields (6)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | EmploymentInternalID | pa0001 | pernr | |
| KEY | ValidityStartDate | pa0001 | begda | |
| ValidityEndDate | pa0001 | endda | ||
| KEY | ValidityStartDate | wfd_d_assgmtdets | start_date | |
| ValidityEndDate | wfd_d_assgmtdets | end_date | ||
| ManagerPersonWorkAgreement | wfd_d_assgmtdets | manager_work_assgmt |
@AbapCatalog.sqlViewName: 'PLINEMANAGER'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.viewType: #BASIC
//@EndUserText.label: 'Employee Line Manager'
@AbapCatalog.preserveKey:true
@AbapCatalog.compiler.compareFilter:true
@VDM.private: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #MASTER
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L
define view P_EmployeeLineManager
as select from pa0001 as Employee
left outer join wfd_d_new_pers as switch on switch.mandt = Employee.mandt
{
key Employee.pernr as EmploymentInternalID,
key Employee.begda as ValidityStartDate,
Employee.endda as ValidityEndDate,
//Employee.mstbr as Manager,
Employee.mstbr as ManagerPersonWorkAgreement
}
where
Employee.mstbr <> ''
and(
switch.switch is null
or switch.switch <> 'NEW'
)
union all select from wfd_d_assgmtdets as assgmtdets
inner join wfd_d_new_pers as switch on switch.mandt = assgmtdets.client
{
key assgmtdets.workforce_assgmt_id as EmploymentInternalID,
key assgmtdets.start_date as ValidityStartDate,
assgmtdets.end_date as ValidityEndDate,
assgmtdets.manager_work_assgmt as ManagerPersonWorkAgreement
}
where
assgmtdets.manager_work_assgmt <> '00000000'
and switch.switch = 'NEW'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"PA0001",
"WFD_D_ASSGMTDETS",
"WFD_D_NEW_PERS"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"VERSION":0
}
}*/
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