Hi,
whats the correct syntax to user column values as parameter values on table joins at cds views?
i want the value lfgja from table prev to be used as parameter input at the join.
define view zbc_wcr_invent_6_months
as select from zbc_wcr_invent as prev
inner join zbc_wcr_invent_plus_month( p_yearIn: :prev.lfgja , p_monIn: :prev.lfmon) as future1 on future1.werks = prev.werks
{
key prev.mandt,
key prev.vkorg,
key prev.spart,
prev.lfgja as prevlfgja,
prev.lfmon as prevlfmon,
prev.stockvalue as prevValue,
prev.stockvalue0815 as prevvalue0815,
future1.stockvalue as ValueFuture,
future1.stockvalue0815 as value0815Future
}
the joined view:
define view zbc_wcr_invent_plus_month
with parameters p_yearIn : abap.char(4),
p_monIn: abap.char(2)
as select from zbc_wcr_invent_prev_mon_p_func ( p_yearIn: :p_yearIn, p_monIn: :p_monIn ) {//
key werks,
mandt,
vkorg,
spart,
lfgja,
lfmon,
sum (stockvalue) as stockvalue,
sum (stockvalue0815) as stockvalue0815
} group by mandt,vkorg, werks, spart,lfgja,lfmon
thanks
Philipp