<?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: Insert statement   Acepting duplicate Keys ??? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statement-acepting-duplicate-keys/m-p/7231308#M1524897</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sagar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using "Accepting duplicate keys" will only set the sy-subrc = 4 when you try to insert duplicate records into the DB table from an internal table so that we can handle this exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Aug 2010 10:51:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-08-20T10:51:50Z</dc:date>
    <item>
      <title>Insert statement   Acepting duplicate Keys ???</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statement-acepting-duplicate-keys/m-p/7231304#M1524893</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;i am updating a ztable    ZMM_PRIMO_DUPERR  from itab I_DPAIR .&lt;/P&gt;&lt;P&gt;in my ztable there is a field PROCESSING_DATE which is the only primary key .&lt;/P&gt;&lt;P&gt;and in my itab i have 2 records on the same processing date .  i mean for a particular key, Duplicate record exists in I_DPAIR .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to update both records into the ztable.so i write the below code,but its not working, Its only inserting the first record ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how this below syntax works ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT ZMM_PRIMO_DUPERR FROM TABLE I_DPAIR ACCEPTING DUPLICATE KEYS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please share your thoughts ..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Aug 2010 10:29:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statement-acepting-duplicate-keys/m-p/7231304#M1524893</guid>
      <dc:creator>NR_Ranasingh</dc:creator>
      <dc:date>2010-08-20T10:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Insert statement   Acepting duplicate Keys ???</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statement-acepting-duplicate-keys/m-p/7231305#M1524894</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;As you said its not inserting 2 similar records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would never insert 2 records with same primary key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise what's the use of primary key.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Aug 2010 10:37:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statement-acepting-duplicate-keys/m-p/7231305#M1524894</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-20T10:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: Insert statement   Acepting duplicate Keys ???</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statement-acepting-duplicate-keys/m-p/7231306#M1524895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes you are true ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But wht is the use of ACCEPTING DUPLIACTE KEYS  ??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Aug 2010 10:42:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statement-acepting-duplicate-keys/m-p/7231306#M1524895</guid>
      <dc:creator>NR_Ranasingh</dc:creator>
      <dc:date>2010-08-20T10:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: Insert statement   Acepting duplicate Keys ???</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statement-acepting-duplicate-keys/m-p/7231307#M1524896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you have to redesign you DB table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Aug 2010 10:42:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statement-acepting-duplicate-keys/m-p/7231307#M1524896</guid>
      <dc:creator>Sandeep_Panghal</dc:creator>
      <dc:date>2010-08-20T10:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: Insert statement   Acepting duplicate Keys ???</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statement-acepting-duplicate-keys/m-p/7231308#M1524897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sagar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using "Accepting duplicate keys" will only set the sy-subrc = 4 when you try to insert duplicate records into the DB table from an internal table so that we can handle this exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Aug 2010 10:51:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statement-acepting-duplicate-keys/m-p/7231308#M1524897</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-20T10:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Insert statement   Acepting duplicate Keys ???</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statement-acepting-duplicate-keys/m-p/7231309#M1524898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Nagraj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so you mean , the syntax is only to avoid sortdump , but it wont add any dupliacte records .?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Aug 2010 10:52:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statement-acepting-duplicate-keys/m-p/7231309#M1524898</guid>
      <dc:creator>NR_Ranasingh</dc:creator>
      <dc:date>2010-08-20T10:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: Insert statement   Acepting duplicate Keys ???</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statement-acepting-duplicate-keys/m-p/7231310#M1524899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes thats correct. In this case all the unique records will be inserted and the duplicates will be rejected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Aug 2010 10:55:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statement-acepting-duplicate-keys/m-p/7231310#M1524899</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-20T10:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Insert statement   Acepting duplicate Keys ???</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statement-acepting-duplicate-keys/m-p/7231311#M1524900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; ACCEPTING DUBLICATE ENTRIES is to avoid the dump.It wont add duplicate entries in the database table.If you don't use the keyword ACCEPTING DUBLICATE ENTRIES, you will get a dump.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Aug 2010 11:07:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statement-acepting-duplicate-keys/m-p/7231311#M1524900</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-20T11:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: Insert statement   Acepting duplicate Keys ???</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statement-acepting-duplicate-keys/m-p/7231312#M1524901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In case of doubt, read the Abap documentation first [FROM TABLE itab [ACCEPTING DUPLICATE KEYS]|http://help.sap.com/abapdocu_70/en/ABAPINSERT_SOURCE.htm#&amp;amp;ABAP_ALTERNATIVE_2@2@] or via F1, it is cleary written.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(SQL basic : A Primary Key Constraint is an extension of [Unique Key|http://en.wikipedia.org/wiki/Primary_key] Constraint with the addition of a Not Null Constraint)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Aug 2010 11:07:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statement-acepting-duplicate-keys/m-p/7231312#M1524901</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2010-08-20T11:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: Insert statement   Acepting duplicate Keys ???</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statement-acepting-duplicate-keys/m-p/7231313#M1524902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then what is the exact purpose of primary key ?&lt;/P&gt;&lt;P&gt;you have to create one more primary key which together uniquley identifies a record.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Aug 2010 11:10:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statement-acepting-duplicate-keys/m-p/7231313#M1524902</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-08-20T11:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: Insert statement   Acepting duplicate Keys ???</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statement-acepting-duplicate-keys/m-p/7231314#M1524903</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;Just CHeck this Documentation from SAP :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... ACCEPTING DUPLICATE KEYS &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;If a line cannot be inserted, the system does not&lt;/P&gt;&lt;P&gt;terminate with a runtime error but only sets the return value SY-SUBRC to 4. All other lines are inserted after the command is executed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e. so as to just avoid the dump we can use this syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But we cannot insert duplicate records in a table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ways if you have to insert duplicate you have to change your primary key's and table design.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Aug 2010 11:29:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statement-acepting-duplicate-keys/m-p/7231314#M1524903</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-20T11:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Insert statement   Acepting duplicate Keys ???</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statement-acepting-duplicate-keys/m-p/7231315#M1524904</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;Yes now i am clear.. Thanks to all for their valuable tips ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to redesign the DB table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks to all&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Aug 2010 04:43:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/insert-statement-acepting-duplicate-keys/m-p/7231315#M1524904</guid>
      <dc:creator>NR_Ranasingh</dc:creator>
      <dc:date>2010-08-23T04:43:43Z</dc:date>
    </item>
  </channel>
</rss>

