R_WORKFORCEPERSON
Workforce Person data
R_WORKFORCEPERSON is a CDS View in S/4HANA. Workforce Person data. 1 CDS views read from this table.
CDS Views using this table (1)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| R_WorkforcePersonTP | view_entity | from | TRANSACTIONAL | Workforce Person TP |
@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
}
define view entity R_WorkforcePerson
as select from I_BusinessPartner as _BP
// inner join I_BlockedWorker as _BlockedWorker on _BP.BusinessPartner = _BlockedWorker.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_BusPartPrefixName as _BusPartPrefixLastName on _BusPartPrefixLastName.LastNamePrefix = _BP.LastNamePrefix
association [0..1] to I_BusPartPrefixName as _BusPartPrefixLastNameSecond on _BusPartPrefixLastNameSecond.LastNamePrefix = _BP.LastNameSecondPrefix
association [0..1] to I_NameSupplement as _NameSupplementText on _NameSupplementText.PersonNameSupplementCode = _BP.BusinessPartnerSupplementName
// and _NameSupplementText.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_AcademicTitle as _AcademicTitle1 on _AcademicTitle1.AcademicTitle = _BP.AcademicTitle
association [0..1] to I_AcademicTitle as _AcademicTitle2 on _AcademicTitle2.AcademicTitle = _BP.AcademicTitle2
// and _AcademicTitle2.Language = $session.system_language
association [0..1] to I_Country as _DestinationLocationCountry on $projection.DestinationLocationCountry = _DestinationLocationCountry.Country
association [0..1] to I_Country as _MblPhoneDestinationLocCountry on $projection.MblPhoneDestinationLocCountry = _MblPhoneDestinationLocCountry.Country
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 I_BusinessUserBasic as _BusinessUserBasic on $projection.Person = _BusinessUserBasic.BusinessPartner
association [1..1] to R_BPUsrRoleLatest as _BPUsrRoleLatest on $projection.PersonUUID = _BPUsrRoleLatest.BusinessPartnerUUID
and _BPUsrRoleLatest.BPRoleCategoryUsageCode = 'B' //Business User
association [0..1] to I_BPRelationship as _BPRelationshipBUR025 on $projection.Person = _BPRelationshipBUR025.BusinessPartnerPerson
and _BPRelationshipBUR025.RelationshipCategory = 'BUR025'
and _BPRelationshipBUR025.ValidityStartDate <= $session.system_date
and _BPRelationshipBUR025.ValidityEndDate >= $session.system_date
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,
_BPUsrRoleLatest[inner].BusinessPartnerRole 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,
_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,
_FormOfAddressText,
_BusPartPrefixLastName,
_BusPartPrefixLastNameSecond,
_NameSupplementText,
_CorrespondenceLanguage,
_AcademicTitle1,
_AcademicTitle2,
_BPUsrRoleLatest,
_DestinationLocationCountry,
_MblPhoneDestinationLocCountry,
_BP.DataControllerSet,
_BP.DataController1,
_BP.DataController2,
_BP.DataController3,
_BP.DataController4,
_BP.DataController5,
_BP.DataController6,
_BP.DataController7,
_BP.DataController8,
_BP.DataController9,
_BP.DataController10,
// @Semantics.booleanIndicator
// _BlockedWorker.IsBlocked,
_WorkAssignment
}
where
_BP.BusinessPartnerCategory = '1'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"C_BPUSRCHANGEDOCUMENT",
"I_BUSINESSPARTNER",
"I_BUSINESSUSERBASIC",
"I_WORKPLACEADDRESS",
"R_BPUSRPERSONEXTERNALID",
"R_BPUSRROLELATEST"
],
"ASSOCIATED":
[
"I_ACADEMICTITLE",
"I_BUSPARTPREFIXNAME",
"I_COUNTRY",
"I_FORMOFADDRESSTEXT",
"I_LANGUAGETEXT",
"I_NAMESUPPLEMENT",
"I_WORKPLACEADDRESS",
"R_BPUSRPERSONEXTERNALID",
"R_BPUSRROLELATEST",
"R_WORKASSIGNMENTTP"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/