C_ProjDmndResourceAssignmentVH

DDL: C_PROJDMNDRESOURCEASSIGNMENTVH Type: view CONSUMPTION Package: ODATA_PS_DMND_MAINTAIN

Proj Dmnd Resource Employment Search

C_ProjDmndResourceAssignmentVH is a Consumption CDS View that provides data about "Proj Dmnd Resource Employment Search" in SAP S/4HANA. It reads from 3 data sources (I_PersonWorkAgreement_1, I_PersonWorkAgrmtOrglDetails, I_PersonWorkAgrmtStatus) and exposes 13 fields with key fields PersonWorkAgreement, StartDate, EndDate. It has 1 association to related views. Part of development package ODATA_PS_DMND_MAINTAIN.

Data Sources (3)

SourceAliasJoin Type
I_PersonWorkAgreement_1 PersWrkAgrmt from
I_PersonWorkAgrmtOrglDetails PersWrkAgrmtOrgDet inner
I_PersonWorkAgrmtStatus PersWrkAgrmtStatDet inner

Associations (1)

CardinalityTargetAliasCondition
[1..1] I_PersonWorkAgreement_1 _PersonWorkAgreement $projection.PersonWorkAgreement = _PersonWorkAgreement.PersonWorkAgreement

Annotations (15)

NameValueLevelField
AbapCatalog.compiler.compareFilter true view
AbapCatalog.sqlViewName CPROJDMNDEVH view
AbapCatalog.dataMaintenance #RESTRICTED view
EndUserText.label Proj Dmnd Resource Employment Search view
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.representativeKey PersonWorkAgreement view
ObjectModel.dataCategory #VALUE_HELP view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.sizeCategory #L view
Consumption.ranked true view
Search.searchable true view

Fields (13)

KeyFieldSource TableSource FieldDescription
KEY PersonWorkAgreement Resource
KEY StartDate I_PersonWorkAgrmtOrglDetails StartDate
KEY EndDate I_PersonWorkAgrmtOrglDetails EndDate
PersonFullName I_PersonWorkAgreement_1 PersonFullName
EmailAddress
JobName Job Title
Job I_PersonWorkAgrmtOrglDetails Job Job Code
CostCenter I_PersonWorkAgrmtOrglDetails CostCenter
AuthorizationGroup I_PersonWorkAgreement_1 AuthorizationGroup
PersonWorkAgrmtAuthznGrpg I_PersonWorkAgrmtOrglDetails PersonWorkAgrmtAuthznGrpg
Person I_PersonWorkAgreement_1 Person
_BusinessPartner I_PersonWorkAgreement_1 _BusinessPartner
_PersonWorkAgreement _PersonWorkAgreement
@AbapCatalog.compiler.compareFilter: true
// @AbapCatalog.preserveKey: true

@AbapCatalog: {
    sqlViewName: 'CPROJDMNDEVH',
    dataMaintenance: #RESTRICTED
}

@EndUserText.label: 'Proj Dmnd Resource Employment Search'

@VDM: {
    viewType: #CONSUMPTION
}

@AccessControl: {
    authorizationCheck:     #CHECK,
    personalData.blocking:  #BLOCKED_DATA_EXCLUDED
}

@ClientHandling.algorithm: #SESSION_VARIABLE

@ObjectModel: {
   semanticKey:       [ 'PersonWorkAgreement' ],
   representativeKey: 'PersonWorkAgreement',
   dataCategory: #VALUE_HELP,
   usageType: {
     serviceQuality:  #C,
     dataClass:       #MIXED,
     sizeCategory:    #L
    }
}

@Consumption.ranked: true
@Search.searchable: true
@Consumption.dbHints: [ 'USE_HEX_PLAN' ]
     
define view C_ProjDmndResourceAssignmentVH
  as select from           I_PersonWorkAgreement_1     as PersWrkAgrmt

// Cost Center of Project Demand is a kind of import parameter of this value help.

    inner join             I_PersonWorkAgrmtOrglDetails as PersWrkAgrmtOrgDet      
                     on PersWrkAgrmt.PersonWorkAgreement = PersWrkAgrmtOrgDet.PersonWorkAgreement
// all current and future org assignments                     

                    and                                    PersWrkAgrmtOrgDet.EndDate               >= $session.system_date 

    inner join             I_PersonWorkAgrmtStatus      as PersWrkAgrmtStatDet     
             on PersWrkAgrmtOrgDet.PersonWorkAgreement   = PersWrkAgrmtStatDet.PersonWorkAgreement
            and                                            PersWrkAgrmtStatDet.WorkAgreementStatus   =  '1'
    /* Find active record in future and that has intersection w/ the OrglDetails Record - Hope that there is only one intersection for the cardinality    */
            and PersWrkAgrmtOrgDet.EndDate              >= PersWrkAgrmtStatDet.StartDate
            and PersWrkAgrmtOrgDet.StartDate            <= PersWrkAgrmtStatDet.EndDate 
            and                                            PersWrkAgrmtStatDet.EndDate             >= $session.system_date

    association [1..1] to I_PersonWorkAgreement_1   as _PersonWorkAgreement    on  $projection.PersonWorkAgreement = _PersonWorkAgreement.PersonWorkAgreement

                                                                                   
{ 
      @Search: { //mode: #IDENTIFIER,    

                 defaultSearchElement: true,
                 fuzzinessThreshold: 0.8,
                 ranking: #HIGH }
      @EndUserText.label: 'Resource'
//    @EndUserText.quickInfo: 'Personnel number'

      @UI: { lineItem:       [{ position: 10, importance: #HIGH }]
      }
      key cast( PersWrkAgrmt.PersonWorkAgreement as tv_proj_dmnd_persno preserving type )     as PersonWorkAgreement,
/* CE2402 - moved in key to have unique key */
      key PersWrkAgrmtOrgDet.StartDate                                                        as StartDate,
      key PersWrkAgrmtOrgDet.EndDate                                                          as EndDate,

      @Search.defaultSearchElement: true
      @Search.ranking: #LOW
      @Search.fuzzinessThreshold: 0.8
      @Semantics.text: true
      @UI: {
      lineItem:       [{ position: 20, importance: #HIGH }]
      }
      PersWrkAgrmt.PersonFullName          as PersonFullName,

      @Search.defaultSearchElement: true
      @Search.ranking: #LOW
      @Search.fuzzinessThreshold: 0.8
      @Semantics.text: true              
      @UI: {
      lineItem:       [{ position: 30, importance: #HIGH }]
      }
      PersWrkAgrmt._WorkforcePerson._WorkplaceAddress.DefaultEmailAddress as EmailAddress,
//      WPlaceAdress.DefaultEmailAddress     as EmailAddress,


      @Search.defaultSearchElement: true
      @Search.ranking: #LOW
      @Search.fuzzinessThreshold: 0.8
      @Semantics.text: true
      @UI: {
      lineItem:       [{ position: 40, importance: #HIGH }]
      }
 
      @EndUserText.label: 'Job Title'
      PersWrkAgrmtOrgDet._PersonWorkAgrmtJobText[1:Language = $session.system_language].JobName as JobName,

      @UI: {
      lineItem:       [{ position: 50, importance: #HIGH }]
      }
      @EndUserText.label: 'Job Code'
      PersWrkAgrmtOrgDet.Job               as Job,
/* CE2402 - In key to have unique key
      PersWrkAgrmtOrgDet.StartDate         as StartDate,
      PersWrkAgrmtOrgDet.EndDate           as EndDate,
*/      
      @Consumption.filter.hidden: true
      PersWrkAgrmtOrgDet.CostCenter        as CostCenter,

      // Required for Authorization check

      @UI.hidden
      PersWrkAgrmt.AuthorizationGroup,
      @Consumption.filter.hidden: true
      PersWrkAgrmtOrgDet.PersonWorkAgrmtAuthznGrpg,
      
      @Consumption.filter.hidden: true      
      PersWrkAgrmt.Person,   

      PersWrkAgrmt._BusinessPartner,
      
      @Consumption.filter.hidden: true
      _PersonWorkAgreement
}