<?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: How to Insert SAP table into a Remote Table with same structure (without LOOP... ENDLOOOP) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-insert-sap-table-into-a-remote-table-with-same-structure-without/m-p/12062658#M1969446</link>
    <description>&lt;P&gt;Never done it. The ABAP documentation says that only one database connection can be used at a time. If you want to do it in one SQL query as you propose, I would opt for a non-ABAP solution. An intermediate solution could use two SQL queries, first one to read the table into a file, and second one to load the table from the file, the file being in a shared directory.&lt;/P&gt;</description>
    <pubDate>Thu, 05 Dec 2019 06:49:38 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2019-12-05T06:49:38Z</dc:date>
    <item>
      <title>How to Insert SAP table into a Remote Table with same structure (without LOOP... ENDLOOOP)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-insert-sap-table-into-a-remote-table-with-same-structure-without/m-p/12062656#M1969444</link>
      <description>&lt;P&gt;I have a remote connection in DBCON (called "CONN1").&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;I am trying to INSERT * (all records) from SAP (DEFAULT connection) to a remote table (via DBCON connection "CONN1") with the same structure.&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;I have tried all kinds of syntax including:&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 CONN1.SCHEMA.TABLE_NAME&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;(SELECT * FROM TABLE_NAME)&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;and I always get a short dump (SQL error).&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;My only success has been to insert all records from TABLE_NAME (in the DEFAULT SAP connection) into an internal table (ITAB) and then Connect to CONN1 and then LOOP at the ITAB and INSERT records into the Remote table one by one. But this is VERY SLOW. We need to be able to do a INSERT with Sub-Select as I described above in two different schemas (CONN1 and DEFAULT).&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Any advice you can provide will be greatly appreciated!&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Thank you very much, Chris T.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 19:31:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-insert-sap-table-into-a-remote-table-with-same-structure-without/m-p/12062656#M1969444</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-12-04T19:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to Insert SAP table into a Remote Table with same structure (without LOOP... ENDLOOOP)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-insert-sap-table-into-a-remote-table-with-same-structure-without/m-p/12062657#M1969445</link>
      <description>&lt;P&gt;Did you check this &lt;A href="https://answers.sap.com/questions/11026187/insert-into-remote-table---ora-02019.html"&gt;answer&lt;/A&gt; ? if its not going to work, share your code.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 19:48:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-insert-sap-table-into-a-remote-table-with-same-structure-without/m-p/12062657#M1969445</guid>
      <dc:creator>Nawanandana</dc:creator>
      <dc:date>2019-12-04T19:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to Insert SAP table into a Remote Table with same structure (without LOOP... ENDLOOOP)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-insert-sap-table-into-a-remote-table-with-same-structure-without/m-p/12062658#M1969446</link>
      <description>&lt;P&gt;Never done it. The ABAP documentation says that only one database connection can be used at a time. If you want to do it in one SQL query as you propose, I would opt for a non-ABAP solution. An intermediate solution could use two SQL queries, first one to read the table into a file, and second one to load the table from the file, the file being in a shared directory.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 06:49:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-insert-sap-table-into-a-remote-table-with-same-structure-without/m-p/12062658#M1969446</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-12-05T06:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to Insert SAP table into a Remote Table with same structure (without LOOP... ENDLOOOP)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-insert-sap-table-into-a-remote-table-with-same-structure-without/m-p/12062659#M1969447</link>
      <description>&lt;P&gt;I would try to use CL_SQL_CONNECTION for the insert-statements. This way I guess a SELECT...ENDSELECT would be possible and inside this loop, insert the data into the other connection created by CL_SQL_CONNECTION. Note that handling a SQL-connection in this way involves some effort... &lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 09:11:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-insert-sap-table-into-a-remote-table-with-same-structure-without/m-p/12062659#M1969447</guid>
      <dc:creator>Roland_J</dc:creator>
      <dc:date>2019-12-10T09:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to Insert SAP table into a Remote Table with same structure (without LOOP... ENDLOOOP)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-insert-sap-table-into-a-remote-table-with-same-structure-without/m-p/12062660#M1969448</link>
      <description>&lt;P&gt;I have previously written a blog with a custom z-program that copies data from SAP ASE DB over to a secondary DB (HANA) using ABAP ADBC (Native SQL). I believe the same approach should work for your requirement.&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sap.com/2017/10/28/replicating-data-into-hana-using-abap-adbc-native-sql/"&gt;https://blogs.sap.com/2017/10/28/replicating-data-into-hana-using-abap-adbc-native-sql/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2020 21:50:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-insert-sap-table-into-a-remote-table-with-same-structure-without/m-p/12062660#M1969448</guid>
      <dc:creator>albanleong</dc:creator>
      <dc:date>2020-01-02T21:50:03Z</dc:date>
    </item>
  </channel>
</rss>

