P_EmployOrgDetOp
P_EmployOrgDetOp is a Basic CDS View in SAP S/4HANA. It reads from 6 data sources and exposes 18 fields with key field EmploymentInternalID.
Data Sources (6)
| Source | Alias | Join Type |
|---|---|---|
| wfd_d_assgmtdets | assgmtdets | union_all |
| P_EmploymentOp | Employment | inner |
| P_EmploymentOp | Employment | inner |
| pa0001 | it0001 | from |
| wfd_d_new_pers | switch | left_outer |
| wfd_d_new_pers | switch | inner |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PEMPLOYORGDETOP | view | |
| VDM.viewType | #BASIC | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.private | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.dataClass | #MASTER | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view |
Fields (18)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | EmploymentInternalID | pa0001 | pernr | |
| begdaasStartDate | ||||
| enddaasEndDate | ||||
| PersonnelNumber | P_EmploymentOp | PersonnelNumber | ||
| IsMainEmployment | P_EmploymentOp | IsMainEmployment | ||
| CompanyCode | pa0001 | bukrs | ||
| CostCenter | pa0001 | kostl | ||
| Job | pa0001 | stell | ||
| OrganizationalUnit | pa0001 | orgeh | ||
| start_dateasStartDate | ||||
| end_dateasEndDate | ||||
| PersonnelNumber | P_EmploymentOp | PersonnelNumber | ||
| IsMainEmployment | P_EmploymentOp | IsMainEmployment | ||
| CompanyCode | wfd_d_assgmtdets | company_code | ||
| CostCenter | wfd_d_assgmtdets | cost_center | ||
| Job | wfd_d_assgmtdets | job_code | ||
| OrganizationalUnit | ||||
| PersonWorkAgrmtAuthznGrpg |
@AbapCatalog.sqlViewName: 'PEMPLOYORGDETOP'
@VDM.viewType: #BASIC
@AccessControl.authorizationCheck: #NOT_REQUIRED
//@EndUserText.label: 'Employment org details for onPremise'
@VDM.private: true
@AbapCatalog.preserveKey:true
@AbapCatalog.compiler.compareFilter:true
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #MASTER
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L
define view P_EmployOrgDetOp
as select from pa0001 as it0001
inner join P_EmploymentOp as Employment on it0001.pernr = Employment.EmploymentInternalID
left outer join wfd_d_new_pers as switch on switch.mandt = it0001.mandt
{
key it0001.pernr as EmploymentInternalID,
@Semantics.businessDate.from/to
key it0001.begda as StartDate,
@Semantics.businessDate.from/to
it0001.endda as EndDate,
Employment.PersonnelNumber,
Employment.IsMainEmployment,
it0001.bukrs as CompanyCode,
it0001.kostl as CostCenter,
it0001.stell as Job,
it0001.orgeh as OrganizationalUnit,
it0001.vdsk1 as PersonWorkAgrmtAuthznGrpg
}
where
(
switch.switch is null
or switch.switch <> 'NEW'
)
union all select from wfd_d_assgmtdets as assgmtdets
inner join P_EmploymentOp as Employment on assgmtdets.workforce_assgmt_id = Employment.EmploymentInternalID
inner join wfd_d_new_pers as switch on switch.mandt = assgmtdets.client
{
key assgmtdets.workforce_assgmt_id as EmploymentInternalId,
@Semantics.businessDate.from/to
key assgmtdets.start_date as StartDate,
@Semantics.businessDate.from/to
key assgmtdets.end_date as EndDate,
Employment.PersonnelNumber,
Employment.IsMainEmployment,
assgmtdets.company_code as CompanyCode,
assgmtdets.cost_center as CostCenter,
assgmtdets.job_code as Job,
'00000000' as OrganizationalUnit,
'' as PersonWorkAgrmtAuthznGrpg
}
where
switch.switch = 'NEW'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"P_EMPLOYMENTOP",
"PA0001",
"WFD_D_ASSGMTDETS",
"WFD_D_NEW_PERS"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"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