@VDM.viewType: #COMPOSITE
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck:#MANDATORY
@EndUserText.label: 'Work Agreements of a Workforce Person'
@Metadata.ignorePropagatedAnnotations: true
@Search.searchable: true
@Consumption.ranked: true
@ObjectModel.dataCategory:#VALUE_HELP
@ObjectModel.representativeKey:'PersonWorkAgreement'
@ObjectModel.usageType:{
serviceQuality: #C,
sizeCategory: #L,
dataClass: #MASTER
}
define view entity I_PersnWrkAgrmtValueHelp as select distinct from I_PersonWorkAgreement_1 as WrkAgrmt
inner join I_PersonWorkAgrmtOrglDetails as OrgDet on WrkAgrmt.PersonWorkAgreement = OrgDet.PersonWorkAgreement
inner join I_PersonWorkAgrmtStatus as Status on OrgDet.PersonWorkAgreement = Status.PersonWorkAgreement
and Status.StartDate <= OrgDet.EndDate
and Status.EndDate >= OrgDet.StartDate
and Status.WorkAgreementStatus = '1'
inner join I_WorkforcePerson as Persn on WrkAgrmt.Person = Persn.Person
left outer to one join I_BusinessUser as User on User.BusinessPartnerUUID = Persn.BusinessPartnerUUID
{
@EndUserText.label: 'Personnel Number'
@EndUserText.quickInfo: 'Personnel Number'
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.8 }
key WrkAgrmt.PersonWorkAgreement,
key case when Status.StartDate < OrgDet.StartDate
then OrgDet.StartDate
else Status.StartDate
end as StartDate,
key case when Status.EndDate > OrgDet.EndDate
then OrgDet.EndDate
else Status.EndDate
end as EndDate,
WrkAgrmt.Person,
@EndUserText.label: 'Last Name'
Persn.LastName,
@EndUserText.quickInfo: 'Family Name'
@EndUserText.label: 'Family Name'
Persn._BusinessPartner.BPLastNameSearchHelp as FamilyName,
@EndUserText.label: 'First Name'
Persn.FirstName,
@EndUserText.quickInfo: 'Given Name'
@EndUserText.label: 'Given Name'
Persn._BusinessPartner.BPFirstNameSearchHelp as GivenName,
@Search: { defaultSearchElement: true, ranking: #LOW, fuzzinessThreshold: 0.8 }
Persn.PersonExternalID,
User.UserID,
@Search: { defaultSearchElement: true, ranking: #LOW, fuzzinessThreshold: 0.8 }
@Semantics.text: true
Persn.PersonFullName,
OrgDet.CompanyCode,
OrgDet._CompanyCode.CompanyCodeName,
OrgDet.CostCenter,
OrgDet._CostCenter._Text[1: Language = $session.system_language ].CostCenterName,
OrgDet.Job,
@EndUserText.label: 'Job Name'
OrgDet._PersonWorkAgrmtJobText[1:Language = $session.system_language].JobName as JobName,
@EndUserText.label: 'Organizational Unit Name'
@EndUserText.quickInfo: 'Organizational Unit Name'
OrgDet._OrganizationalUnitText[1:Language = $session.system_language].OrganizationalUnitName as OrganizationalUnitName,
@UI.hidden
OrgDet.PersonWorkAgrmtAuthznGrpg,
@UI.hidden
Persn. AuthorizationGroup,
@UI.hidden
@Semantics.booleanIndicator: true
Persn.IsBusinessPurposeCompleted,
//Added only for DCL check
@Consumption.hidden:true
@UI.hidden:true
Persn._BusinessPartner.DataControllerSet,
@Consumption.hidden:true
@UI.hidden:true
Persn._BusinessPartner.DataController1,
@Consumption.hidden:true
@UI.hidden:true
Persn._BusinessPartner.DataController2,
@Consumption.hidden:true
@UI.hidden:true
Persn._BusinessPartner.DataController3,
@Consumption.hidden:true
@UI.hidden:true
Persn._BusinessPartner.DataController4,
@Consumption.hidden:true
@UI.hidden:true
Persn._BusinessPartner.DataController5,
@Consumption.hidden:true
@UI.hidden:true
Persn._BusinessPartner.DataController6,
@Consumption.hidden:true
@UI.hidden:true
Persn._BusinessPartner.DataController7,
@Consumption.hidden:true
@UI.hidden:true
Persn._BusinessPartner.DataController8,
@Consumption.hidden:true
@UI.hidden:true
Persn._BusinessPartner.DataController9,
@Consumption.hidden:true
@UI.hidden:true
Persn._BusinessPartner.DataController10
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BUSINESSPARTNER",
"I_BUSINESSUSER",
"I_COMPANYCODE",
"I_COSTCENTER",
"I_COSTCENTERTEXT",
"I_ORGANIZATIONALUNITTEXT",
"I_PERSONWORKAGREEMENT_1",
"I_PERSONWORKAGRMTJOBTEXT",
"I_PERSONWORKAGRMTORGLDETAILS",
"I_PERSONWORKAGRMTSTATUS",
"I_WORKFORCEPERSON"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/