<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic CDS View parameter within join in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-parameter-within-join/m-p/403506#M10403</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;whats the correct syntax to user column values as parameter values on table joins at cds views?&lt;/P&gt;&lt;P&gt;i want the value lfgja from table prev to be used as parameter input at the join.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;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
}
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;the joined view:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;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
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Philipp&lt;/P&gt;</description>
    <pubDate>Wed, 29 Mar 2017 08:59:25 GMT</pubDate>
    <dc:creator>philipp_steidl</dc:creator>
    <dc:date>2017-03-29T08:59:25Z</dc:date>
    <item>
      <title>CDS View parameter within join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-parameter-within-join/m-p/403506#M10403</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;whats the correct syntax to user column values as parameter values on table joins at cds views?&lt;/P&gt;&lt;P&gt;i want the value lfgja from table prev to be used as parameter input at the join.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;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
}
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;the joined view:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;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
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Philipp&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 08:59:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-parameter-within-join/m-p/403506#M10403</guid>
      <dc:creator>philipp_steidl</dc:creator>
      <dc:date>2017-03-29T08:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: CDS View parameter within join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-parameter-within-join/m-p/403507#M10404</link>
      <description>&lt;P&gt;Check the documentation to see that you cannot pass columns to parameters.&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/http.svc/rc/abapdocu_751_index_htm/7.51/en-US/index.htm?file=abencds_f1_select_parameters.htm" target="test_blank"&gt;https://help.sap.com/http.svc/rc/abapdocu_751_index_htm/7.51/en-US/index.htm?file=abencds_f1_select_parameters.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 09:13:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-parameter-within-join/m-p/403507#M10404</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-03-29T09:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: CDS View parameter within join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-parameter-within-join/m-p/403508#M10405</link>
      <description>&lt;P&gt;Hi Horst,&lt;/P&gt;&lt;P&gt;If you have a view with a parameter, then if we are not able to join with other views and use those fields as input to the parameters, the only way is to wrap the view with a parameter with another view.  Is that the only way?&lt;/P&gt;&lt;P&gt;I have a scenario, where the date is an input parameter.  I need to get this input date from a join from other tables.  So the only way it appears is to wrap the view with a parameter with another view without this parameter but just a field instead. &lt;/P&gt;&lt;P&gt;Your feedback would be appreciated.  I did post another question and tagged you but I did not hear back from you.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2020 19:48:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-parameter-within-join/m-p/403508#M10405</guid>
      <dc:creator>jmalla</dc:creator>
      <dc:date>2020-07-01T19:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: CDS View parameter within join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-parameter-within-join/m-p/403509#M10406</link>
      <description>&lt;P&gt;Why do you need the parameter? Is one more join not possible?&lt;BR /&gt;A date parameter requires a single date value. A literal, a parameter (with a default system field value or without), a session-variable. Even in AMDP you need something like a scalar variable. A field of a view is not scalar at all.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2020 22:05:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-parameter-within-join/m-p/403509#M10406</guid>
      <dc:creator>gasparerdelyi</dc:creator>
      <dc:date>2020-07-03T22:05:40Z</dc:date>
    </item>
  </channel>
</rss>

