@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
}
/*+[internal] {
"BASEINFO":
{
"FROM ":
[
"I_PROJECTCOSTLINEITEMS"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Depth:
1
2
3
4
5
All
Reload
P_ProjectPredictSummryMain view