<?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: Native SQL in ABAP - dynamic Where clause not working in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-in-abap-dynamic-where-clause-not-working/m-p/439889#M12907</link>
    <description>&lt;P&gt;Just use ADBC (cl_sql_statement) instead of EXEC SQL. Or even better, create an AMDP and write the whole thing in HANA SQL Script. All nicely modern and up to date technology.&lt;/P&gt;</description>
    <pubDate>Fri, 19 May 2017 05:45:05 GMT</pubDate>
    <dc:creator>matt</dc:creator>
    <dc:date>2017-05-19T05:45:05Z</dc:date>
    <item>
      <title>Native SQL in ABAP - dynamic Where clause not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-in-abap-dynamic-where-clause-not-working/m-p/439888#M12906</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am facing a strange issue with NAtive SQL statement. &lt;/P&gt;&lt;P&gt; I have a DB connection set up from SAP to Oracle and i am writing a query to fetch data from that oracle table. &lt;/P&gt;&lt;P&gt;Issue is when i use value in 'single quotes' in where clause, its fetching correct data but when i give dynamic where clause, its not fetching any data . please see examples below - &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Working - &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;EXEC SQL.&lt;BR /&gt;
 OPEN dbcur FOR Select STYLE_NUMBER,&lt;BR /&gt;
 SERIAL_NUMBER&lt;BR /&gt;
 FROM &amp;lt;VIEW_name&amp;gt; WHERE SERIAL_NUMBER = '1234'&lt;/P&gt;&lt;P&gt;ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Not working - &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;data : p_serial_num type string.&lt;/P&gt;&lt;P&gt;p_serial_num = '1234'.&lt;/P&gt;&lt;P&gt;EXEC SQL.&lt;BR /&gt;
 OPEN dbcur FOR Select STYLE_NUMBER,&lt;BR /&gt;
 SERIAL_NUMBER&lt;BR /&gt;
 FROM &amp;lt;VIEW_name&amp;gt; WHERE SERIAL_NUMBER = &lt;STRONG&gt;:&lt;/STRONG&gt;p_serial_num&lt;/P&gt;&lt;P&gt;ENDEXEC.&lt;/P&gt;&lt;P&gt;It used to work previously, but we have recently upgraded ho HANA, so not sure if anything causing the issue. &lt;/P&gt;&lt;P&gt;If anyone of you experienced this kind of issue, please post your suggestions .&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Sagar &lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 20:29:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-in-abap-dynamic-where-clause-not-working/m-p/439888#M12906</guid>
      <dc:creator>sagar_pawar14</dc:creator>
      <dc:date>2017-05-18T20:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: Native SQL in ABAP - dynamic Where clause not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-in-abap-dynamic-where-clause-not-working/m-p/439889#M12907</link>
      <description>&lt;P&gt;Just use ADBC (cl_sql_statement) instead of EXEC SQL. Or even better, create an AMDP and write the whole thing in HANA SQL Script. All nicely modern and up to date technology.&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2017 05:45:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/native-sql-in-abap-dynamic-where-clause-not-working/m-p/439889#M12907</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2017-05-19T05:45:05Z</dc:date>
    </item>
  </channel>
</rss>

