P_ProjectCostsInGlobalCurrency

DDL: P_PROJECTCOSTSINGLOBALCURRENCY SQL: PPROJINGLBCRCY Type: view CONSUMPTION

P_ProjectCostsInGlobalCurrency is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (I_ProjectCostLineItems) and exposes 10 fields with key field Project.

Data Sources (1)

SourceAliasJoin Type
I_ProjectCostLineItems I_ProjectCostLineItems from

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PPROJINGLBCRCY view
AbapCatalog.compiler.compareFilter true view
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #CHECK view
VDM.private true view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (10)

KeyFieldSource TableSource FieldDescription
KEY Project Project
PlanningCategory PlanningCategory
GlobalCurrency GlobalCurrency
CompanyCode CompanyCode
ControllingArea ControllingArea
ProjectSummaryTaskUUID ProjectSummaryTaskUUID
ProfitCenter ProfitCenter
FiscalYearPeriod FiscalYearPeriod
YearMonth
CurrentDate
@AbapCatalog.sqlViewName: 'PPROJINGLBCRCY'
@AbapCatalog.compiler.compareFilter: true
@VDM.viewType: #CONSUMPTION
@AccessControl.authorizationCheck: #CHECK
@VDM.private:true
@ClientHandling.algorithm: #SESSION_VARIABLE
//@EndUserText.label: 'Project Costs in Global Currency'

define view P_ProjectCostsInGlobalCurrency
  as select from I_ProjectCostLineItems
{

  key Project,
      PlanningCategory,
      @Semantics.currencyCode:true
      GlobalCurrency,
      CompanyCode,
      ControllingArea,
      ProjectSummaryTaskUUID,
      ProfitCenter,
      FiscalYearPeriod,
      @Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
      @EndUserText.label: 'Actual Cost In CO Area Currency'
      @EndUserText.quickInfo: 'Actual Cost in CO Area Currency'

      case
          when  PlanningCategory = 'ACT01' and IsCommitment != 'X'
              then AmountInGlobalCurrency
          else 0
      end                                                                                                                                                                                                                         as          ActualAmountInGlobalCurrency,


      @Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
      @EndUserText.label: 'Plan Cost In CO Area Currency'
      @EndUserText.quickInfo: 'Plan Cost in CO Area Currency'
      case
      when  PlanningCategory <> 'ACT01' and PlanningCategory <> 'PREDICT01' and PlanningCategory <> 'PREDICT02' and PlanningCategory <> 'PREDICT03' and PlanningCategory <> 'CMTMT'
      then AmountInGlobalCurrency
       else 0
      end                                                                                                                                                                                                                         as          PlanAmountInGlobalCurrency,

      concat(substring (PostingDate,1, 4), substring (PostingDate,5, 2))                                                                                                                                                          as          YearMonth,
      $session.system_date                                                                                                                                                                                                        as          CurrentDate


}

where
  ProjectCategory = '6' and ProjectProfileCode <> 'YP01'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PROJECTCOSTLINEITEMS"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/