@AbapCatalog.sqlViewName: 'PRSHRESOURCE'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XL
@VDM.private: true
@VDM.viewType: #COMPOSITE
@ClientHandling.algorithm: #SESSION_VARIABLE
/*
CONTRACT**********************************************************************************************************************
Name: THE Central RSH Resource View
Specification: This view returns all relevant key data of resources, based on the first employment of the given time period
Requires: Parameters Start and EndDate
Ensures: All key and base resource data is returned.
Owners: TR
Contributors: TR
Unit Test required Y/N: Yes
Additional comments None
END OF CONTRACT***************************************************************************************************************
*/
define view P_RSHResource
with parameters
P_StartDate : syst_datum,
P_EndDate : syst_datum
as select from P_RSHResourceData( P_StartDate: $parameters.P_StartDate, P_EndDate: $parameters.P_EndDate )
inner join I_WorkforcePerson as Person on Person.Person = P_RSHResourceData.Person
association [0..1] to P_RSHResourceSkilltags as _Skilltags on $projection.Person = _Skilltags.Person
association [0..1] to I_RSHResourceServiceOrg as _serviceorg on $projection.CostCenter = _serviceorg.AssignedOrganisation and _serviceorg.CompanyCode = $projection.CompanyCode
{
//P_RSHResourceData
key P_RSHResourceData.EmploymentInternalID,
P_RSHResourceData.StartDate,
P_RSHResourceData.EndDate,
P_RSHResourceData.WorkAgreementStatus,
P_RSHResourceData.CompanyCode,
P_RSHResourceData.CostCenter,
P_RSHResourceData.Job,
P_RSHResourceData.OrganizationalUnit,
P_RSHResourceData.PersonWorkAgrmtAuthznGrpg,
//Person
Person.Person,
PersonExternalID,
FirstName,
LastName,
MiddleName,
AdditionalLastName,
PersonFullName,
BusinessPartnerUUID,
AuthorizationGroup,
IsBusinessPurposeCompleted,
/* Associations */
//P_RSHResourceData
_CompanyCode,
_CostCenter,
_OrganizationalUnitText,
_PersonWorkAgrmtJobText,
//Person
_BusinessPartner,
_PersonWorkAgreement_1 as _PersonWorkAgreement,
_ServicePerformerToSupplier,
_WorkplaceAddress,
_Skilltags,
_serviceorg
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_WORKFORCEPERSON",
"P_RSHRESOURCEDATA"
],
"ASSOCIATED":
[
"I_BUSINESSPARTNER",
"I_COMPANYCODE",
"I_COSTCENTER",
"I_ORGANIZATIONALUNITTEXT",
"I_PERSONWORKAGREEMENT_1",
"I_PERSONWORKAGRMTJOBTEXT",
"I_RSHRESOURCESERVICEORG",
"I_SERVICEPERFORMERTOSUPLR",
"I_WORKPLACEADDRESS",
"P_RSHRESOURCESKILLTAGS"
],
"BASE":
[
"I_WORKFORCEPERSON",
"P_RSHRESOURCEDATA"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/