<?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 overcome Dump during Insert Command in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-overcome-dump-during-insert-command/m-p/4191885#M1002026</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rahul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Insert FROM TABLE itab [ACCEPTING DUPLICATE KEYS]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;If you specify an internal table itab, several rows are created from its content for insertion in the database table. A row for insertion into the table is taken from each row of the internal table according to the same rules as for a single work area Einfügenwa. The line type of the internal table has to meet the prerequisites for use in Open-SQL statements. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If a row witht he same primary key or a same unique secondary index does not already exist in the database table for any of the rows to be inserted, all rows are inserted and sy-subrc is set to 0. If the internal table is empty, sy-subrc is also set to 0. The system field sy-dbcnt is always set to the number of rows that were actually inserted. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If a row with the same primary key or a same unique secondary index already exists in the database table for one or more of the rows to be inserted, these rows cannot be inserted. In this situation, there are three possibilities: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use of ACCEPTING DUPLICATE KEYS &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the addition ACCEPTING DUPLICATE KEYS is specified, all rows are inserted for which this is possible. The remaining rows are rejected and sy-subrc is set to 4. The system field sy-dbcnt is set to the number of lines that are inserted. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Handling an exception &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the addition ACCEPTING DUPLICATE KEYS is not specified, a treatable exception occurs CX_SY_OPEN_SQL_DB (it always occurs since Release 6.10). Rows are inserted until the exception occurs. The number of rows that are inserted is not defined. The system fields sy-subrc and sy-dbcnt retain their previous value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Runtime error &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the addition ACCEPTING DUPLICATE KEYS is not specified and if the exception is not handled, then a runtime error occurs (it always occurs prior to Release 6.10). This executes a database rollback that reverses all changes to the current database LUW. This applies in particular to rows that were inserted before a double entry occurred. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i would also suggest you to see SAP help by pressing F1 because some time may we miss but SAP never.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Jul 2008 08:32:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-28T08:32:08Z</dc:date>
    <item>
      <title>How to overcome Dump during Insert Command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-overcome-dump-during-insert-command/m-p/4191882#M1002023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abappers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I am trying to upload the text file into the Database,&lt;/P&gt;&lt;P&gt;I am using Insert command using internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the record exist, it gives dump saying duplicate records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to convert that dump into the error message?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2008 08:29:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-overcome-dump-during-insert-command/m-p/4191882#M1002023</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-28T08:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to overcome Dump during Insert Command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-overcome-dump-during-insert-command/m-p/4191883#M1002024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;use the sy-subrc = 0. .&lt;/P&gt;&lt;P&gt;check initial whether the record exists int he table with key fields matchinf if ...yes check&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;then &amp;lt;do nothing&amp;gt;&lt;/P&gt;&lt;P&gt;if ne 0 then insert.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2008 08:31:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-overcome-dump-during-insert-command/m-p/4191883#M1002024</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-28T08:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to overcome Dump during Insert Command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-overcome-dump-during-insert-command/m-p/4191884#M1002025</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;try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF SY-SUBRC ne 0

  YOUR ERROR MESSAGE.

ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anirban&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2008 08:31:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-overcome-dump-during-insert-command/m-p/4191884#M1002025</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-28T08:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to overcome Dump during Insert Command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-overcome-dump-during-insert-command/m-p/4191885#M1002026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rahul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Insert FROM TABLE itab [ACCEPTING DUPLICATE KEYS]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;If you specify an internal table itab, several rows are created from its content for insertion in the database table. A row for insertion into the table is taken from each row of the internal table according to the same rules as for a single work area Einfügenwa. The line type of the internal table has to meet the prerequisites for use in Open-SQL statements. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If a row witht he same primary key or a same unique secondary index does not already exist in the database table for any of the rows to be inserted, all rows are inserted and sy-subrc is set to 0. If the internal table is empty, sy-subrc is also set to 0. The system field sy-dbcnt is always set to the number of rows that were actually inserted. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If a row with the same primary key or a same unique secondary index already exists in the database table for one or more of the rows to be inserted, these rows cannot be inserted. In this situation, there are three possibilities: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use of ACCEPTING DUPLICATE KEYS &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the addition ACCEPTING DUPLICATE KEYS is specified, all rows are inserted for which this is possible. The remaining rows are rejected and sy-subrc is set to 4. The system field sy-dbcnt is set to the number of lines that are inserted. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Handling an exception &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the addition ACCEPTING DUPLICATE KEYS is not specified, a treatable exception occurs CX_SY_OPEN_SQL_DB (it always occurs since Release 6.10). Rows are inserted until the exception occurs. The number of rows that are inserted is not defined. The system fields sy-subrc and sy-dbcnt retain their previous value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Runtime error &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the addition ACCEPTING DUPLICATE KEYS is not specified and if the exception is not handled, then a runtime error occurs (it always occurs prior to Release 6.10). This executes a database rollback that reverses all changes to the current database LUW. This applies in particular to rows that were inserted before a double entry occurred. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i would also suggest you to see SAP help by pressing F1 because some time may we miss but SAP never.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2008 08:32:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-overcome-dump-during-insert-command/m-p/4191885#M1002026</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-28T08:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to overcome Dump during Insert Command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-overcome-dump-during-insert-command/m-p/4191886#M1002027</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;Always use system field sy-subrc while using insert&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Abhijeet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2008 08:32:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-overcome-dump-during-insert-command/m-p/4191886#M1002027</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-28T08:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to overcome Dump during Insert Command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-overcome-dump-during-insert-command/m-p/4191887#M1002028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You better use the MODIFY instead of INSERT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Modify will create the record if it not there, or else it will modify the existing one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or you want only insert then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use the addition  ACCEPTING DUPLICATE KEYS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FROM TABLE itab [ACCEPTING DUPLICATE KEYS]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2008 08:34:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-overcome-dump-during-insert-command/m-p/4191887#M1002028</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-28T08:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to overcome Dump during Insert Command</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-overcome-dump-during-insert-command/m-p/4191888#M1002029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2008 14:16:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-overcome-dump-during-insert-command/m-p/4191888#M1002029</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-29T14:16:43Z</dc:date>
    </item>
  </channel>
</rss>

