I_WorkAssignment

DDL: I_WORKASSIGNMENT Type: view_entity BASIC Package: VDM_WFD_WORK_FORCE

Work Assignments

I_WorkAssignment is a Basic CDS View that provides data about "Work Assignments" in SAP S/4HANA. It reads from 3 data sources (wfd_d_assgmt, I_BusinessPartner, wfd_d_keymap) and exposes 24 fields with key field WorkAssignment. It has 4 associations to related views. Part of development package VDM_WFD_WORK_FORCE.

Data Sources (3)

SourceAliasJoin Type
wfd_d_assgmt assgmt inner
I_BusinessPartner BusinessPartner inner
wfd_d_keymap keymap from

Associations (4)

CardinalityTargetAliasCondition
[1] I_BusinessPartner _BusinessPartner $projection.Person = _BusinessPartner.BusinessPartner
[1] I_WorkforcePerson _WorkforcePerson $projection.Person = _WorkforcePerson.Person
[0..1] I_WorkplaceAddress _WorkplaceAddress $projection.BusinessPartnerUUID = _WorkplaceAddress.BusinessPartnerUUID
[1..*] I_PersonWorkAgrmtOrglDetails _OrglDets _OrglDets.PersonWorkAgreement = $projection.WorkAssignment

Annotations (9)

NameValueLevelField
VDM.viewType #BASIC view
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
ObjectModel.modelingPattern #NONE view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
Metadata.ignorePropagatedAnnotations true view
EndUserText.label Work Assignments view

Fields (24)

KeyFieldSource TableSource FieldDescription
KEY WorkAssignment wfd_d_keymap workforce_assgmt_id
Person I_BusinessPartner BusinessPartner
WorkforcePersonExternalID wfd_d_keymap person_id_external
WorkAssignmentExternalID
PersonFullName I_BusinessPartner PersonFullName
AuthorizationGroup I_BusinessPartner AuthorizationGroup
BusinessPartnerUUID I_BusinessPartner BusinessPartnerUUID
IsBusinessPurposeCompleted I_BusinessPartner IsBusinessPurposeCompleted
IsBlocked wfd_d_keymap block_ind
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
_BusinessPartner _BusinessPartner
_WorkforcePerson _WorkforcePerson
_WorkplaceAddress _WorkplaceAddress
_OrglDets _OrglDets
@VDM.viewType: #BASIC
@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED
@ObjectModel.modelingPattern: #NONE
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@Metadata.ignorePropagatedAnnotations:true
@EndUserText.label: 'Work Assignments'
@Consumption.dbHints:[ 'USE_HEX_PLAN' ]
define view entity I_WorkAssignment
  as select from wfd_d_keymap         as keymap
    inner join   wfd_d_assgmt         as assgmt          on keymap.workforce_assgmt_id = assgmt.workforce_assgmt_id
    inner join   I_BusinessPartner    as BusinessPartner on  keymap.business_partner_id              = BusinessPartner.BusinessPartner
                                                         and BusinessPartner.BusinessPartnerCategory = '1'
//    inner join   P_WFD_TF_DATA_SWITCH as switch          on switch.WFDSwitch = 'C'

  association [1]    to I_BusinessPartner            as _BusinessPartner  on $projection.Person = _BusinessPartner.BusinessPartner
  association [1]    to I_WorkforcePerson            as _WorkforcePerson  on $projection.Person = _WorkforcePerson.Person
  association [0..1] to I_WorkplaceAddress           as _WorkplaceAddress on $projection.BusinessPartnerUUID = _WorkplaceAddress.BusinessPartnerUUID
  association [1..*] to I_PersonWorkAgrmtOrglDetails as _OrglDets         on _OrglDets.PersonWorkAgreement = $projection.WorkAssignment
{
  key  keymap.workforce_assgmt_id                 as WorkAssignment,
       BusinessPartner.BusinessPartner            as Person,
       keymap.person_id_external                  as WorkforcePersonExternalID,
       cast(keymap.user_id as wfd_assgmt_ext_id preserving type) as WorkAssignmentExternalID,
       @Semantics.text
       BusinessPartner.PersonFullName,
       BusinessPartner.AuthorizationGroup,
       BusinessPartner.BusinessPartnerUUID,
       @Semantics.booleanIndicator:true
       BusinessPartner.IsBusinessPurposeCompleted as IsBusinessPurposeCompleted,
       keymap.block_ind                           as IsBlocked,
       @Consumption.hidden:true
       @UI.hidden:true
       BusinessPartner.DataControllerSet          as DataControllerSet,
       @Consumption.hidden:true
       @UI.hidden:true
       BusinessPartner.DataController1            as DataController1,
       @Consumption.hidden:true
       @UI.hidden:true
       BusinessPartner.DataController2            as DataController2,
       @Consumption.hidden:true
       @UI.hidden:true
       BusinessPartner.DataController3            as DataController3,
       @Consumption.hidden:true
       @UI.hidden:true
       BusinessPartner.DataController4            as DataController4,
       @Consumption.hidden:true
       @UI.hidden:true
       BusinessPartner.DataController5            as DataController5,
       @Consumption.hidden:true
       @UI.hidden:true
       BusinessPartner.DataController6            as DataController6,
       @Consumption.hidden:true
       @UI.hidden:true
       BusinessPartner.DataController7            as DataController7,
       @Consumption.hidden:true
       @UI.hidden:true
       BusinessPartner.DataController8            as DataController8,
       @Consumption.hidden:true
       @UI.hidden:true
       BusinessPartner.DataController9            as DataController9,
       @Consumption.hidden:true
       @UI.hidden:true
       BusinessPartner.DataController10           as DataController10,

       _BusinessPartner,
       _WorkforcePerson,
       _WorkplaceAddress,
       _OrglDets
}
/*
define view entity I_WorkAssignment
  as select from wfd_d_keymap         as keymap
    inner join   wfd_d_assgmt         as assgmt          on keymap.workforce_assgmt_id = assgmt.workforce_assgmt_id
    inner join   I_BusinessPartner    as BusinessPartner on  keymap.business_partner_id              = BusinessPartner.BusinessPartner
                                                         and BusinessPartner.BusinessPartnerCategory = '1'
//    inner join   P_WFD_TF_DATA_SWITCH as switch          on switch.WFDSwitch = 'C'

  association [1]    to I_BusinessPartner            as _BusinessPartner  on $projection.Person = _BusinessPartner.BusinessPartner
  association [1]    to I_WorkforcePerson            as _WorkforcePerson  on $projection.Person = _WorkforcePerson.Person
  association [0..1] to I_WorkplaceAddress           as _WorkplaceAddress on $projection.BusinessPartnerUUID = _WorkplaceAddress.BusinessPartnerUUID
  association [1..*] to I_PersonWorkAgrmtOrglDetails as _OrglDets         on _OrglDets.PersonWorkAgreement = $projection.WorkAssignment
{
  key  keymap.workforce_assgmt_id                 as WorkAssignment,
       BusinessPartner.BusinessPartner            as Person,
       keymap.person_id_external                  as WorkforcePersonExternalID,
       @Semantics.text
       BusinessPartner.PersonFullName,
       BusinessPartner.AuthorizationGroup,
       BusinessPartner.BusinessPartnerUUID,
       @Semantics.booleanIndicator:true
       BusinessPartner.IsBusinessPurposeCompleted as IsBusinessPurposeCompleted,
       keymap.block_ind                           as IsBlocked,
       @Consumption.hidden:true
       @UI.hidden:true
       BusinessPartner.DataControllerSet          as DataControllerSet,
       @Consumption.hidden:true
       @UI.hidden:true
       BusinessPartner.DataController1            as DataController1,
       @Consumption.hidden:true
       @UI.hidden:true
       BusinessPartner.DataController2            as DataController2,
       @Consumption.hidden:true
       @UI.hidden:true
       BusinessPartner.DataController3            as DataController3,
       @Consumption.hidden:true
       @UI.hidden:true
       BusinessPartner.DataController4            as DataController4,
       @Consumption.hidden:true
       @UI.hidden:true
       BusinessPartner.DataController5            as DataController5,
       @Consumption.hidden:true
       @UI.hidden:true
       BusinessPartner.DataController6            as DataController6,
       @Consumption.hidden:true
       @UI.hidden:true
       BusinessPartner.DataController7            as DataController7,
       @Consumption.hidden:true
       @UI.hidden:true
       BusinessPartner.DataController8            as DataController8,
       @Consumption.hidden:true
       @UI.hidden:true
       BusinessPartner.DataController9            as DataController9,
       @Consumption.hidden:true
       @UI.hidden:true
       BusinessPartner.DataController10           as DataController10,

       _BusinessPartner,
       _WorkforcePerson,
       _WorkplaceAddress,
       _OrglDets
}

union all

select from  P_O_HrPersWrkAgrmt        as HrPersonWorkAgreement
  inner join P_O_PersWrkAgrmtToPartner as PersonWrkAgrmtToPartner on PersonWrkAgrmtToPartner.PersonWorkAgreement = HrPersonWorkAgreement.PersonWorkAgreement
  inner join I_BusinessPartner         as BusinessPartner         on  BusinessPartner.BusinessPartner         = PersonWrkAgrmtToPartner.Person
                                                                  and BusinessPartner.BusinessPartnerCategory = '1'
  inner join I_BuPaIdentification      as BPIdentifier            on PersonWrkAgrmtToPartner.Person      = BPIdentifier.BusinessPartner
                                                                  and(
                                                                    BPIdentifier.BPIdentificationType    = 'HCM001' // HCM001 - Employee ID

                                                                    or BPIdentifier.BPIdentificationType = 'HCM030' // HCM030 - Service Agent

                                                                    or BPIdentifier.BPIdentificationType = 'HCM031'
                                                                  )                                                 // HCM031 - Freelancer

  inner join P_WFD_TF_DATA_SWITCH      as switch                  on switch.WFDSwitch = 'O'
association [1]    to I_BusinessPartner            as _BusinessPartner  on $projection.Person = _BusinessPartner.BusinessPartner
association [1]    to I_WorkforcePerson            as _WorkforcePerson  on $projection.Person = _WorkforcePerson.Person
association [0..1] to I_WorkplaceAddress           as _WorkplaceAddress on $projection.BusinessPartnerUUID = _WorkplaceAddress.BusinessPartnerUUID
association [1..*] to I_PersonWorkAgrmtOrglDetails as _OrglDets         on _OrglDets.PersonWorkAgreement = $projection.WorkAssignment
{
  key  HrPersonWorkAgreement.PersonWorkAgreement  as WorkAssignment,
       BusinessPartner.BusinessPartner            as Person,
       BPIdentifier.BPIdentificationNumber        as WorkforcePersonExternalID,
       BusinessPartner.PersonFullName,
       BusinessPartner.AuthorizationGroup,
       BusinessPartner.BusinessPartnerUUID,
       BusinessPartner.IsBusinessPurposeCompleted as IsBusinessPurposeCompleted,
       ' '                                        as IsBlocked,
       //       @Consumption.hidden:true

       //        @UI.hidden:true

       BusinessPartner.DataControllerSet          as DataControllerSet,
       //        @Consumption.hidden:true

       //        @UI.hidden:true

       BusinessPartner.DataController1            as DataController1,
       //        @Consumption.hidden:true

       //        @UI.hidden:true

       BusinessPartner.DataController2            as DataController2,
       //        @Consumption.hidden:true

       //        @UI.hidden:true

       BusinessPartner.DataController3            as DataController3,
       //        @Consumption.hidden:true

       //        @UI.hidden:true

       BusinessPartner.DataController4            as DataController4,
       //        @Consumption.hidden:true

       //        @UI.hidden:true

       BusinessPartner.DataController5            as DataController5,
       //        @Consumption.hidden:true

       //        @UI.hidden:true

       BusinessPartner.DataController6            as DataController6,
       //        @Consumption.hidden:true

       //        @UI.hidden:true

       BusinessPartner.DataController7            as DataController7,
       //        @Consumption.hidden:true

       //        @UI.hidden:true

       BusinessPartner.DataController8            as DataController8,
       //        @Consumption.hidden:true

       //        @UI.hidden:true

       BusinessPartner.DataController9            as DataController9,
       //        @Consumption.hidden:true

       //        @UI.hidden:true

       BusinessPartner.DataController10           as DataController10,

       _BusinessPartner,
       _WorkforcePerson,
       _WorkplaceAddress,
       _OrglDets
}*/