P_PDRELATION_001

DDL: P_PDRELATION_001 SQL: PPDRELATION001 Type: view BASIC

P_PDRELATION_001 is a Basic CDS View in SAP S/4HANA. It reads from 6 data sources and exposes 19 fields with key fields PlanVersion, ObjectType, ObjectID, RelationShipDirection, ReleationShip.

Data Sources (6)

SourceAliasJoin Type
wfd_d_assgmt assgmt inner
hrp1001 relation from
wfd_d_new_pers switch left_outer
wfd_d_new_pers switch inner
t77s0 systemtable inner
wfd_d_keymap wfd_d_keymap union_all

Annotations (6)

NameValueLevelField
VDM.private true view
AbapCatalog.sqlViewName PPDRELATION001 view
VDM.viewType #BASIC view
AbapCatalog.preserveKey true view
AbapCatalog.compiler.compareFilter true view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (19)

KeyFieldSource TableSource FieldDescription
KEY PlanVersion hrp1001 plvar
KEY ObjectType hrp1001 otype
KEY ObjectID hrp1001 objid
KEY RelationShipDirection hrp1001 rsign
KEY ReleationShip hrp1001 relat
RelationStatus hrp1001 istat
StartDate hrp1001 begda
EndDate hrp1001 endda
RelatedObjectType hrp1001 sclas
mandtkeyasPlanVersion
KEY ObjectType
KEY ObjectID wfd_d_keymap central_person
KEY RelationShipDirection
KEY ReleationShip
RelationStatus
StartDate wfd_d_assgmt start_date
EndDate wfd_d_assgmt end_date
RelatedObjectType
RelatedObjectID wfd_d_keymap workforce_assgmt_id
@VDM.private: true
@AbapCatalog.sqlViewName: 'PPDRELATION001'
@VDM.viewType: #BASIC
@AbapCatalog.preserveKey:true
@AbapCatalog.compiler.compareFilter:true
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_PDRELATION_001
  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 ObjectID,
  key relation.rsign as RelationShipDirection,
  key relation.relat as ReleationShip,

      relation.istat as RelationStatus,



      relation.begda as StartDate,
      relation.endda as EndDate,

      relation.sclas as RelatedObjectType,
      relation.sobid as RelatedObjectID
}
where
       endda         =  '99991231'
  and(
       switch.switch is null
    or switch.switch <> 'NEW'
  )

union all select from wfd_d_keymap   as wfd_d_keymap
  inner join wfd_d_assgmt as assgmt on wfd_d_keymap.workforce_assgmt_id = assgmt.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 ObjectID,
  key 'B'                         as RelationShipDirection,
  key '209'                       as ReleationShip,
      ''                          as RelationStatus,
      assgmt.start_date           as StartDate,
      assgmt.end_date             as EndDate,
      'P'                         as RelatedObjectType,
      wfd_d_keymap.workforce_assgmt_id      as RelatedObjectID


}
where
assgmt.end_date = '99991231' and
switch.switch = 'NEW'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"HRP1001",
"T77S0",
"WFD_D_ASSGMT",
"WFD_D_KEYMAP",
"WFD_D_NEW_PERS"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/