Skip to Content
0
Former Member
Nov 01, 2016 at 08:04 PM

Table name $projection unknown or shadowed by an alias

2049 Views

Hi,

@AbapCatalog.sqlViewName: 'ZAJ_ASSO'
@ClientDependent: true
@AbapCatalog.compiler.compareFilter: true
@EndUserText.label: 'AJ Test Association'
define view Ztest_Aj_Asso
with parameters
p_calday : sydatum
as select from vbak as vb inner join vbap as VP
on vb.vbeln = VP.vbeln
{ key vb.vbeln,
vb.kunnr,
vb.erdat,
left(vb.erdat,6) as calyearmonth,
sum(case when vb.erdat between concat( $projection.calyearmonth ,'01') and $parameters.p_calday then vb.netwr else 0 end) as MTD
} where vb.erdat = $parameters.p_calday
group by vb.vbeln,vb.kunnr,vb.erdat

I want to calculate MTD, on using calculated "calyearmonth" i m getting this error, Kindly help to resolve, also is there any other way to calculate MTD QTD YTD