R_WorkforcePersonRoleTP_3

DDL: R_WORKFORCEPERSONROLETP_3 Type: view_entity TRANSACTIONAL Package: WFD_INT_RAP_ODATA

Workforce Person Role

R_WorkforcePersonRoleTP_3 is a Transactional CDS View that provides data about "Workforce Person Role" in SAP S/4HANA. It reads from 3 data sources (R_BPUserIdentification, I_BusinessPartner_to_BP_Role, R_BPUsrPersnExtID_2) and exposes 7 fields with key fields WorkforcePersonExternalID, BusinessPartnerRole. Part of development package WFD_INT_RAP_ODATA.

Data Sources (3)

SourceAliasJoin Type
R_BPUserIdentification _BPIdentification inner
I_BusinessPartner_to_BP_Role _BusinessPartnerRole from
R_BPUsrPersnExtID_2 _RoleCat inner

Annotations (9)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Workforce Person Role view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #TRANSACTIONAL view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
AccessControl.personalData.blocking #REQUIRED view

Fields (7)

KeyFieldSource TableSource FieldDescription
KEY WorkforcePersonExternalID R_BPUserIdentification BPIdentificationNumber
KEY BusinessPartnerRole I_BusinessPartner_to_BP_Role BusinessPartnerRole
BusinessPartner I_BusinessPartner_to_BP_Role BusinessPartner
RoleCategory I_BusinessPartner_to_BP_Role RoleCategory
BPUsrRoleValidFromDate
BPUsrRoleValidToDate
_WorkforcePerson _WorkforcePerson
@AccessControl.authorizationCheck: #MANDATORY
@EndUserText.label: 'Workforce Person Role'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
  serviceQuality: #C,
  sizeCategory: #L,
  dataClass: #MIXED
}
@VDM.viewType: #TRANSACTIONAL
@VDM.lifecycle.contract.type:#SAP_INTERNAL_API
@ObjectModel: {
    supportedCapabilities: [#TRANSACTIONAL_PROVIDER]
    //modelingPattern: #TRANSACTIONAL_INTERFACE

}
@AccessControl.personalData.blocking: #REQUIRED
@Consumption.dbHints:[ 'USE_HEX_PLAN' ]
define view entity R_WorkforcePersonRoleTP_3
  as select from I_BusinessPartner_to_BP_Role as _BusinessPartnerRole
//    inner join   P_BPUSRPERSONEXTERNALID      as _BPIdentification on _BPIdentification.BusinessPartner = _BusinessPartnerRole.BusinessPartner

//    inner join   bpu_rolecat_whl                                   on bpu_rolecat_whl.rolecategory = _BusinessPartnerRole.RoleCategory

   inner join R_BPUserIdentification as _BPIdentification on _BPIdentification.BusinessPartner = _BusinessPartnerRole.BusinessPartner
    inner join   R_BPUsrPersnExtID_2 as _RoleCat on  _RoleCat.RoleCategory            = _BusinessPartnerRole.RoleCategory
//  composition [0..*] of R_WrkfrcPersnRelshpToCoTP_3 as _WrkfrcPersnRelshpToCo

  association to parent R_WorkforcePersonTP_3       as _WorkforcePerson on $projection.WorkforcePersonExternalID = _WorkforcePerson.WorkforcePersonExternalID
{
  key  _BPIdentification.BPIdentificationNumber                                      as WorkforcePersonExternalID,
  key  _BusinessPartnerRole.BusinessPartnerRole,
       _BusinessPartnerRole.BusinessPartner,
       _BusinessPartnerRole.RoleCategory,
//       tstmp_to_dats(_BusinessPartnerRole.ValidFrom,'UTC',  $session.client, 'NULL') as ValidFrom,

       tstmp_to_dats(_BusinessPartnerRole.ValidFrom,'UTC',  $session.client, 'NULL') as BPUsrRoleValidFromDate,
//       tstmp_to_dats(_BusinessPartnerRole.ValidTo,'UTC',  $session.client, 'NULL')   as ValidTo,

       tstmp_to_dats(_BusinessPartnerRole.ValidTo,'UTC',  $session.client, 'NULL')   as BPUsrRoleValidToDate,

//      @Semantics.businessDate.from: true

//      case when _BusinessPartnerRole.ValidFrom != 00010101000000

//      then tstmp_to_dats(_BusinessPartnerRole.ValidFrom,'UTC',  $session.client, 'NULL')

//      else cast ( '00010103' as abap.dats )

//      end                                             as ValidFrom,

//      @Semantics.businessDate.to: true

//      case when _BusinessPartnerRole.ValidTo != 00010101000000

//      then tstmp_to_dats(_BusinessPartnerRole.ValidTo,'UTC',  $session.client, 'NULL')

//      else cast ( '99991231' as abap.dats)

//      end                                             as ValidTo,


       /* Associations */
       _WorkforcePerson
}