<?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: EXEC SQL: Internal table and loop needed to push records from SAP? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/exec-sql-internal-table-and-loop-needed-to-push-records-from-sap/m-p/6767093#M1462632</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP has provided standard API for connecting with external database ADBC. Refer: [ADBC - ABAP Database Connectivity |http://help.sap.com/abapdocu_70/en/ABENADBC.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of writing the Native SQL you can make use of the methods of the ADBC classes. Refer to the demo program ADBC_DEMO for details.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Apr 2010 04:39:17 GMT</pubDate>
    <dc:creator>SuhaSaha</dc:creator>
    <dc:date>2010-04-15T04:39:17Z</dc:date>
    <item>
      <title>EXEC SQL: Internal table and loop needed to push records from SAP?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exec-sql-internal-table-and-loop-needed-to-push-records-from-sap/m-p/6767091#M1462630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement to perform a table extract from SAP to External Database using DBCO config and Native SQL.  The source system is Oracle ECC 6.0 and the target is an external MS SQL Server database (non-SAP).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Technical questions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   1) Do you have to use an internal table and loop to insert each record into the external database?  Is it possible to pass an entire table or group of records in one call? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) See any places for optimization here?  I will look into using the PACKAGE SIZE to control the size of the internal tables, but it appears the bottleneck is the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*Get source data and insert into ITAB

SELECT  *
  INTO TABLE lt_jest
  FROM jest.

*?????????????????????????????????????????????????????????????*
* #### IS IT POSSIBLE TO NOT LOOP OVER EACH RECORD HERE? #### *
*?????????????????????????????????????????????????????????????*

*Loop at ITAB and insert into SQL Server one record at a time

  LOOP AT lt_jest ASSIGNING &amp;lt;FS&amp;gt;.
    EXEC SQL.
      INSERT INTO [dbo].[JEST]
       VALUES (:&amp;lt;FS&amp;gt;-MANDT,:&amp;lt;FS&amp;gt;-OBJNR,:&amp;lt;FS&amp;gt;-STAT,:&amp;lt;FS&amp;gt;-INACT,:&amp;lt;FS&amp;gt;-CHGNR);
        commit;
    ENDEXEC.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Apr 2010 15:42:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exec-sql-internal-table-and-loop-needed-to-push-records-from-sap/m-p/6767091#M1462630</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-14T15:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: EXEC SQL: Internal table and loop needed to push records from SAP?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exec-sql-internal-table-and-loop-needed-to-push-records-from-sap/m-p/6767092#M1462631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure why we would want to use ABAP to do this.  If it were me, I'd ask Basis or DBA to extract and push to new table using SQL on the db server, not through an ABAP program.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Apr 2010 04:22:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exec-sql-internal-table-and-loop-needed-to-push-records-from-sap/m-p/6767092#M1462631</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-15T04:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: EXEC SQL: Internal table and loop needed to push records from SAP?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exec-sql-internal-table-and-loop-needed-to-push-records-from-sap/m-p/6767093#M1462632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP has provided standard API for connecting with external database ADBC. Refer: [ADBC - ABAP Database Connectivity |http://help.sap.com/abapdocu_70/en/ABENADBC.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of writing the Native SQL you can make use of the methods of the ADBC classes. Refer to the demo program ADBC_DEMO for details.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Apr 2010 04:39:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exec-sql-internal-table-and-loop-needed-to-push-records-from-sap/m-p/6767093#M1462632</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-04-15T04:39:17Z</dc:date>
    </item>
  </channel>
</rss>

