<?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: Problem in using Native Sql with HANA in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-native-sql-with-hana/m-p/11215574#M1911262</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alright, in that case, I'd say the most likely reason is that the loop condition is FALSE at that point, e.g. your range list had been completely iterated.&lt;/P&gt;&lt;P&gt;Without a reproducible example, that's about what we can tell...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Lars&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Aug 2015 08:30:14 GMT</pubDate>
    <dc:creator>lbreddemann</dc:creator>
    <dc:date>2015-08-06T08:30:14Z</dc:date>
    <item>
      <title>Problem in using Native Sql with HANA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-native-sql-with-hana/m-p/11215571#M1911259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am fetching HANA views data using native sql in abap. I have observed a problem that sap is allowing only 29 execute sql commands statements in a row and gives dump for 30th query. My code is like below&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp; LO_CONN &lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-size: 10pt;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;CL_SQL_CONNECTION&lt;/SPAN&gt;&lt;SPAN class="L0S70" style="font-size: 10pt;"&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;GET_CONNECTION&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-size: 10pt;"&gt;( CONN1&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-size: 10pt;"&gt;. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; LO_SQL_STMT &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;LO_CONN&lt;SPAN class="L0S70"&gt;-&amp;gt;&lt;/SPAN&gt;CREATE_STATEMENT&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;LOOP &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;AT &lt;/SPAN&gt;T_RANGE2 &lt;SPAN class="L0S52"&gt;INTO &lt;/SPAN&gt;WA_RANGE2&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;CONCATENATE &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'INSERT INTO&amp;nbsp; VBELN_TEMP1 VALUES (' &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;''&lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;''&lt;/SPAN&gt;WA_RANGE2&lt;SPAN class="L0S33"&gt;''&lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'' &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;')'&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;INTO &lt;/SPAN&gt;LV_SQL_INS&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;TRY&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LO_RESULT &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;LO_SQL_STMT&lt;SPAN class="L0S70"&gt;-&amp;gt;&lt;/SPAN&gt;EXECUTE_QUERY&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;LV_SQL_INS &lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;CATCH &lt;/SPAN&gt;CX_SQL_EXCEPTION &lt;SPAN class="L0S52"&gt;INTO &lt;/SPAN&gt;LX_SQL_EXC&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S31"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LV_TEXT = LX_SQL_EXC-&amp;gt;GET_TEXT( ).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S31"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MESSAGE LV_TEXT TYPE 'E'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;ENDTRY&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;ENDLOOP&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here I am passing a value range to &lt;SPAN style="font-size: 13.6000003814697px;"&gt;VBELN_TEMP1 table of HANA through a loop on &lt;SPAN style="font-size: 13.6000003814697px;"&gt;T_RANGE2 internal tab.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.6000003814697px;"&gt;It works fine till TABX 29 and gives exits the program on 30th iteration.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help if anyone has observed same problem and found solution on it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shriniwas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 06:50:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-native-sql-with-hana/m-p/11215571#M1911259</guid>
      <dc:creator>former_member223897</dc:creator>
      <dc:date>2015-08-06T06:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in using Native Sql with HANA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-native-sql-with-hana/m-p/11215572#M1911260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My guess here would be that - for some reason - with every loop iteration a new connection is actually used and the old one doesn't get closed. &lt;/P&gt;&lt;P&gt;NetWeaver work processes can have a max. of 30 connections (including the default one) open at any given time, so that might be the reason for the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, as usual, without the actual error message and the information from the work process developer trace file (dev_wXX) all this is just blind guessing while being hand-cuffed in a safe that someone had thrown into a deep river... &lt;SPAN __jive_emoticon_name="grin" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1322/images/emoticons/grin.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Lars&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 07:24:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-native-sql-with-hana/m-p/11215572#M1911260</guid>
      <dc:creator>lbreddemann</dc:creator>
      <dc:date>2015-08-06T07:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in using Native Sql with HANA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-native-sql-with-hana/m-p/11215573#M1911261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lars,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your answer sounds logical. Actually loop is exiting without giving any error message so I am not able to understand the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Shriniwas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 07:47:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-native-sql-with-hana/m-p/11215573#M1911261</guid>
      <dc:creator>former_member223897</dc:creator>
      <dc:date>2015-08-06T07:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in using Native Sql with HANA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-native-sql-with-hana/m-p/11215574#M1911262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alright, in that case, I'd say the most likely reason is that the loop condition is FALSE at that point, e.g. your range list had been completely iterated.&lt;/P&gt;&lt;P&gt;Without a reproducible example, that's about what we can tell...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Lars&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 08:30:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-native-sql-with-hana/m-p/11215574#M1911262</guid>
      <dc:creator>lbreddemann</dc:creator>
      <dc:date>2015-08-06T08:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in using Native Sql with HANA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-native-sql-with-hana/m-p/11215575#M1911263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For every loop iteration a new connection has been created with the old one still existing. You can avoid this by using COMMIT WORK at the end of TRY CATCH block.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CATCH CX_SQL_EXCEPTION INTO LX_SQL_EXC.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LV_TEXT = LX_SQL_EXC-&amp;gt;GET_TEXT( ).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MESSAGE LV_TEXT TYPE 'E'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; COMMIT WORK.&amp;nbsp; "INS&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lo_conn-&amp;gt;close( ). "INS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 09:46:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-native-sql-with-hana/m-p/11215575#M1911263</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-08-06T09:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in using Native Sql with HANA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-native-sql-with-hana/m-p/11215576#M1911264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karthik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your solution worked for me. Thanks a lot. Great help.. &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/1322/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shriniwas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2015 10:13:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-using-native-sql-with-hana/m-p/11215576#M1911264</guid>
      <dc:creator>former_member223897</dc:creator>
      <dc:date>2015-08-06T10:13:49Z</dc:date>
    </item>
  </channel>
</rss>

