R_WORKFORCEPERSON_2

CDS View

Workforce Person data

R_WORKFORCEPERSON_2 is a CDS View in S/4HANA. Workforce Person data. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
R_WorkforcePersonTP_2 view_entity from TRANSACTIONAL Workforce Person TP
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #MANDATORY
@EndUserText.label: 'Workforce Person data'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
  serviceQuality: #C,
  sizeCategory: #XL,
  dataClass: #MASTER
}
@VDM: {
  viewType: #COMPOSITE,
  lifecycle.contract.type: #SAP_INTERNAL_API
}

@Consumption.dbHints: [ '&PREFER_JOIN_WITH_FDA 0&', 'USE_HEX_PLAN' ]
define view entity R_WorkforcePerson_2
  as select from           I_BusinessPartner  as _BP
  //In-order to filter role category 'B'

    inner join             R_BPUsrRoleCount_2 as _BPUsrRoleCount on  _BP.BusinessPartner                 =  _BPUsrRoleCount.BusinessPartner
                                                                 and _BPUsrRoleCount.TotalNumberOfBPRole >= 1
    left outer to one join I_BPUsr000         as _EntrySource    on _EntrySource.BusinessPartner = _BP.BusinessPartner

  association [0..1] to I_FormOfAddressText            as _FormOfAddressText             on  _FormOfAddressText.FormOfAddress = _BP.FormOfAddress
                                                                                         and _FormOfAddressText.Language      = $session.system_language
  association [0..1] to I_LanguageText                 as _CorrespondenceLanguage        on  _CorrespondenceLanguage.LanguageCode = _BP.CorrespondenceLanguage
                                                                                         and _CorrespondenceLanguage.Language     = $session.system_language
  association [0..1] to I_AcademicTitleText            as _AcademicTitle1                on  _AcademicTitle1.AcademicTitle = _BP.AcademicTitle
                                                                                         and _AcademicTitle1.Language      = $session.system_language
  association [0..1] to I_AcademicTitleText            as _AcademicTitle2                on  _AcademicTitle2.AcademicTitle = _BP.AcademicTitle2
                                                                                         and _AcademicTitle2.Language      = $session.system_language
  association [0..1] to I_CountryText                  as _DestinationLocationCountry    on  $projection.DestinationLocationCountry = _DestinationLocationCountry.Country
                                                                                         and _DestinationLocationCountry.Language   = $session.system_language
  association [0..1] to I_CountryText                  as _MblPhoneDestinationLocCountry on  $projection.MblPhoneDestinationLocCountry = _MblPhoneDestinationLocCountry.Country
                                                                                         and _MblPhoneDestinationLocCountry.Language   = $session.system_language
  association [0..1] to R_WorkforcePersonEntrySourceVH as _EntrySourceText               on  $projection.WorkforcePersonEntrySource = _EntrySourceText.WorkforcePersonEntrySource

  association [0..1] to I_BusinessPartner              as _BusinessPartnerName           on  $projection.BusinessPartner = _BusinessPartnerName.BusinessPartner

  association [1..1] to R_BPUsrPersonExternalID        as _PersIdentifier                on  $projection.BusinessPartner = _PersIdentifier.BusinessPartner
  association [0..1] to I_WorkplaceAddress             as _WorkplaceAddress              on  $projection.BusinessPartnerUUID = _WorkplaceAddress.BusinessPartnerUUID
  association [0..1] to I_BusinessUserBasic            as _BusinessUserBasic             on  $projection.BusinessPartner = _BusinessUserBasic.BusinessPartner
  association [1..1] to R_BPUsrChangeDocument          as _ChangeDoc                     on  $projection.BusinessPartnerUUID = _ChangeDoc.BusinessPartnerUUID
  association [0..*] to R_WorkAssignmentTP_2           as _WorkAssignment                on  $projection.BusinessPartner = _WorkAssignment.WorkAssignmentBusinessPartner
{
  key _BP.BusinessPartner,
      _BP.BusinessPartnerUUID,
      _PersIdentifier.BPIdentificationNumber                                                                            as PersonExternalID,
      _BP.FirstName,
      _BP.LastName,
      _BP.MiddleName,
      _BP.AdditionalLastName,
      _BP.PersonFullName,
      _BP.AuthorizationGroup,
      _BP.FormOfAddress,
      _BP.CorrespondenceLanguage,
      _BP.LastNamePrefix,
      _BP.LastNameSecondPrefix,
      _BP.BusinessPartnerBirthName,
      _BP.BusinessPartnerNicknameLabel,
      _BP.AcademicTitle,
      _BP.AcademicTitle2,
      _BP.Initials,
      _BP.BusinessPartnerSupplementName                                                                                 as BusinessPartnerSupplementName,
      cast ( ''  as bu_partnerrole)                                                                                     as BusinessPartnerRole,
      @Semantics.booleanIndicator
      _BP.IsBusinessPurposeCompleted,
      @Semantics.systemDateTime.lastChangedAt: true
      cast (dats_tims_to_tstmp( _BP.LastChangeDate,
                   _BP.LastChangeTime,
      abap_system_timezone( $session.client,'NULL' ), $session.client, 'NULL' ) as vdm_lastchangedon)                   as LastChangeDateTime,
      //      _PersIdentifier,

      _WorkplaceAddress.DefaultEmailAddress                                                                             as EmailAddress,

      _WorkplaceAddress.MobilePhoneNumber                                                                               as MobilePhoneNumber,
      _WorkplaceAddress.MblPhoneDestinationLocCountry                                                                   as MblPhoneDestinationLocCountry,
      _WorkplaceAddress.PhoneNumber                                                                                     as PhoneNumber,
      _WorkplaceAddress.PhoneNumberExtension                                                                            as PhoneNumberExtension,
      _WorkplaceAddress.DestinationLocationCountry                                                                      as DestinationLocationCountry,
      _BusinessUserBasic.UserID                                                                                         as UserID,
      cast( cast( _ChangeDoc.BPAddressChangeDocObject as char24 preserving type )                           as char90 ) as BPAddressChangeDocObject,
      case _EntrySource.WorkforcePersonEntrySource
        when 'E'
        then 'W'
        else
         _EntrySource.WorkforcePersonEntrySource
        end                                                                                                             as WorkforcePersonEntrySource,

      _BP.DataControllerSet,
      _BP.DataController1,
      _BP.DataController2,
      _BP.DataController3,
      _BP.DataController4,
      _BP.DataController5,
      _BP.DataController6,
      _BP.DataController7,
      _BP.DataController8,
      _BP.DataController9,
      _BP.DataController10,

      //Associations//

      _WorkAssignment,
      _WorkplaceAddress,
      _FormOfAddressText,
      _CorrespondenceLanguage,
      _AcademicTitle1,
      _AcademicTitle2,
      _DestinationLocationCountry,
      _MblPhoneDestinationLocCountry,
      _EntrySourceText,
      _BusinessPartnerName
}
where
  _BP.BusinessPartnerCategory = '1'