P_Servicecostlevel
P_Servicecostlevel is a Composite CDS View in SAP S/4HANA. It reads from 4 data sources (I_Employee, I_EmploymentDetailsCurrent, I_EmploymtsofEE, I_Employmentcostlevel) and exposes 10 fields with key fields EmploymentInternalID, Employee, StartDate.
Data Sources (4)
| Source | Alias | Join Type |
|---|---|---|
| I_Employee | Employee | inner |
| I_EmploymentDetailsCurrent | EmploymentDetails | from |
| I_EmploymtsofEE | EmploymtsofEE | inner |
| I_Employmentcostlevel | ServiceCostLevel | left_outer |
Annotations (5)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| AbapCatalog.sqlViewName | PSERVICECOSTLVL | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view |
Fields (10)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | EmploymentInternalID | I_EmploymentDetailsCurrent | EmploymentInternalID | |
| KEY | Employee | I_EmploymtsofEE | Employee | |
| KEY | StartDate | I_Employmentcostlevel | StartDate | |
| Name | I_Employee | FullName | ||
| Job | I_EmploymentDetailsCurrent | Job | ||
| JobName | I_EmploymentDetailsCurrent | JobName | ||
| CompanyCode | I_EmploymentDetailsCurrent | CompanyCode | ||
| CostCenter | I_EmploymentDetailsCurrent | CostCenter | ||
| EndDate | I_Employmentcostlevel | EndDate | ||
| ServiceCostLevel | I_Employmentcostlevel | ServiceCostLevel |
@VDM.private: true
@VDM.viewType: #COMPOSITE
@AbapCatalog.sqlViewName: 'PSERVICECOSTLVL'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
define view P_Servicecostlevel
as select from I_EmploymentDetailsCurrent as EmploymentDetails
inner join I_EmploymtsofEE as EmploymtsofEE on EmploymtsofEE.EmploymentInternalID = EmploymentDetails.EmploymentInternalID
inner join I_Employee as Employee on Employee.Employee = EmploymtsofEE.Employee
and (Employee.BusinessPartnerRole = 'BUP003' or Employee.BusinessPartnerRole = 'BBP010' or Employee.BusinessPartnerRole = 'BBP005')
left outer join I_Employmentcostlevel as ServiceCostLevel on EmploymentDetails.EmploymentInternalID = ServiceCostLevel.EmploymentInternalID
and ServiceCostLevel.EndDate >= $session.system_date
and ServiceCostLevel.StartDate <= $session.system_date
//and ServiceCostLevel.ObjectType = 'XM'
{
key EmploymentDetails.EmploymentInternalID as EmploymentInternalID,
key EmploymtsofEE.Employee as Employee,
key ServiceCostLevel.StartDate as StartDate,
Employee.FullName as Name,
EmploymentDetails.Job as Job,
EmploymentDetails.JobName as JobName,
EmploymentDetails.CompanyCode as CompanyCode,
EmploymentDetails.CostCenter as CostCenter,
ServiceCostLevel.EndDate as EndDate,
ServiceCostLevel.ServiceCostLevel as ServiceCostLevel
}
where
EmploymentDetails.EmploymentStatus = '1'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_EMPLOYEE",
"I_EMPLOYMENTCOSTLEVEL",
"I_EMPLOYMENTDETAILSCURRENT",
"I_EMPLOYMTSOFEE"
],
"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