P_ENGMNTPROJUNBILLEDREVDATA

CDS View

P_ENGMNTPROJUNBILLEDREVDATA is a CDS View in S/4HANA. It contains 7 fields. 2 CDS views read from this table.

CDS Views using this table (2)

ViewTypeJoinVDMDescription
P_EngmntProjUnbilledRevAggrgn view from COMPOSITE
P_EPUnbilldRevnInLeadLdgr view from COMPOSITE

Fields (7)

KeyField CDS FieldsUsed in Views
Currency Currency 1
EngagementProject EngagementProject 1
FiscalYearPeriod FiscalYearPeriod 1
Ledger Ledger 1
SalesOrder SalesOrder 1
SalesOrderItem SalesOrderItem 1
UnbilldRevnAmountInProjCrcy UnbilldRevnAmountInProjCrcy 1
@AbapCatalog: {
  sqlViewName: 'PENGPROJUNBLREVD',
  compiler.compareFilter: true,
  preserveKey: true
}
@VDM: {
  viewType: #COMPOSITE,
  private: true,
  lifecycle.contract.type: #NONE
}
@AccessControl: {
  authorizationCheck: #NOT_REQUIRED,
  personalData.blocking: #NOT_REQUIRED
}
@ObjectModel.usageType: {
  sizeCategory: #XL,
  dataClass: #MIXED,
  serviceQuality: #D
}
@ClientHandling.algorithm: #SESSION_VARIABLE
//@EndUserText.label: 'Engagement Project Unbilled Revenue Data'

define view P_EngmntProjUnbilledRevData
  //  as select from P_EngmntProjectForAuthzdUser      as A

  // Super User Development replaced P_EngmntProjectForAuthzdUser by I_EngmntProjAssgmtToSessionUsr to avoid where clause

  as select from I_EngmntProjAssgmtToSessionUsr as A
    inner join   P_GLAcctLineItemSemTagProjects as B on  A.EngagementProject              = B.Project
                                                     and A.EngmntProjectHeaderCompanyCode = B.CompanyCode
                                                     and A.ControllingArea                = B.ControllingArea
    inner join   I_EvtBsdRevnRecgnEvalScp       as C on  B.Ledger                         = C.Ledger
                                                     and A.EngmntProjectHeaderCompanyCode = C.CompanyCode
                                                     and B.GLAccountHierarchy             = C.GLAccountHierarchy
{

  A.EngagementProject,
  B.SalesOrder,
  A.Currency                                                      as ProjectCurrency,
  A.Currency,

  case
    when A.Currency = B.CompanyCodeCurrency
    then
    AmountInCompanyCodeCurrency
    when A.Currency = B.ControllingObjectCurrency
    then
    AmountInObjectCurrency
    when A.Currency = B.GlobalCurrency
    then
    AmountInGlobalCurrency
    else currency_conversion(   amount           => AmountInCompanyCodeCurrency,
                              source_currency    => CompanyCodeCurrency,
                              target_currency    => A.Currency,
                              exchange_rate_date => PostingDate,
                              exchange_rate_type => 'M',
                              error_handling     => 'SET_TO_NULL' )
  end                                                             as UnbilldRevnAmountInProjCrcy,

  B.PostingDate,
  B.SalesOrderItem,
  B.FiscalYear,
  //B.FiscalPeriod,

  concat(B.FiscalYear, concat('0', substring (PostingDate,5,2) )) as FiscalYearPeriod,
  B.AmountInCompanyCodeCurrency                                   as UnbilledRevnInCoCodeCrcy,
  B.Ledger,
  B.GLAccountHierarchy,
  A.IsMyProject,
  A.ProjectManagerExternalID,
  A.ProjectManagerName
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ENGMNTPROJASSGMTTOSESSIONUSR",
"I_EVTBSDREVNRECGNEVALSCP",
"P_GLACCTLINEITEMSEMTAGPROJECTS"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/