P_EmploymentManagerOP

DDL: P_EMPLOYMENTMANAGEROP SQL: PEMPLMANAGEROP Type: view BASIC

P_EmploymentManagerOP is a Basic CDS View in SAP S/4HANA. It reads from 7 data sources and exposes 9 fields with key fields Appointment, StartDate, StartDate.

Data Sources (7)

SourceAliasJoin Type
wfd_d_assgmtdets assgmtdets inner
wfd_d_keymap keymap union_all
hrp1001 Manager from
P_PDRELATION relat inner
P_PDRELATION relat inner
wfd_d_new_pers switch left_outer
wfd_d_new_pers switch inner

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PEMPLMANAGEROP view
VDM.viewType #BASIC view
AccessControl.authorizationCheck #NOT_REQUIRED view
AbapCatalog.preserveKey true view
AbapCatalog.compiler.compareFilter true view
VDM.private true view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #MASTER view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view

Fields (9)

KeyFieldSource TableSource FieldDescription
KEY Appointment hrp1001 objid
KEY StartDate hrp1001 begda
EndDate hrp1001 endda
OrganizationalUnit hrp1001 sobid
clientkey00000000asAppointment
KEY StartDate wfd_d_assgmtdets start_date
EndDate wfd_d_assgmtdets end_date
OrganizationalUnit
ManagerPersonWorkAgreement wfd_d_assgmtdets manager_work_assgmt
@AbapCatalog.sqlViewName: 'PEMPLMANAGEROP '
@VDM.viewType: #BASIC
@AccessControl.authorizationCheck: #NOT_REQUIRED
//@EndUserText.label: 'Employment Manager for OnPremise'

@AbapCatalog.preserveKey:true
@AbapCatalog.compiler.compareFilter:true
@VDM.private: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #MASTER
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L

define view P_EmploymentManagerOP
  as select from    hrp1001        as Manager

    inner join      P_PDRELATION   as relat  on  relat.ObjectID              = Manager.objid
                                             and relat.ObjectType            = 'S'
                                             and relat.RelationShipDirection = 'A'
                                             and relat.ReleationShip         = '008'
                                             and relat.RelatedObjectType     = 'P'
                                             and relat.StartDate             <= $session.system_date
                                             and relat.EndDate               >= $session.system_date
    left outer join wfd_d_new_pers as switch on switch.mandt = Manager.mandt


{
  key Manager.objid         as Appointment,
  key Manager.begda         as StartDate,
      Manager.endda         as EndDate,
      Manager.sobid         as OrganizationalUnit,
      relat.RelatedObjectID as ManagerPersonWorkAgreement


}
where
       otype         =  'S'
  and  rsign         =  'A'
  and  relat         =  '012'
  and  sclas         =  'O'
  and  begda         <= $session.system_date
  and  endda         >= $session.system_date
  and(
       switch.switch is null
    or switch.switch <> 'NEW'
  )

union all select from wfd_d_keymap     as keymap
  inner join          P_PDRELATION     as relat      on  relat.ObjectID              = keymap.workforce_assgmt_id
                                                     and relat.ObjectType            = 'S'
                                                     and relat.RelationShipDirection = 'A'
                                                     and relat.ReleationShip         = '008'
                                                     and relat.RelatedObjectType     = 'P'
                                                     and relat.StartDate             <= $session.system_date
                                                     and relat.EndDate               >= $session.system_date
  inner join          wfd_d_assgmtdets as assgmtdets on keymap.workforce_assgmt_id = assgmtdets.workforce_assgmt_id
  inner join          wfd_d_new_pers   as switch     on switch.mandt = keymap.client
{
  key '00000000'                     as Appointment,
  key assgmtdets.start_date          as StartDate,
      assgmtdets.end_date            as EndDate,
      ''                             as OrganizationalUnit,
      assgmtdets.manager_work_assgmt as ManagerPersonWorkAgreement

}
where
  switch.switch = 'NEW'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"P_PDRELATION",
"HRP1001",
"WFD_D_ASSGMTDETS",
"WFD_D_KEYMAP",
"WFD_D_NEW_PERS"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/