<?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 Best solution for EXEC SQLu2026. INSERT? Time problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/best-solution-for-exec-sqlu2026-insert-time-problem/m-p/6285191#M1388943</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 have a problem with native sql in abap. I have next code and itu2019s working properly (see below) , but the problem occurs when abap internal table is too big, because exec sql u2026 endexec is executed one time for each internal table line, so it needs too much time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know any solution? Is it possible to insert the internal table with only one exec sql?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanku2019s in advance for your time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT i_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      EXEC SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        insert into oracle_table@db&lt;/P&gt;&lt;P&gt;        (value1,&lt;/P&gt;&lt;P&gt;         Value2&lt;/P&gt;&lt;P&gt;        )&lt;/P&gt;&lt;P&gt;        values&lt;/P&gt;&lt;P&gt;        (:i_table-val1,&lt;/P&gt;&lt;P&gt;         :i_table-val2&lt;/P&gt;&lt;P&gt;         )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Oct 2009 11:49:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-10-28T11:49:48Z</dc:date>
    <item>
      <title>Best solution for EXEC SQLu2026. INSERT? Time problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/best-solution-for-exec-sqlu2026-insert-time-problem/m-p/6285191#M1388943</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 have a problem with native sql in abap. I have next code and itu2019s working properly (see below) , but the problem occurs when abap internal table is too big, because exec sql u2026 endexec is executed one time for each internal table line, so it needs too much time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know any solution? Is it possible to insert the internal table with only one exec sql?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanku2019s in advance for your time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    LOOP AT i_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      EXEC SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        insert into oracle_table@db&lt;/P&gt;&lt;P&gt;        (value1,&lt;/P&gt;&lt;P&gt;         Value2&lt;/P&gt;&lt;P&gt;        )&lt;/P&gt;&lt;P&gt;        values&lt;/P&gt;&lt;P&gt;        (:i_table-val1,&lt;/P&gt;&lt;P&gt;         :i_table-val2&lt;/P&gt;&lt;P&gt;         )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 11:49:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/best-solution-for-exec-sqlu2026-insert-time-problem/m-p/6285191#M1388943</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-28T11:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: Best solution for EXEC SQLu2026. INSERT? Time problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/best-solution-for-exec-sqlu2026-insert-time-problem/m-p/6285192#M1388944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Definately this approach will take a lot of time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i would suggest that you create a table, fill that table with the internal table you are using for the insertion and use below mentioned code this will improve your processing time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exec SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT INTO &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXEC SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;insert into oracle_table@db&lt;/P&gt;&lt;P&gt;(value1,&lt;/P&gt;&lt;P&gt;Value2&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;SELECT  COLUMN1, COLUMN2 FROM DUAL&lt;/P&gt;&lt;P&gt;FROM ZTABLE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDEXEC.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jan 2010 11:48:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/best-solution-for-exec-sqlu2026-insert-time-problem/m-p/6285192#M1388944</guid>
      <dc:creator>former_member273995</dc:creator>
      <dc:date>2010-01-08T11:48:13Z</dc:date>
    </item>
  </channel>
</rss>

