P_Servicecostlevel

DDL: P_SERVICECOSTLEVEL SQL: PSERVICECOSTLVL Type: view COMPOSITE

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)

SourceAliasJoin Type
I_Employee Employee inner
I_EmploymentDetailsCurrent EmploymentDetails from
I_EmploymtsofEE EmploymtsofEE inner
I_Employmentcostlevel ServiceCostLevel left_outer

Annotations (5)

NameValueLevelField
VDM.private true view
VDM.viewType #COMPOSITE view
AbapCatalog.sqlViewName PSERVICECOSTLVL view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view

Fields (10)

KeyFieldSource TableSource FieldDescription
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":""
}
}*/