<?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 Re: CDS View join table with asterisk values in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-join-table-with-asterisk-values/m-p/645987#M27631</link>
    <description>&lt;P&gt;It looks LIKE supports character literal 'A%' externally in select statement(SQL). Passing the same value in field it is not working. It is better to double check with @horst.keller&lt;/P&gt;</description>
    <pubDate>Wed, 21 Mar 2018 19:42:37 GMT</pubDate>
    <dc:creator>rajkumarnarasimman</dc:creator>
    <dc:date>2018-03-21T19:42:37Z</dc:date>
    <item>
      <title>CDS View join table with asterisk values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-join-table-with-asterisk-values/m-p/645984#M27628</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;
  &lt;P&gt;i would like to start using more CDS View but i have small problem.&lt;/P&gt;
  &lt;P&gt;I would like to check if a value is like a value in a customizing table.&lt;/P&gt;
  &lt;P&gt;The values in the customizing table would be for example mvgr1 = '3*', mvgr1 = '4*'&lt;/P&gt;
  &lt;P&gt;Something like this:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;as select from vbap
inner join zzc_table on vbpa.mvgr1 like zzc_table.mvgr1&amp;lt;br&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;If i had only a single asterisk value i would select with &lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;where mvgr1 like '3%'
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;but the pattern should be edited in the customizing table.&lt;/P&gt;
  &lt;P&gt;In ABAP i could use range tables with the CP option.&lt;/P&gt;
  &lt;P&gt;Regards&lt;/P&gt;
  &lt;P&gt;Fabian&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 09:29:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-join-table-with-asterisk-values/m-p/645984#M27628</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-03-21T09:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: CDS View join table with asterisk values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-join-table-with-asterisk-values/m-p/645985#M27629</link>
      <description>&lt;P&gt;Hi Fabian Schmidt, &lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;In ABAP i could use range tables with the CP option.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Hope you can try the same range table concept in CDS also. Create one more &lt;STRONG&gt;CDS view &lt;/STRONG&gt;and get first the letter in the &lt;STRONG&gt;zzc_table.mvgr1&lt;/STRONG&gt; variable using &lt;STRONG&gt;SUBSTRING &lt;/STRONG&gt;function and using &lt;STRONG&gt;CONCAT &lt;/STRONG&gt;function merge '%' into the same variable as shown below. &lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;define view ZCDS_ZZCTABLE
as select from zzc_table as _zc
{
  CONCAT(SUBSTR(_zc.mvgr1,1,1),'%')     as MatGroup,
....
...
}&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;and use the above CDS view into the existing CDS view and do the inner join like below.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;as select from vbap
innerjoin ZCDS_ZZCTABLE on vbpa.mvgr1 like ZCDS_ZZCTABLE.MatGroup&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Regards&lt;/P&gt;
  &lt;P&gt;Rajkumar Narasimman&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 10:58:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-join-table-with-asterisk-values/m-p/645985#M27629</guid>
      <dc:creator>rajkumarnarasimman</dc:creator>
      <dc:date>2018-03-21T10:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: CDS View join table with asterisk values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-join-table-with-asterisk-values/m-p/645986#M27630</link>
      <description>&lt;P&gt;Hi Rajkumar,&lt;/P&gt;
  &lt;P&gt;thanks for your reply.&lt;/P&gt;
  &lt;P&gt;Unfortunately i get an syntax error if i try to use like in the join with a tablefield.&lt;/P&gt;
  &lt;P&gt;compare value with like-condition must be a character-like literal. (translated by myself from German).&lt;/P&gt;
  &lt;P&gt;Looks like the like-condition could only be with parameters or manual constants.&lt;/P&gt;
  &lt;P&gt;Regards&lt;/P&gt;
  &lt;P&gt;Fabian&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 15:12:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-join-table-with-asterisk-values/m-p/645986#M27630</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-03-21T15:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: CDS View join table with asterisk values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-join-table-with-asterisk-values/m-p/645987#M27631</link>
      <description>&lt;P&gt;It looks LIKE supports character literal 'A%' externally in select statement(SQL). Passing the same value in field it is not working. It is better to double check with @horst.keller&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 19:42:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cds-view-join-table-with-asterisk-values/m-p/645987#M27631</guid>
      <dc:creator>rajkumarnarasimman</dc:creator>
      <dc:date>2018-03-21T19:42:37Z</dc:date>
    </item>
  </channel>
</rss>

