R_WorkforcePerson
Workforce Person data
R_WorkforcePerson is a Composite CDS View that provides data about "Workforce Person data" in SAP S/4HANA. It reads from 2 data sources (I_BusinessPartner, R_BPUsrRoleCount) and exposes 49 fields with key field PersonUUID. It has 12 associations to related views. Part of development package ODATA_CA_BUM_WF.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_BusinessPartner | _BP | from |
| R_BPUsrRoleCount | _BPUsrRoleCount | inner |
Associations (12)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_FormOfAddressText | _FormOfAddressText | _FormOfAddressText.FormOfAddress = _BP.FormOfAddress and _FormOfAddressText.Language = $session.system_language |
| [0..1] | I_LanguageText | _CorrespondenceLanguage | _CorrespondenceLanguage.LanguageCode = _BP.CorrespondenceLanguage and _CorrespondenceLanguage.Language = $session.system_language |
| [0..1] | I_AcademicTitleText | _AcademicTitle1 | _AcademicTitle1.AcademicTitle = _BP.AcademicTitle and _AcademicTitle1.Language = $session.system_language |
| [0..1] | I_AcademicTitleText | _AcademicTitle2 | _AcademicTitle2.AcademicTitle = _BP.AcademicTitle2 and _AcademicTitle2.Language = $session.system_language |
| [0..1] | I_CountryText | _DestinationLocationCountry | $projection.DestinationLocationCountry = _DestinationLocationCountry.Country and _DestinationLocationCountry.Language = $session.system_language |
| [0..1] | I_CountryText | _MblPhoneDestinationLocCountry | $projection.MblPhoneDestinationLocCountry = _MblPhoneDestinationLocCountry.Country and _MblPhoneDestinationLocCountry.Language = $session.system_language |
| [0..1] | R_WorkforcePersonEntrySourceVH | _EntrySourceText | $projection.WorkforcePersonEntrySource = _EntrySourceText.WorkforcePersonEntrySource |
| [1..1] | R_BPUsrPersonExternalID | _PersIdentifier | $projection.Person = _PersIdentifier.BusinessPartner |
| [0..1] | I_WorkplaceAddress | _WorkplaceAddress | $projection.PersonUUID = _WorkplaceAddress.BusinessPartnerUUID |
| [0..1] | I_BusinessUserBasic | _BusinessUserBasic | $projection.Person = _BusinessUserBasic.BusinessPartner |
| [1..1] | C_BPUsrChangeDocument | _ChangeDoc | $projection.PersonUUID = _ChangeDoc.BusinessPartnerUUID |
| [0..*] | R_WorkAssignmentTP | _WorkAssignment | $projection.PersonUUID = _WorkAssignment.PersonUUID |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #CHECK | view | |
| EndUserText.label | Workforce Person data | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #MASTER | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.lifecycle.contract.type | #SAP_INTERNAL_API | view |
Fields (49)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PersonUUID | I_BusinessPartner | BusinessPartnerUUID | |
| Person | I_BusinessPartner | BusinessPartner | ||
| PersonExternalID | _PersIdentifier | BPIdentificationNumber | ||
| FirstName | I_BusinessPartner | FirstName | ||
| LastName | I_BusinessPartner | LastName | ||
| MiddleName | I_BusinessPartner | MiddleName | ||
| AdditionalLastName | I_BusinessPartner | AdditionalLastName | ||
| PersonFullName | I_BusinessPartner | PersonFullName | ||
| AuthorizationGroup | I_BusinessPartner | AuthorizationGroup | ||
| FormOfAddress | I_BusinessPartner | FormOfAddress | ||
| CorrespondenceLanguage | I_BusinessPartner | CorrespondenceLanguage | ||
| LastNamePrefix | I_BusinessPartner | LastNamePrefix | ||
| LastNameSecondPrefix | I_BusinessPartner | LastNameSecondPrefix | ||
| BusinessPartnerBirthName | I_BusinessPartner | BusinessPartnerBirthName | ||
| BusinessPartnerNicknameLabel | I_BusinessPartner | BusinessPartnerNicknameLabel | ||
| AcademicTitle | I_BusinessPartner | AcademicTitle | ||
| AcademicTitle2 | I_BusinessPartner | AcademicTitle2 | ||
| Initials | I_BusinessPartner | Initials | ||
| BusinessPartnerSupplementName | I_BusinessPartner | BusinessPartnerSupplementName | ||
| BusinessPartnerRole | ||||
| IsBusinessPurposeCompleted | I_BusinessPartner | IsBusinessPurposeCompleted | ||
| EmailAddress | _WorkplaceAddress | DefaultEmailAddress | ||
| MobilePhoneNumber | _WorkplaceAddress | MobilePhoneNumber | ||
| MblPhoneDestinationLocCountry | _WorkplaceAddress | MblPhoneDestinationLocCountry | ||
| PhoneNumber | _WorkplaceAddress | PhoneNumber | ||
| PhoneNumberExtension | _WorkplaceAddress | PhoneNumberExtension | ||
| DestinationLocationCountry | _WorkplaceAddress | DestinationLocationCountry | ||
| UserID | _BusinessUserBasic | UserID | ||
| BPAddressChangeDocObject | ||||
| DataControllerSet | I_BusinessPartner | DataControllerSet | ||
| DataController1 | I_BusinessPartner | DataController1 | ||
| DataController2 | I_BusinessPartner | DataController2 | ||
| DataController3 | I_BusinessPartner | DataController3 | ||
| DataController4 | I_BusinessPartner | DataController4 | ||
| DataController5 | I_BusinessPartner | DataController5 | ||
| DataController6 | I_BusinessPartner | DataController6 | ||
| DataController7 | I_BusinessPartner | DataController7 | ||
| DataController8 | I_BusinessPartner | DataController8 | ||
| DataController9 | I_BusinessPartner | DataController9 | ||
| DataController10 | I_BusinessPartner | DataController10 | ||
| _WorkAssignment | _WorkAssignment | |||
| _WorkplaceAddress | _WorkplaceAddress | |||
| _FormOfAddressText | _FormOfAddressText | |||
| _CorrespondenceLanguage | _CorrespondenceLanguage | |||
| _AcademicTitle1 | _AcademicTitle1 | |||
| _AcademicTitle2 | _AcademicTitle2 | |||
| _DestinationLocationCountry | _DestinationLocationCountry | |||
| _MblPhoneDestinationLocCountry | _MblPhoneDestinationLocCountry | |||
| _EntrySourceText | _EntrySourceText |
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Workforce Person data'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
serviceQuality: #C,
sizeCategory: #XL,
dataClass: #MASTER
}
//@AccessControl.privilegedAssociations: [ '_BPDataControllerUsage' ]
@VDM: {
viewType: #COMPOSITE,
lifecycle.contract.type: #SAP_INTERNAL_API
}
@Consumption.dbHints: [ '&PREFER_JOIN_WITH_FDA 0&', 'USE_HEX_PLAN' ]
define view entity R_WorkforcePerson
as select from I_BusinessPartner as _BP
//In-order to filter role category 'B'
inner join R_BPUsrRoleCount as _BPUsrRoleCount on _BP.BusinessPartnerUUID = _BPUsrRoleCount.BusinessPartnerUUID
and _BPUsrRoleCount.TotalNumberOfBPRole >= 1
left outer to one join bpu000 as _EntrySource on _EntrySource.partner = _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_PreferredPhoneTypeText as _PreferredPhoneTypeText on $projection.PreferredPhoneType = _PreferredPhoneTypeText.PreferredPhoneType
// and _PreferredPhoneTypeText.Language = $session.system_language
// and $projection.PreferredPhoneType <> ''
association [0..1] to R_WorkforcePersonEntrySourceVH as _EntrySourceText on $projection.WorkforcePersonEntrySource = _EntrySourceText.WorkforcePersonEntrySource
association [1..1] to R_BPUsrPersonExternalID as _PersIdentifier on $projection.Person = _PersIdentifier.BusinessPartner
association [0..1] to I_WorkplaceAddress as _WorkplaceAddress on $projection.PersonUUID = _WorkplaceAddress.BusinessPartnerUUID
// association [0..1] to R_WrkfrcPersonWorkplaceAddress as _WorkplaceAddress on $projection.PersonUUID = _WorkplaceAddress.BusinessPartnerUUID
association [0..1] to I_BusinessUserBasic as _BusinessUserBasic on $projection.Person = _BusinessUserBasic.BusinessPartner
association [1..1] to C_BPUsrChangeDocument as _ChangeDoc on $projection.PersonUUID = _ChangeDoc.BusinessPartnerUUID
association [0..*] to R_WorkAssignmentTP as _WorkAssignment on $projection.PersonUUID = _WorkAssignment.PersonUUID
{
key _BP.BusinessPartnerUUID as PersonUUID,
_BP.BusinessPartner as Person,
_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,
// _WorkplaceAddress.PhoneNumberType as PreferredPhoneType,
_BusinessUserBasic.UserID as UserID,
cast( cast( _ChangeDoc.BPAddressChangeDocObject as char24 preserving type ) as char90 ) as BPAddressChangeDocObject,
case _EntrySource.entry_source
when 'E'
then 'W'
else
_EntrySource.entry_source
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
// _PreferredPhoneTypeText
}
where
_BP.BusinessPartnerCategory = '1'
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