<?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: ABAP internal table insert to remote Oracle database table problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369297#M1039710</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you were maintaining the remote table successfully when you were using a LOOP, as you say in your first post, then you must be accessing the remote table correctly.  If you are filling your temp R/3 table successfully before you call this bit of code, then you must be accessing the local table correctly.  Put them both together.....and it should work.  What is the Oracle error code and message that you are getting?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm starting to think that perhaps you should go back to your original method of updating the remote table record by record in a LOOP, which you say was working. Even if you get this direct table-to-table update to work, there is no guarantee (there is never any guarantee) that it will be much quicker, especially over a remote link.  I've not done this sort of thing in SAP before, but I've previously used DBLINK to link two Oracle databases and just the existence of the remote connection seemed sometimes to affect access paths for the worse.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Aug 2008 09:35:22 GMT</pubDate>
    <dc:creator>christine_evans</dc:creator>
    <dc:date>2008-08-28T09:35:22Z</dc:date>
    <item>
      <title>ABAP internal table insert to remote Oracle database table problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369281#M1039694</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;In an ABAP function, I can do a one on one insert in a table stored outside SAP in an Oracle database (Loop on the internal table). This piece of code works perfect .The problem is performance..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SO... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on the literature, it says that I can insert an internal table (mass insert) with the following statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT &amp;lt;remote database table&amp;gt;&lt;/P&gt;&lt;P&gt;FROM TABLE :internal_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I execute this statement (and I tried a lot of variants..) I always get this error: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Database error text........: "ORA-00925: missing INTO keyword#&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Triggering SQL statement...: "INSERT SAP.ZBSCASH FROM TABLE ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI:&lt;/P&gt;&lt;P&gt;(SAP is the remote database schema name and ZBSCASH is the tble name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any hint on how to solve it ?  I searched SDN and various sites but no solution yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;YB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Yves Baril on Aug 25, 2008 10:29 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Aug 2008 20:56:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369281#M1039694</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-22T20:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP internal table insert to remote Oracle database table problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369282#M1039695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yves,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please post more of your code?  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.g. are you using 'EXEC SQL ... ENDEXEC' in addition to your 'INSERT' command?  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The syntax (and error message) you've posted suggests that you're using 'open' sql in your ABAP program, and not 'native' (e.g. Oracle specific) sql syntax. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Duane&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Aug 2008 20:41:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369282#M1039695</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-25T20:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP internal table insert to remote Oracle database table problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369283#M1039696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Duane&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the source code:&lt;/P&gt;&lt;P&gt;EXEC SQL.&lt;/P&gt;&lt;P&gt;        INSERT SAP.ZBSCASH FROM   TABLE :E_T_DATA&lt;/P&gt;&lt;P&gt;  ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E_T_DATA is an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tx&lt;/P&gt;&lt;P&gt;Yves&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Aug 2008 20:55:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369283#M1039696</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-25T20:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP internal table insert to remote Oracle database table problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369284#M1039697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And a trace form ST05 shows this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT SAP.ZBSCASH FROM :A0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So :A0 can not be translated to an actual table value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Insertin in a loop with INSERT INTO ...VALUES works well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried the same code but inserting into a R3 table and it works perfect.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other Oracle DB version is 9.2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Aug 2008 21:01:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369284#M1039697</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-25T21:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP internal table insert to remote Oracle database table problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369285#M1039698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anyone watching ? I really need quick help on this.&lt;/P&gt;&lt;P&gt;Thanks for all your inputs.&lt;/P&gt;&lt;P&gt;YB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Aug 2008 13:17:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369285#M1039698</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-26T13:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP internal table insert to remote Oracle database table problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369286#M1039699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yves,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you are mixing &lt;STRONG&gt;'open'&lt;/STRONG&gt; SQL (used with database tables that are defined in the ABAP dictionary) syntax with &lt;STRONG&gt;'native'&lt;/STRONG&gt; SQL (used with SQL tables defined externally, e.g. Oracle SQL tables) syntax.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The EXEC SQL ... ENDEXEC indicates you're using 'native' SQL syntax, but the INSERT statement itself (INSERT ... FROM itab) is 'open' SQL syntax.   I do not believe that you can do an Oracle SQL INSERT from an 'internal' table.  I suggest putting your INSERT within a loop, inserting one record at a time. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps ...&lt;/P&gt;&lt;P&gt;Duane&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Aug 2008 14:00:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369286#M1039699</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-26T14:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP internal table insert to remote Oracle database table problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369287#M1039700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think you can do that.  The statement INSERT SAP.ZBSCASH FROM TABLE :E_T_DATA where :E_T_DATA is a SAP internal table is not a valid insert statement in Oracle, and, as far as I know (ie I could be wrong here) any SQL statements that you use within an EXEC....ENDEXEC must be valid Oracle SQL statements.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Oracle, bulk inserts are usually done from database table to database table ie instead of a itab you collect together all your data in a database table and do your insert from that.  Something like this might work for you.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TRY.
   EXEC SQL.
     INSERT INTO zcetest21
        (mandt, ebeln, ebelp)
     SELECT
        :sy-mandt, ebeln, ebelp
     FROM ekpo
     WHERE ebeln LIKE '0007003%'
     AND rownum &amp;lt; 10
   ENDEXEC.
   CATCH cx_sy_native_sql_error INTO ex_check_rs.
   ex_text = ex_check_rs-&amp;gt;get_text( ).
   error_text = ex_check_rs-&amp;gt;sqlmsg.
   EXIT.
ENDTRY.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Aug 2008 14:04:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369287#M1039700</guid>
      <dc:creator>christine_evans</dc:creator>
      <dc:date>2008-08-26T14:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP internal table insert to remote Oracle database table problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369288#M1039701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Duane&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using a loop and insert works well but it is far from being performing.. And my problem is that I have a window of 30 minutes to transfer over 100K records. I read in the SAP help and other forums that the table insert also works with native SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ANy more insights ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help DUane.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Aug 2008 14:05:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369288#M1039701</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-26T14:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP internal table insert to remote Oracle database table problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369289#M1039702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Christine&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me try this when our DB server will back up... and I will get back to you. Thanks a lot for your suggestion.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Aug 2008 14:15:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369289#M1039702</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-26T14:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP internal table insert to remote Oracle database table problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369290#M1039703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Christine&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ZBSCASH_TMP is the temp R3 table that I fill and SAP.ZBSCASH is the remote oracle database table in a schema named SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I put the : in front of the sub selection field names, it says that it cannot find the field name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The follwing code is executed and returns the following SQL error:&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 SAP.ZBSCASH&lt;/P&gt;&lt;P&gt;          ( SEQ,&lt;/P&gt;&lt;P&gt;           OCOMP_CODE,&lt;/P&gt;&lt;P&gt;           ZSDSTYPE,&lt;/P&gt;&lt;P&gt;           ZBILLTYPE,&lt;/P&gt;&lt;P&gt;           OAC_DOC_NO,&lt;/P&gt;&lt;P&gt;           OFISCYEAR,&lt;/P&gt;&lt;P&gt;           OFISCPER3,&lt;/P&gt;&lt;P&gt;           OAMOUNT,&lt;/P&gt;&lt;P&gt;           OCURRENCY,&lt;/P&gt;&lt;P&gt;           ODOC_TYPE,&lt;/P&gt;&lt;P&gt;           OCUSTOMER,&lt;/P&gt;&lt;P&gt;           ONAME,&lt;/P&gt;&lt;P&gt;           ONAME2,&lt;/P&gt;&lt;P&gt;           ONAME3,&lt;/P&gt;&lt;P&gt;           OCOUNTRY,&lt;/P&gt;&lt;P&gt;           ODOC_NUMBER,&lt;/P&gt;&lt;P&gt;           OS_ORD_ITEM,&lt;/P&gt;&lt;P&gt;           ZBOM_TYPE,&lt;/P&gt;&lt;P&gt;           ZMODEL,&lt;/P&gt;&lt;P&gt;           ZREL_NO,&lt;/P&gt;&lt;P&gt;           ZSERIAL,&lt;/P&gt;&lt;P&gt;           OMATERIAL,&lt;/P&gt;&lt;P&gt;           OWBS_ELEMT,&lt;/P&gt;&lt;P&gt;           OCON_TYPE,&lt;/P&gt;&lt;P&gt;           OAMOUNT,&lt;/P&gt;&lt;P&gt;           OAMOUNT_CURR,&lt;/P&gt;&lt;P&gt;           OREGION,&lt;/P&gt;&lt;P&gt;           ZREGDSCR)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;             VALUES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;               (SELECT  SEQ,&lt;/P&gt;&lt;P&gt;                        COMP_CODE,&lt;/P&gt;&lt;P&gt;                        SALES_TYPE,&lt;/P&gt;&lt;P&gt;                        BILLING_TYPE,&lt;/P&gt;&lt;P&gt;                        BILLING_DOC,&lt;/P&gt;&lt;P&gt;                        BILLING_YEAR,&lt;/P&gt;&lt;P&gt;                        BILLING_PERIOD,&lt;/P&gt;&lt;P&gt;                        NET_VALUE,&lt;/P&gt;&lt;P&gt;                        KOEI1,&lt;/P&gt;&lt;P&gt;                        SALES_ORDER_TYPE,&lt;/P&gt;&lt;P&gt;                        CUSTOMER,&lt;/P&gt;&lt;P&gt;                        NAME1,&lt;/P&gt;&lt;P&gt;                        NAME2,&lt;/P&gt;&lt;P&gt;                        COUNTRY,&lt;/P&gt;&lt;P&gt;                        COUNTRY_CODE,&lt;/P&gt;&lt;P&gt;                        SALES_DOC,&lt;/P&gt;&lt;P&gt;                        SALES_ITEM,&lt;/P&gt;&lt;P&gt;                        BOM_TYPE,&lt;/P&gt;&lt;P&gt;                        MODEL,&lt;/P&gt;&lt;P&gt;                        RELEASE_NO,&lt;/P&gt;&lt;P&gt;                        SERIAL,&lt;/P&gt;&lt;P&gt;                        MATNR,&lt;/P&gt;&lt;P&gt;                        WBS,&lt;/P&gt;&lt;P&gt;                        COND_TYPE,&lt;/P&gt;&lt;P&gt;                        AMOUNT,&lt;/P&gt;&lt;P&gt;                        AMOUNT_CURR,&lt;/P&gt;&lt;P&gt;                        REGION,&lt;/P&gt;&lt;P&gt;                        REGION_DESC FROM ZBSCASH_TMP )&lt;/P&gt;&lt;P&gt;       ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR: Database error text........: "ORA-00936: missing expression#"               &lt;/P&gt;&lt;P&gt;Triggering SQL statement...: "INSERT INTO SAP.ZBSCASH ( SEQ, OCOMP_CODE,    &lt;/P&gt;&lt;P&gt; ZSDSTYPE, ZBILLTYPE, OAC_DOC_NO, OFISCYEAR, OFISCPER3, OAMOUNT, OCURRENCY, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A traqce from ST05 outputs:&lt;/P&gt;&lt;P&gt; INSERT INTO                                                                                &lt;/P&gt;&lt;P&gt;SAP.ZBSCASH                                                                      &lt;/P&gt;&lt;P&gt;(                                                                                &lt;/P&gt;&lt;P&gt;SEQ, OCOMP_CODE, ZSDSTYPE, ZBILLTYPE, OAC_DOC_NO, OFISCYEAR, OFISCPER3,          &lt;/P&gt;&lt;P&gt;  OAMOUNT, OCURRENCY, ODOC_TYPE, OCUSTOMER, ONAME, ONAME2, ONAME3, OCOUNTRY,       &lt;/P&gt;&lt;P&gt;  ODOC_NUMBER, OS_ORD_ITEM, ZBOM_TYPE, ZMODEL, ZREL_NO, ZSERIAL, OMATERIAL,        &lt;/P&gt;&lt;P&gt;  OWBS_ELEMT, OCON_TYPE, OAMOUNT, OAMOUNT_CURR, OREGION, ZREGDSCR                  &lt;/P&gt;&lt;P&gt;)                                                                                &lt;/P&gt;&lt;P&gt;VALUES                                                                             &lt;/P&gt;&lt;P&gt;(                                                                                &lt;/P&gt;&lt;P&gt;SELECT SEQ, COMP_CODE, SALES_TYPE, BILLING_TYPE, BILLING_DOC, BILLING_YEAR,      &lt;/P&gt;&lt;P&gt;  BILLING_PERIOD, NET_VALUE, KOEI1, SALES_ORDER_TYPE, CUSTOMER, NAME1, NAME2,      &lt;/P&gt;&lt;P&gt;  COUNTRY, COUNTRY_CODE, SALES_DOC, SALES_ITEM, BOM_TYPE, MODEL, RELEASE_NO,       &lt;/P&gt;&lt;P&gt;  SERIAL, MATNR, WBS, COND_TYPE, AMOUNT, AMOUNT_CURR, REGION, REGION_DESC FROM     &lt;/P&gt;&lt;P&gt;  ZBSCASH_TMP                                                                      &lt;/P&gt;&lt;P&gt;)                                                                                &lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Aug 2008 18:14:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369290#M1039703</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-26T18:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP internal table insert to remote Oracle database table problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369291#M1039704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to select your values from table ZBSCASH_TMP (as I did in my example) and not use the VALUES keyword; you only use VALUES if you already have a set of variables that you want to insert into the table so then you don't use the SELECT....FROM.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You prefix a fieldname with : only if it is a variable.  Here what you are doing is selecting fields directly from one database table and inserting directly into another database table - no variables involved - so you need to specify the exact table fieldname (which presumably doesn't start with a colon).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 09:11:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369291#M1039704</guid>
      <dc:creator>christine_evans</dc:creator>
      <dc:date>2008-08-27T09:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP internal table insert to remote Oracle database table problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369292#M1039705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Christine&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Forgot to telly ou yesterday I tried different variant of your example and copied the last one ( which was not the one you told me to do in your example). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the error I got originally with your code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Database error text........: "ORA-00957: duplicate column name#"            &lt;/P&gt;&lt;P&gt;riggering SQL statement...: "INSERT INTO SAP.ZBSCASH ( SEQ, OCOMP_CODE,    &lt;/P&gt;&lt;P&gt;ZSDSTYPE, ZBILLTYPE, OAC_DOC_NO, OFISCYEAR, OFISCPER3, OAMOUNT, OCURRENCY, &lt;/P&gt;&lt;P&gt;ODOC_TYPE, OCUSTOMER, ONAME, ONAME2, ONAME3, OCOUNTRY, ODOC_NUMBER,        &lt;/P&gt;&lt;P&gt;OS_ORD_ITEM, ZBOM_TYPE, ZMODEL, ZREL_NO, ZSERIAL, OMATERIAL, OWBS_ELE      &lt;/P&gt;&lt;P&gt;nternal call code.........: "[DBDS/NEW DSQL]"                              &lt;/P&gt;&lt;P&gt;&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 SAP.ZBSCASH&lt;/P&gt;&lt;P&gt;          (SEQ,&lt;/P&gt;&lt;P&gt;           OCOMP_CODE,&lt;/P&gt;&lt;P&gt;           ZSDSTYPE,&lt;/P&gt;&lt;P&gt;           ZBILLTYPE,&lt;/P&gt;&lt;P&gt;           OAC_DOC_NO,&lt;/P&gt;&lt;P&gt;           OFISCYEAR,&lt;/P&gt;&lt;P&gt;           OFISCPER3,&lt;/P&gt;&lt;P&gt;           OAMOUNT,&lt;/P&gt;&lt;P&gt;           OCURRENCY,&lt;/P&gt;&lt;P&gt;           ODOC_TYPE,&lt;/P&gt;&lt;P&gt;           OCUSTOMER,&lt;/P&gt;&lt;P&gt;           ONAME,&lt;/P&gt;&lt;P&gt;           ONAME2,&lt;/P&gt;&lt;P&gt;           ONAME3,&lt;/P&gt;&lt;P&gt;           OCOUNTRY,&lt;/P&gt;&lt;P&gt;           ODOC_NUMBER,&lt;/P&gt;&lt;P&gt;           OS_ORD_ITEM,&lt;/P&gt;&lt;P&gt;           ZBOM_TYPE,&lt;/P&gt;&lt;P&gt;           ZMODEL,&lt;/P&gt;&lt;P&gt;           ZREL_NO,&lt;/P&gt;&lt;P&gt;           ZSERIAL,&lt;/P&gt;&lt;P&gt;           OMATERIAL,&lt;/P&gt;&lt;P&gt;           OWBS_ELEMT,&lt;/P&gt;&lt;P&gt;           OCON_TYPE,&lt;/P&gt;&lt;P&gt;           OAMOUNT,&lt;/P&gt;&lt;P&gt;           OAMOUNT_CURR,&lt;/P&gt;&lt;P&gt;           OREGION,&lt;/P&gt;&lt;P&gt;           ZREGDSCR)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              SELECT  SEQ,&lt;/P&gt;&lt;P&gt;                        COMP_CODE,&lt;/P&gt;&lt;P&gt;                        SALES_TYPE,&lt;/P&gt;&lt;P&gt;                        BILLING_TYPE,&lt;/P&gt;&lt;P&gt;                        BILLING_DOC,&lt;/P&gt;&lt;P&gt;                        BILLING_YEAR,&lt;/P&gt;&lt;P&gt;                        BILLING_PERIOD,&lt;/P&gt;&lt;P&gt;                        NET_VALUE,&lt;/P&gt;&lt;P&gt;                        KOEI1,&lt;/P&gt;&lt;P&gt;                        SALES_ORDER_TYPE,&lt;/P&gt;&lt;P&gt;                        CUSTOMER,&lt;/P&gt;&lt;P&gt;                        NAME1,&lt;/P&gt;&lt;P&gt;                        NAME2,&lt;/P&gt;&lt;P&gt;                        COUNTRY,&lt;/P&gt;&lt;P&gt;                        COUNTRY_CODE,&lt;/P&gt;&lt;P&gt;                        SALES_DOC,&lt;/P&gt;&lt;P&gt;                        SALES_ITEM,&lt;/P&gt;&lt;P&gt;                        BOM_TYPE,&lt;/P&gt;&lt;P&gt;                        MODEL,&lt;/P&gt;&lt;P&gt;                        RELEASE_NO,&lt;/P&gt;&lt;P&gt;                        SERIAL,&lt;/P&gt;&lt;P&gt;                        MATNR,&lt;/P&gt;&lt;P&gt;                        WBS,&lt;/P&gt;&lt;P&gt;                        COND_TYPE,&lt;/P&gt;&lt;P&gt;                        AMOUNT,&lt;/P&gt;&lt;P&gt;                        AMOUNT_CURR,&lt;/P&gt;&lt;P&gt;                        REGION,&lt;/P&gt;&lt;P&gt;                        REGION_DESC FROM ZBSCASH_TMP&lt;/P&gt;&lt;P&gt;       ENDEXEC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ANd the external database layout:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE TABLE zbscash&lt;/P&gt;&lt;P&gt;    (seq                            NUMBER(15,2),&lt;/P&gt;&lt;P&gt;    ocomp_code                     VARCHAR2(4),&lt;/P&gt;&lt;P&gt;    zsdstype                       VARCHAR2(2),&lt;/P&gt;&lt;P&gt;    zbilltype                      VARCHAR2(4),&lt;/P&gt;&lt;P&gt;    oac_doc_no                     VARCHAR2(10),&lt;/P&gt;&lt;P&gt;    ofiscyear                      NUMBER(4,0),&lt;/P&gt;&lt;P&gt;    ofiscper3                      NUMBER(2,0),&lt;/P&gt;&lt;P&gt;    net_value                      NUMBER(15,2),&lt;/P&gt;&lt;P&gt;    koei1                          VARCHAR2(5),&lt;/P&gt;&lt;P&gt;    odoc_type                      VARCHAR2(4),&lt;/P&gt;&lt;P&gt;    ocustomer                      VARCHAR2(10),&lt;/P&gt;&lt;P&gt;    oname                          VARCHAR2(35),&lt;/P&gt;&lt;P&gt;    oname2                         VARCHAR2(35),&lt;/P&gt;&lt;P&gt;    oname3                         VARCHAR2(15),&lt;/P&gt;&lt;P&gt;    ocountry                       VARCHAR2(3),&lt;/P&gt;&lt;P&gt;    odoc_number                    VARCHAR2(10),&lt;/P&gt;&lt;P&gt;    os_ord_item                    VARCHAR2(6),&lt;/P&gt;&lt;P&gt;    zbom_type                      VARCHAR2(1),&lt;/P&gt;&lt;P&gt;    zmodel                         VARCHAR2(8),&lt;/P&gt;&lt;P&gt;    zrel_no                        VARCHAR2(20),&lt;/P&gt;&lt;P&gt;    zserial                        VARCHAR2(35),&lt;/P&gt;&lt;P&gt;    omaterial                      VARCHAR2(18),&lt;/P&gt;&lt;P&gt;    owbs_elemt                     VARCHAR2(24),&lt;/P&gt;&lt;P&gt;    ocon_type                      VARCHAR2(4),&lt;/P&gt;&lt;P&gt;    oamount                        NUMBER(15,2),&lt;/P&gt;&lt;P&gt;    ocurrency                      VARCHAR2(5),&lt;/P&gt;&lt;P&gt;    oregion                        VARCHAR2(3),&lt;/P&gt;&lt;P&gt;    zregdscr                       VARCHAR2(20))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 15:02:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369292#M1039705</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-27T15:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP internal table insert to remote Oracle database table problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369293#M1039706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok.  Read the error message and it will tell you exactly what is wrong. One of your field names is listed twice and this is not allowed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way, when posting code it will make it much more readable if you include in within code tags.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 15:18:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369293#M1039706</guid>
      <dc:creator>christine_evans</dc:creator>
      <dc:date>2008-08-27T15:18:57Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP internal table insert to remote Oracle database table problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369294#M1039707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Christine&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unless I am blind, I don't see the duplicate field name. ANd this is what I've been trying to fix yesterday via different means. I've also renamed  SEQ to SEQNUM in the insert statement and changed the external DB accordingly and it still gives me this error. I am lost...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 15:31:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369294#M1039707</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-27T15:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP internal table insert to remote Oracle database table problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369295#M1039708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look more carefully.  Or do what I did and copy the fieldnames into a spreadsheet and sort it.  OAMOUNT is specified twice in the fieldlist.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 15:47:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369295#M1039708</guid>
      <dc:creator>christine_evans</dc:creator>
      <dc:date>2008-08-27T15:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP internal table insert to remote Oracle database table problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369296#M1039709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Christine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know what to say... I was blind....and tired of looking at the code I guess.. Too many bad copy and paste to try things.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the message I get is that it does not find the table name.&lt;/P&gt;&lt;P&gt;I suspect it is the R3 database table. Do you know how (or a tcode) I can find the schema name for a  table ? We have very limited database admin privileges .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 17:31:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369296#M1039709</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-27T17:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP internal table insert to remote Oracle database table problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369297#M1039710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you were maintaining the remote table successfully when you were using a LOOP, as you say in your first post, then you must be accessing the remote table correctly.  If you are filling your temp R/3 table successfully before you call this bit of code, then you must be accessing the local table correctly.  Put them both together.....and it should work.  What is the Oracle error code and message that you are getting?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm starting to think that perhaps you should go back to your original method of updating the remote table record by record in a LOOP, which you say was working. Even if you get this direct table-to-table update to work, there is no guarantee (there is never any guarantee) that it will be much quicker, especially over a remote link.  I've not done this sort of thing in SAP before, but I've previously used DBLINK to link two Oracle databases and just the existence of the remote connection seemed sometimes to affect access paths for the worse.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2008 09:35:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369297#M1039710</guid>
      <dc:creator>christine_evans</dc:creator>
      <dc:date>2008-08-28T09:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP internal table insert to remote Oracle database table problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369298#M1039711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Christine&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help. You have been very kind in trying to help me solve the problem. Indeed I can not spend more time on this. I will revert back to the loop insert. Very slow but no choice. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a good day.&lt;/P&gt;&lt;P&gt;YB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2008 12:55:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-internal-table-insert-to-remote-oracle-database-table-problem/m-p/4369298#M1039711</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-28T12:55:52Z</dc:date>
    </item>
  </channel>
</rss>

