P_RSHResourceData

DDL: P_RSHRESOURCEDATA SQL: PRSHRESDATA Type: view COMPOSITE Package: RSH_CDS_RES

Resource Data like Cost Center assignnt

P_RSHResourceData is a Composite CDS View that provides data about "Resource Data like Cost Center assignnt" in SAP S/4HANA. It reads from 5 data sources (I_PersonWorkAgrmtOrglDetails, I_PersonWorkAgrmtStatus, P_RSHResourceStatus, P_RSHResourceWorkAgreement, I_PersonWorkAgreement_1) and exposes 14 fields with key field EmploymentInternalID. Part of development package RSH_CDS_RES.

Data Sources (5)

SourceAliasJoin Type
I_PersonWorkAgrmtOrglDetails HCMDetails inner
I_PersonWorkAgrmtStatus HCMStatus inner
P_RSHResourceStatus P_RSHResourceStatus inner
P_RSHResourceWorkAgreement P_RSHResourceWorkAgreement from
I_PersonWorkAgreement_1 PersonWorkAgreement inner

Parameters (2)

NameTypeDefault
P_StartDate syst_datum
P_EndDate syst_datum

Annotations (10)

NameValueLevelField
AbapCatalog.preserveKey true view
AbapCatalog.sqlViewName PRSHRESDATA view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
VDM.private true view
VDM.viewType #COMPOSITE view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (14)

KeyFieldSource TableSource FieldDescription
KEY EmploymentInternalID I_PersonWorkAgrmtOrglDetails PersonWorkAgreement
Person I_PersonWorkAgreement_1 Person
StartDate I_PersonWorkAgrmtOrglDetails StartDate
EndDate I_PersonWorkAgrmtOrglDetails EndDate
WorkAgreementStatus I_PersonWorkAgrmtStatus WorkAgreementStatus
CompanyCode I_PersonWorkAgrmtOrglDetails CompanyCode
CostCenter I_PersonWorkAgrmtOrglDetails CostCenter
Job I_PersonWorkAgrmtOrglDetails Job
OrganizationalUnit I_PersonWorkAgrmtOrglDetails OrganizationalUnit
PersonWorkAgrmtAuthznGrpg I_PersonWorkAgrmtOrglDetails PersonWorkAgrmtAuthznGrpg
_CompanyCode I_PersonWorkAgrmtOrglDetails _CompanyCode
_CostCenter I_PersonWorkAgrmtOrglDetails _CostCenter
_OrganizationalUnitText I_PersonWorkAgrmtOrglDetails _OrganizationalUnitText
_PersonWorkAgrmtJobText I_PersonWorkAgrmtOrglDetails _PersonWorkAgrmtJobText
@AbapCatalog.preserveKey: true
@AbapCatalog.sqlViewName: 'PRSHRESDATA'
@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:                       ResourceData aka the new EmploymentDetailsCurrent
Specification:              This view returns the First WorkAgreement / Employment for a given Time Period.
Requires:                   Parameters Start and EndDate
Ensures:                    First WorkAgreement TimeSlice overlapping with Parameters Start & End is returned
Owners:                     TR
Contributors:               TR
Unit Test required Y/N:     Yes
Additional comments         None

END OF CONTRACT***************************************************************************************************************
*/

define view P_RSHResourceData 
  with parameters
    P_StartDate : syst_datum,
    P_EndDate   : syst_datum
        
    as select from P_RSHResourceWorkAgreement ( P_StartDate: $parameters.P_StartDate, P_EndDate: $parameters.P_EndDate) 
    inner join I_PersonWorkAgrmtOrglDetails as HCMDetails on HCMDetails.PersonWorkAgreement = P_RSHResourceWorkAgreement.PersonWorkAgreement and
                                                            HCMDetails.StartDate = P_RSHResourceWorkAgreement.StartDate
    inner join I_PersonWorkAgreement_1 as PersonWorkAgreement on PersonWorkAgreement.PersonWorkAgreement = P_RSHResourceWorkAgreement.PersonWorkAgreement
   
    inner join P_RSHResourceStatus ( P_StartDate: $parameters.P_StartDate, P_EndDate: $parameters.P_EndDate)  as RSHResourceStatus on RSHResourceStatus.PersonWorkAgreement = P_RSHResourceWorkAgreement.PersonWorkAgreement  
 
    inner join I_PersonWorkAgrmtStatus as HCMStatus on HCMStatus.PersonWorkAgreement = RSHResourceStatus.PersonWorkAgreement and
                                                            HCMStatus.StartDate = RSHResourceStatus.StartDate
                                                                 
     {
    
    //I_PersonWorkAgrmtOrglDetails 

    key HCMDetails.PersonWorkAgreement as EmploymentInternalID, 
    PersonWorkAgreement.Person,
    HCMDetails.StartDate, 
    HCMDetails.EndDate, 
    HCMStatus.WorkAgreementStatus,
    HCMDetails.CompanyCode, 
    HCMDetails.CostCenter, 
    HCMDetails.Job, 
    HCMDetails.OrganizationalUnit, 
    HCMDetails.PersonWorkAgrmtAuthznGrpg, 
    /* Associations */ 
    //I_PersonWorkAgrmtOrglDetails 

    HCMDetails._CompanyCode, 
    HCMDetails._CostCenter, 
    HCMDetails._OrganizationalUnitText, 
    HCMDetails._PersonWorkAgrmtJobText
           
    
    
}