<?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 inserting records into database table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-records-into-database-table/m-p/3877383#M931998</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                i want to know is there any possibility to insert records into a database table with duplicate primary keys.i.e records having same primary key values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Jun 2008 07:54:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-04T07:54:54Z</dc:date>
    <item>
      <title>inserting records into database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-records-into-database-table/m-p/3877383#M931998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                i want to know is there any possibility to insert records into a database table with duplicate primary keys.i.e records having same primary key values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2008 07:54:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-records-into-database-table/m-p/3877383#M931998</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-04T07:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: inserting records into database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-records-into-database-table/m-p/3877384#M931999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it can be done from ABAP report with addition 'accepting duplicate keys'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inserting Several Lines&lt;/P&gt;&lt;P&gt;To insert several lines into a database table, use the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT target FROM TABLE itab [ACCEPTING DUPLICATE KEYS].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This writes all lines of the internal table itabto the database table in one single operation. If one or more lines cannot be inserted because the database already contains a line with the same primary key, a runtime error occurs. You can prevent the runtime error occurring by using the addition ACCEPTING DUPLICATE KEYS. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whenever you want to insert more than one line into a database table, it is more efficient to work with an internal table than to insert the lines one by one.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2008 08:07:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-records-into-database-table/m-p/3877384#M931999</guid>
      <dc:creator>Sm1tje</dc:creator>
      <dc:date>2008-06-04T08:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: inserting records into database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-records-into-database-table/m-p/3877385#M932000</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;U can use accepting duplicate keys with your insert statement.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2008 08:13:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-records-into-database-table/m-p/3877385#M932000</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-04T08:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: inserting records into database table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-records-into-database-table/m-p/3877386#M932001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please be more precise, It is absolutely impossible to insert duplicate keys into a database table!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you can insert from an internal table which can have duplicate keys into a database table in an efficient way wuithout getting short-dumps.&lt;/P&gt;&lt;P&gt;This is the method with the 'accepting duplicate keys'. It is o.k., if there are not many or nearly no duplicates. It is not recommended if every second record is in fact a duplicate record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess in most cases it is better, to use either 'DELETE ADJACENT DUPLICATES' or a 'COLLECT' to get rid of the duplicates. You must decide first, how you want to proceed with the duplicates, is it irrelevant which record is inserted, would you like to have a sumed up record, or do you have a condition which should be taken?  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siegfried&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2008 08:20:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inserting-records-into-database-table/m-p/3877386#M932001</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-04T08:20:01Z</dc:date>
    </item>
  </channel>
</rss>

