P_RSHResourceData
P_RSHResourceData is a Composite CDS View in SAP S/4HANA. It reads from 5 data sources (I_PersonWorkAgrmtOrglDetails, I_PersonWorkAgrmtStatus, P_RSHResourceStatus, P_RSHResourceWorkAgreement, I_PersonWorkAgreement_1) and exposes 14 fields with key field EmploymentInternalID.
Data Sources (5)
| Source | Alias | Join Type |
|---|---|---|
| I_PersonWorkAgrmtOrglDetails | HCMDetails | inner |
| I_PersonWorkAgrmtStatus | HCMStatus | inner |
| P_RSHResourceStatus | P_RSHResourceStatus | inner |
| P_RSHResourceWorkAgreement | P_RSHResourceWorkAgreement | from |
| I_PersonWorkAgreement_1 | PersonWorkAgreement | inner |
Parameters (2)
| Name | Type | Default |
|---|---|---|
| P_StartDate | syst_datum | |
| P_EndDate | syst_datum |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.preserveKey | true | view | |
| AbapCatalog.sqlViewName | PRSHRESDATA | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view |
Fields (14)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | EmploymentInternalID | I_PersonWorkAgrmtOrglDetails | PersonWorkAgreement | |
| Person | I_PersonWorkAgreement_1 | Person | ||
| StartDate | I_PersonWorkAgrmtOrglDetails | StartDate | ||
| EndDate | I_PersonWorkAgrmtOrglDetails | EndDate | ||
| WorkAgreementStatus | I_PersonWorkAgrmtStatus | WorkAgreementStatus | ||
| CompanyCode | I_PersonWorkAgrmtOrglDetails | CompanyCode | ||
| CostCenter | I_PersonWorkAgrmtOrglDetails | CostCenter | ||
| Job | I_PersonWorkAgrmtOrglDetails | Job | ||
| OrganizationalUnit | I_PersonWorkAgrmtOrglDetails | OrganizationalUnit | ||
| PersonWorkAgrmtAuthznGrpg | I_PersonWorkAgrmtOrglDetails | PersonWorkAgrmtAuthznGrpg | ||
| _CompanyCode | I_PersonWorkAgrmtOrglDetails | _CompanyCode | ||
| _CostCenter | I_PersonWorkAgrmtOrglDetails | _CostCenter | ||
| _OrganizationalUnitText | I_PersonWorkAgrmtOrglDetails | _OrganizationalUnitText | ||
| _PersonWorkAgrmtJobText | I_PersonWorkAgrmtOrglDetails | _PersonWorkAgrmtJobText |
@AbapCatalog.preserveKey: true
@AbapCatalog.sqlViewName: 'PRSHRESDATA'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XL
@VDM.private: true
@VDM.viewType: #COMPOSITE
@ClientHandling.algorithm: #SESSION_VARIABLE
/*
CONTRACT**********************************************************************************************************************
Name: ResourceData aka the new EmploymentDetailsCurrent
Specification: This view returns the First WorkAgreement / Employment for a given Time Period.
Requires: Parameters Start and EndDate
Ensures: First WorkAgreement TimeSlice overlapping with Parameters Start & End is returned
Owners: TR
Contributors: TR
Unit Test required Y/N: Yes
Additional comments None
END OF CONTRACT***************************************************************************************************************
*/
define view P_RSHResourceData
with parameters
P_StartDate : syst_datum,
P_EndDate : syst_datum
as select from P_RSHResourceWorkAgreement ( P_StartDate: $parameters.P_StartDate, P_EndDate: $parameters.P_EndDate)
inner join I_PersonWorkAgrmtOrglDetails as HCMDetails on HCMDetails.PersonWorkAgreement = P_RSHResourceWorkAgreement.PersonWorkAgreement and
HCMDetails.StartDate = P_RSHResourceWorkAgreement.StartDate
inner join I_PersonWorkAgreement_1 as PersonWorkAgreement on PersonWorkAgreement.PersonWorkAgreement = P_RSHResourceWorkAgreement.PersonWorkAgreement
inner join P_RSHResourceStatus ( P_StartDate: $parameters.P_StartDate, P_EndDate: $parameters.P_EndDate) as RSHResourceStatus on RSHResourceStatus.PersonWorkAgreement = P_RSHResourceWorkAgreement.PersonWorkAgreement
inner join I_PersonWorkAgrmtStatus as HCMStatus on HCMStatus.PersonWorkAgreement = RSHResourceStatus.PersonWorkAgreement and
HCMStatus.StartDate = RSHResourceStatus.StartDate
{
//I_PersonWorkAgrmtOrglDetails
key HCMDetails.PersonWorkAgreement as EmploymentInternalID,
PersonWorkAgreement.Person,
HCMDetails.StartDate,
HCMDetails.EndDate,
HCMStatus.WorkAgreementStatus,
HCMDetails.CompanyCode,
HCMDetails.CostCenter,
HCMDetails.Job,
HCMDetails.OrganizationalUnit,
HCMDetails.PersonWorkAgrmtAuthznGrpg,
/* Associations */
//I_PersonWorkAgrmtOrglDetails
HCMDetails._CompanyCode,
HCMDetails._CostCenter,
HCMDetails._OrganizationalUnitText,
HCMDetails._PersonWorkAgrmtJobText
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PERSONWORKAGREEMENT_1",
"I_PERSONWORKAGRMTORGLDETAILS",
"I_PERSONWORKAGRMTSTATUS",
"P_RSHRESOURCESTATUS",
"P_RSHRESOURCEWORKAGREEMENT"
],
"ASSOCIATED":
[
"I_COMPANYCODE",
"I_COSTCENTER",
"I_ORGANIZATIONALUNITTEXT",
"I_PERSONWORKAGRMTJOBTEXT"
],
"BASE":
[
"I_PERSONWORKAGRMTORGLDETAILS"
],
"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