P_HRRELATION

CDS View

P_HRRELATION is a CDS View in S/4HANA. It contains 1 fields. 2 CDS views read from this table.

CDS Views using this table (2)

ViewTypeJoinVDMDescription
P_WorkforcePerson view inner COMPOSITE
P_WorkforcePersonImageURL view inner BASIC

Fields (1)

KeyField CDS FieldsUsed in Views
HumRsceRelatedObjectId Person 1
@AbapCatalog.sqlViewName: 'PHRRELATN'
@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
  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 distinct from wfd_d_keymap   as wfd_d_keymap
  inner join                   wfd_d_assgmt   as assgmt on assgmt.workforce_assgmt_id = wfd_d_keymap.workforce_assgmt_id
//  inner join                   wfd_d_new_pers as switch on wfd_d_keymap.client = switch.mandt


{
  key  ''                               as PlanVersion,
  key  'CP'                             as ObjectType,
  key  wfd_d_keymap.central_person      as HumRsceObjectId,
  key  'B'                              as HumRsceRelshpSpecification,
  key  '207'                            as HumRsceRelationship,
       ''                               as Status,
 //      assgmt.start_date                as StartDate,

 //      assgmt.end_date                  as EndDate,

        '00000000'                      as StartDate,
        '99991231'                      as EndDate,
       'BP'                             as RelatedObjectType,
       wfd_d_keymap.business_partner_id as HumRsceRelatedObjectId
}
where
//  switch.switch = 'NEW'  and 

   wfd_d_keymap.block_ind = '' 
  and assgmt.block_ind = ''
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"WFD_D_ASSGMT",
"WFD_D_KEYMAP"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/