P_ProjectPredictSummryMain

DDL: P_PROJECTPREDICTSUMMRYMAIN SQL: PPROJPREDSMMAIN Type: view CONSUMPTION

Project Prediction Summary Main

P_ProjectPredictSummryMain is a Consumption CDS View that provides data about "Project Prediction Summary Main" in SAP S/4HANA. It reads from 1 data source (I_ProjectCostLineItems) and exposes 5 fields with key fields Project, ProjectInternalID.

Data Sources (1)

SourceAliasJoin Type
I_ProjectCostLineItems _ProjectCostLineItmes from

Parameters (1)

NameTypeDefault
P_PlanningCategory fcom_category

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PPROJPREDSMMAIN view
AbapCatalog.compiler.compareFilter true view
EndUserText.label Project Prediction Summary Main view
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.buffering.status #NOT_ALLOWED view
Metadata.ignorePropagatedAnnotations true view
AbapCatalog.preserveKey true view

Fields (5)

KeyFieldSource TableSource FieldDescription
KEY Project Project
KEY ProjectInternalID ProjectInternalID
PlanningCategory PlanningCategory
GlobalCurrency GlobalCurrency
ActlCmtmtCumltvAmtInGlobCrcy ActlCmtmtCumltvAmtInGlobCrcy Assigned value in Global Currency
@AbapCatalog.sqlViewName: 'PPROJPREDSMMAIN'
@AbapCatalog.compiler.compareFilter: true
@EndUserText.label: 'Project Prediction Summary Main'
@VDM.viewType: #CONSUMPTION
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private:true
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.buffering.status: #NOT_ALLOWED
@Metadata.ignorePropagatedAnnotations: true
@AbapCatalog.preserveKey:true

define view P_ProjectPredictSummryMain
  with parameters
    P_PlanningCategory : fcom_category
  as select from I_ProjectCostLineItems as _ProjectCostLineItmes
  //  association [0..1] to P_ProjPredictionDteCalcintmd as _ProjPredict          on  $projection.Project           = _ProjPredict.Project

  //                                                                              and _ProjPredict.PlanningCategory = 'PREDICT01'

{


  key Project,
  key ProjectInternalID,

      PlanningCategory,

      GlobalCurrency,

      @Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
      @EndUserText.label: 'Assigned value in Global Currency'
      @EndUserText.quickInfo: 'Assigned value in Global Currency'
      @DefaultAggregation: #SUM
      ActlCmtmtCumltvAmtInGlobCrcy,

      @Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
      @EndUserText.label: 'Actul Cost In CO Area Currency'
      @EndUserText.quickInfo: 'Actual Cost in CO Area Currency'
      @DefaultAggregation: #SUM
      case
          when  _ProjectCostLineItmes.PlanningCategory = 'ACT01'
              then _ProjectCostLineItmes.AmountInGlobalCurrency
          else 0
      end as ActualAmountInGlobalCurrency,

      @Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
      @EndUserText.label: 'Commitment Cost In CO Area Currency'
      @EndUserText.quickInfo: 'Commitment Cost in CO Area Currency'
      @DefaultAggregation: #SUM
      case
          when  _ProjectCostLineItmes.PlanningCategory = 'CMTMT'
              then _ProjectCostLineItmes.AmountInGlobalCurrency
          else 0
      end as CmtmtCostInGlobalCurrency,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
      @EndUserText.label: 'Plan Cost In CO Area Currency'
      @EndUserText.quickInfo: 'Plan Cost in CO Area Currency'
      case
      when  _ProjectCostLineItmes.PlanningCategory = $parameters.P_PlanningCategory //'PLN'

      then _ProjectCostLineItmes.AmountInGlobalCurrency
       else 0
      end as PlanAmountInGlobalCurrency,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
      @EndUserText.label: 'Predicted Cost In CO Area Currency'
      @EndUserText.quickInfo: 'Predicted Cost in CO Area Currency'
      case
      when  _ProjectCostLineItmes.PlanningCategory = 'PREDICT01' //testing purpose i changed to cpp1

      then _ProjectCostLineItmes.AmountInGlobalCurrency
       else 0
      end as PredictedAmtInGlobalCurrency,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
      case
      when  PlanningCategory = 'PREDICT02'
      then AmountInGlobalCurrency
       else 0
      end as LowerPredictionAmtInGlobCrcy,

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
      case
      when  PlanningCategory = 'PREDICT03'
      then AmountInGlobalCurrency
       else 0
      end as UpperPredictionAmtInGlobCrcy
}