<?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: SAPSQL_ARRAY_INSERT_DUPREC during DB insert. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapsql-array-insert-duprec-during-db-insert/m-p/3045116#M720797</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;What are the key fields of the table? Are you using a loop and single INSERTs or are you INSERTing from a table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Joerg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Oct 2007 09:46:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-29T09:46:30Z</dc:date>
    <item>
      <title>SAPSQL_ARRAY_INSERT_DUPREC during DB insert.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapsql-array-insert-duprec-during-db-insert/m-p/3045115#M720796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey, &lt;/P&gt;&lt;P&gt;    I get the following short dump when i try to insert into DSO DDACVMAP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Runtime Errors         SAPSQL_ARRAY_INSERT_DUPREC&lt;/P&gt;&lt;P&gt;Except.                CX_SY_OPEN_SQL_DB. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have checked that the target table into which i am inserting is empty and also made sure that each record is unique. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can this be a problem with the target table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 09:43:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapsql-array-insert-duprec-during-db-insert/m-p/3045115#M720796</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T09:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAPSQL_ARRAY_INSERT_DUPREC during DB insert.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapsql-array-insert-duprec-during-db-insert/m-p/3045116#M720797</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;What are the key fields of the table? Are you using a loop and single INSERTs or are you INSERTing from a table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Joerg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 09:46:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapsql-array-insert-duprec-during-db-insert/m-p/3045116#M720797</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T09:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: SAPSQL_ARRAY_INSERT_DUPREC during DB insert.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapsql-array-insert-duprec-during-db-insert/m-p/3045117#M720798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The key fields of the target table are guid - unique identifier &lt;/P&gt;&lt;P&gt;                                                     date - created date &lt;/P&gt;&lt;P&gt;                                                     time - created time. &lt;/P&gt;&lt;P&gt;The Guid is 22 chars long and is always unique, the time and date were added as pre-caution. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once i process the data, i insert it directly from the internal table. &lt;/P&gt;&lt;P&gt;INSERT db_tab FROM int_tab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 09:55:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapsql-array-insert-duprec-during-db-insert/m-p/3045117#M720798</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T09:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: SAPSQL_ARRAY_INSERT_DUPREC during DB insert.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapsql-array-insert-duprec-during-db-insert/m-p/3045118#M720799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i think you are trying to insert the int table data into dbtable then correct syntax is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;insert dbtab from table itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use addition accepting duplicate keys to avoid the duplication error but it will just avoid the error not adding any duplicate key field record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;insert dbtab from table itab accepting duplicate keys .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and one more thing again check the key fields are repeating or not ? and int table must be same structure as dbtable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 10:11:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapsql-array-insert-duprec-during-db-insert/m-p/3045118#M720799</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T10:11:20Z</dc:date>
    </item>
    <item>
      <title>Re: SAPSQL_ARRAY_INSERT_DUPREC during DB insert.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapsql-array-insert-duprec-during-db-insert/m-p/3045119#M720800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Shiba, &lt;/P&gt;&lt;P&gt;                i have used the addition ACCEPTING DUPLICATE KEYS for the time being, but i cannot afford to use it as a solution, and yeah that was a typo, i am using the syntax insert dbtab from table itab.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;E. g: INSERT /BIC/ADDACVMAP00 FROM TABLE g_t_target ACCEPTING DUPLICATE KEYS. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one more strange thing is that if i try to insert the same records (the ones in the internal table) one at a time i don't get this dump, however if it is more than one record that i am trying to insert i get this error, although they are no way similar..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Josh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 10:22:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapsql-array-insert-duprec-during-db-insert/m-p/3045119#M720800</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T10:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: SAPSQL_ARRAY_INSERT_DUPREC during DB insert.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapsql-array-insert-duprec-during-db-insert/m-p/3045120#M720801</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;Strange thing. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just for debugging purposes: Yould you sort the internal table by the key fields and use DELETE ADJACENT DUPLICATES from this table and just check whether some of the rows disappear?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One more thing: Don't you have a MANDT key field for the client? Could there be a problem with that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Joerg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 10:27:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapsql-array-insert-duprec-during-db-insert/m-p/3045120#M720801</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T10:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: SAPSQL_ARRAY_INSERT_DUPREC during DB insert.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapsql-array-insert-duprec-during-db-insert/m-p/3045121#M720802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joerg, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yeah this is damn strange. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just to check why this happens, i entered the values of the key fields myself,  in debug mode, however I get the same short dump. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This a DSO in BW and i guess that's why it is client independent.&lt;/P&gt;&lt;P&gt;Actually this DSO had recently been modified, an extra non-key field was added and is now active. i have declared the internal table in the program of TYPE db table, so i guess there shouldn't be any problem, right ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could there be anything that i am missing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Josh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 10:38:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapsql-array-insert-duprec-during-db-insert/m-p/3045121#M720802</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T10:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAPSQL_ARRAY_INSERT_DUPREC during DB insert.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapsql-array-insert-duprec-during-db-insert/m-p/3045122#M720803</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;TYPE dbtable does not include the key fields, you have to do that manually like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE dbtable WITH UNIQUE KEY ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(don't recall the exact syntax - please check in online help). If you declare the key EXACTLY as in the table, the first INSERT of a duplicate into your INTERNAL table should produce a dump - maybe this would help debugging...?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Joerg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 10:45:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapsql-array-insert-duprec-during-db-insert/m-p/3045122#M720803</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T10:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: SAPSQL_ARRAY_INSERT_DUPREC during DB insert.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapsql-array-insert-duprec-during-db-insert/m-p/3045123#M720804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try sorting your internal table by your database keys and then describing it to get the number of lines. Then delete adjacent duplicates comparing your key fields. Finally, describe the table again to get the final number of lines. If there is any difference, it means that there &amp;lt;b&amp;gt;were&amp;lt;/b&amp;gt; duplicate keys. In any event, you should be able to insert now with no problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 13:35:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapsql-array-insert-duprec-during-db-insert/m-p/3045123#M720804</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T13:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: SAPSQL_ARRAY_INSERT_DUPREC during DB insert.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapsql-array-insert-duprec-during-db-insert/m-p/3045124#M720805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob, &lt;/P&gt;&lt;P&gt;    I am quite sure that the records being inserted are not duplicate, (I tried inserting only 3 records and made sure that they were not duplicate), another thing is that the target table is also empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached the piece of code that i am using to insert to the database&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : l_count TYPE i.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Find the number of records being processed.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  DESCRIBE TABLE g_t_target LINES l_count.&lt;/P&gt;&lt;P&gt;  IF l_count &amp;gt; 0.&lt;/P&gt;&lt;P&gt;    SORT g_t_target BY /bic/dguid&lt;/P&gt;&lt;P&gt;                       rstt_mdate&lt;/P&gt;&lt;P&gt;                       rstt_mtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Delete the duplicate records from the target table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    DELETE ADJACENT DUPLICATES&lt;/P&gt;&lt;P&gt;           FROM g_t_target&lt;/P&gt;&lt;P&gt;           COMPARING /bic/dguid&lt;/P&gt;&lt;P&gt;                     rstt_mdate&lt;/P&gt;&lt;P&gt;                     rstt_mtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To insert records in table based on target table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    INSERT /bic/addacvmap00 FROM TABLE g_t_target ACCEPTING DUPLICATE KEYS.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;A message is displayed to check the records in the table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A funny observation is that the database table allows only one entry, the next record to be inserted throws a duplicate error although it is not duplicate. This lead me to think that some how the keys of the table aren't acting as they are supposed to. ( The table had been modified recently, after which i have been facing this problem) could it be that some properties/ attributes of the table are forcing it to behave in the way it is now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or am i still missing something. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Josh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 04:19:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapsql-array-insert-duprec-during-db-insert/m-p/3045124#M720805</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T04:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: SAPSQL_ARRAY_INSERT_DUPREC during DB insert.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapsql-array-insert-duprec-during-db-insert/m-p/3045125#M720806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Joshua..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the keyfields of ur DB Table once. They may not be defined properly.&lt;/P&gt;&lt;P&gt;And use this statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT db_tab FROM int_tab &amp;lt;b&amp;gt;ACCEPTING DUPLICATES KEYS&amp;lt;/b&amp;gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The addition ACCEPTING DUPLICATES KEYS is always needed to avoid the Runtime error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;reward if Helpful.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 04:32:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapsql-array-insert-duprec-during-db-insert/m-p/3045125#M720806</guid>
      <dc:creator>varma_narayana</dc:creator>
      <dc:date>2007-10-30T04:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAPSQL_ARRAY_INSERT_DUPREC during DB insert.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapsql-array-insert-duprec-during-db-insert/m-p/3045126#M720807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joshua!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the table has been updated recently and you are experiencing the problem since then, I would investigate a bit further in this direction...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;What is the status of the table? Is it active / inactive / something in between?&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Do you need to re-generate the table using the db tool?&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Are there any secondary keys defined to be unique that might be causing trouble?&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Can you insert entries manually, using e. g. transaction SE16N with &amp;amp;SAP_EDIT?&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Joerg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 08:02:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapsql-array-insert-duprec-during-db-insert/m-p/3045126#M720807</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T08:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: SAPSQL_ARRAY_INSERT_DUPREC during DB insert.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sapsql-array-insert-duprec-during-db-insert/m-p/3045127#M720808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Joerg, &lt;/P&gt;&lt;P&gt;       The table change was not activated although it was being displayed as active in SE11. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the suggestions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Josh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2007 09:33:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sapsql-array-insert-duprec-during-db-insert/m-p/3045127#M720808</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-30T09:33:52Z</dc:date>
    </item>
  </channel>
</rss>

