P_HrRelation_CP_P
P_HrRelation_CP_P is a Basic CDS View in SAP S/4HANA. It reads from 3 data sources (wfd_d_assgmt, wfd_d_new_pers, wfd_d_keymap) and exposes 10 fields with key fields PlanVersion, ObjectType, HumRsceObjectId, HumRsceRelshpSpecification, HumRsceRelationship.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| wfd_d_assgmt | assgmt | inner |
| wfd_d_new_pers | switch | inner |
| wfd_d_keymap | wfd_d_keymap | from |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PHRRELATNCPP | view | |
| VDM.viewType | #BASIC | view | |
| VDM.private | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.dataClass | #MASTER | view | |
| ObjectModel.usageType.serviceQuality | #A | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #CHECK | view |
Fields (10)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PlanVersion | |||
| KEY | ObjectType | |||
| KEY | HumRsceObjectId | wfd_d_keymap | central_person | |
| KEY | HumRsceRelshpSpecification | |||
| KEY | HumRsceRelationship | |||
| Status | ||||
| StartDate | wfd_d_assgmt | start_date | ||
| EndDate | wfd_d_assgmt | end_date | ||
| RelatedObjectType | ||||
| HumRsceRelatedObjectId | wfd_d_keymap | workforce_assgmt_id |
@AbapCatalog.sqlViewName: 'PHRRELATNCPP'
@VDM.viewType: #BASIC
@VDM.private: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #MASTER
@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.sizeCategory: #L
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey:true
@AccessControl.authorizationCheck: #CHECK
//@EndUserText.label: 'Read HRP1001 relation table and wfd_d_keymap table'
define view P_HrRelation_CP_P
as
// select from hrp1001 as relation
// inner join t77s0 as systemtable on grpid = 'PLOGI'
// and semid = 'PLOGI'
// and gsval = relation.plvar
// left outer join wfd_d_new_pers as switch on switch.mandt = systemtable.mandt
//{
// key relation.plvar as PlanVersion,
// key relation.otype as ObjectType,
// key relation.objid as HumRsceObjectId,
// key relation.rsign as HumRsceRelshpSpecification,
// key relation.relat as HumRsceRelationship,
// relation.istat as Status,
// relation.begda as StartDate,
// relation.endda as EndDate,
// relation.sclas as RelatedObjectType,
// relation.sobid as HumRsceRelatedObjectId
//
//
//}
//where
// switch.switch is null
// or switch.switch <> 'NEW'
//
//union all
select from wfd_d_keymap as wfd_d_keymap
inner join wfd_d_new_pers as switch on wfd_d_keymap.client = switch.mandt
inner join wfd_d_assgmt as assgmt on assgmt.workforce_assgmt_id = wfd_d_keymap.workforce_assgmt_id
{
key '' as PlanVersion,
key 'CP' as ObjectType,
key wfd_d_keymap.central_person as HumRsceObjectId,
key 'B' as HumRsceRelshpSpecification,
key '209' as HumRsceRelationship,
'' as Status,
assgmt.start_date as StartDate,
assgmt.end_date as EndDate,
'P' as RelatedObjectType,
wfd_d_keymap.workforce_assgmt_id as HumRsceRelatedObjectId
}
where assgmt.block_ind <> ''
//where
// switch.switch = 'NEW'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"WFD_D_ASSGMT",
"WFD_D_KEYMAP",
"WFD_D_NEW_PERS"
],
"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