@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
}*/