<?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: ITAB_DUPLICATE_KEY in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304918#M1726592</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;the piece of code you posted was absolutely correct.. i think the problem is with the &lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px; background-color: #ffffff;"&gt;LI_DATA&lt;/SPAN&gt; internal table.. may be you should delete the duplicates entries from that IT&amp;nbsp; by &lt;STRONG&gt;SORT&lt;/STRONG&gt; and &lt;STRONG&gt;DELETE ADJACENT DUPLICATES ENTRIES&lt;/STRONG&gt; and try use this code.. it ll work fine i think..&lt;/P&gt;&lt;P&gt;you can remove &lt;STRONG&gt;into corresponding&lt;/STRONG&gt; from this code, cause it ll reduce your code performance.. anyway removing this wont help you to solve your issue.. but try to avoid it while coding..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Mathan R.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Feb 2013 04:34:34 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2013-02-27T04:34:34Z</dc:date>
    <item>
      <title>ITAB_DUPLICATE_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304912#M1726586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are getting a "ITAB duplicate key" error in a DataSource enhancement for BW that selects data from table MBEW into a hash table.&amp;nbsp; The internal table has the same fields as the key of the table.&amp;nbsp; I don't understand how we could be getting ITAB_DUPLICATE_KEY error when the where clause on the select statement has the key of the table.&amp;nbsp; Is this a buffering issue?&amp;nbsp; Here's a subset of the important code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #0433ff;"&gt;TYPES&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #942193;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #0433ff;"&gt;BEGIN OF &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;TY_MBEW&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #942193;"&gt;,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;EM style="color: #929292; font-family: 'Courier New'; text-align: -webkit-auto;"&gt;"Material Valuation&lt;/EM&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MATNR &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #0433ff;"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;MBEW&lt;/SPAN&gt;&lt;SPAN style="color: #929292; font-family: 'Courier New'; text-align: -webkit-auto;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;MATNR&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #942193;"&gt;,&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;EM style="color: #929292; font-family: 'Courier New'; text-align: -webkit-auto;"&gt;"Material Number&lt;/EM&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BWKEY &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #0433ff;"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;MBEW&lt;/SPAN&gt;&lt;SPAN style="color: #929292; font-family: 'Courier New'; text-align: -webkit-auto;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;BWKEY&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #942193;"&gt;,&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;EM style="color: #929292; font-family: 'Courier New'; text-align: -webkit-auto;"&gt;"Valuation Area&lt;/EM&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BWTAR&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #0433ff;"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;MBEW&lt;/SPAN&gt;&lt;SPAN style="color: #929292; font-family: 'Courier New'; text-align: -webkit-auto;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;BWTAR&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #942193;"&gt;,&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;EM style="color: #929292; font-family: 'Courier New'; text-align: -webkit-auto;"&gt;"Valuation Type&lt;/EM&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STPRS &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #0433ff;"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;MBEW&lt;/SPAN&gt;&lt;SPAN style="color: #929292; font-family: 'Courier New'; text-align: -webkit-auto;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;STPRS&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #942193;"&gt;,&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;EM style="color: #929292; font-family: 'Courier New'; text-align: -webkit-auto;"&gt;"Standard Price&lt;/EM&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PEINH &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #0433ff;"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;MBEW&lt;/SPAN&gt;&lt;SPAN style="color: #929292; font-family: 'Courier New'; text-align: -webkit-auto;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;PEINH&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #942193;"&gt;,&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;EM style="color: #929292; font-family: 'Courier New'; text-align: -webkit-auto;"&gt;"Price Unit&lt;/EM&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VERPR &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #0433ff;"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;MBEW&lt;/SPAN&gt;&lt;SPAN style="color: #929292; font-family: 'Courier New'; text-align: -webkit-auto;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;VERPR&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #942193;"&gt;,&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;EM style="color: #929292; font-family: 'Courier New'; text-align: -webkit-auto;"&gt;"Moving Average Price/Periodic Unit Price&lt;/EM&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VPRSV &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #0433ff;"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;MBEW&lt;/SPAN&gt;&lt;SPAN style="color: #929292; font-family: 'Courier New'; text-align: -webkit-auto;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;VPRSV&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #942193;"&gt;,&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;EM style="color: #929292; font-family: 'Courier New'; text-align: -webkit-auto;"&gt;"Price Control Indicator&lt;/EM&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #0433ff;"&gt;END OF &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;TY_MBEW&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #942193;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #0433ff;"&gt;DATA&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #942193;"&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IT_MBEW_HSH &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #0433ff;"&gt;TYPE HASHED TABLE OF &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;TY_MBEW&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #0433ff;"&gt;WITH UNIQUE KEY &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;MATNR BWKEY BWTAR&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #942193;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #0433ff;"&gt;SELECT &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;MATNR&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BWKEY&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BWTAR&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STPRS&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PEINH&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VERPR&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;EM style="color: #929292; font-family: 'Courier New'; text-align: -webkit-auto;"&gt;"Moving Average Price/Periodic Unit Price&lt;/EM&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VPRSV&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;EM style="color: #929292; font-family: 'Courier New'; text-align: -webkit-auto;"&gt;"Price Control Indicator&lt;/EM&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #0433ff;"&gt;FROM &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;MBEW&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #0433ff;"&gt;INTO &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;CORRESPONDING &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #0433ff;"&gt;FIELDS OF TABLE &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;it_mbew_hsh&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #0433ff;"&gt;FOR ALL &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;ENTRIES &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #0433ff;"&gt;IN &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;LI_DATA&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #0433ff;"&gt;WHERE &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;MATNR &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #942193;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;LI_DATA&lt;/SPAN&gt;&lt;SPAN style="color: #929292; font-family: 'Courier New'; text-align: -webkit-auto;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;MATNR &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #0433ff;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BWKEY &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #942193;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;LI_DATA&lt;/SPAN&gt;&lt;SPAN style="color: #929292; font-family: 'Courier New'; text-align: -webkit-auto;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;WERKS &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #0433ff;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BWTAR &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #942193;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #5cb120;"&gt;''&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #942193;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; text-align: -webkit-auto; color: #942193;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 18:50:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304912#M1726586</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-02-26T18:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: ITAB_DUPLICATE_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304913#M1726587</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;When you use for all entries in the select statement u should not use the table in the into clause as Hashed table instead use the standard table along with where clause with all primary key fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vineesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 19:35:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304913#M1726587</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-02-26T19:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: ITAB_DUPLICATE_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304914#M1726588</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;&lt;/P&gt;&lt;P&gt;It seems problem lies in LI_DATA content. Indeed you have table key properly stated in your WHERE clause once it's MBEW full key but for sure LI_DATA is not following same key and, at FOR ALL ENTRIES, it's retrieving more than one line for same entry in MBEW, check it's content.&lt;/P&gt;&lt;P&gt;What you could do is, once LI_DATA seems to be supposed to follow same MATNR/BWKEY/BWTAR key do a SORT + DELETE ADJACENT DUPLICATES by this key over LI_DATA first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Edgar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 20:03:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304914#M1726588</guid>
      <dc:creator>edgar_nagasaki</dc:creator>
      <dc:date>2013-02-26T20:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: ITAB_DUPLICATE_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304915#M1726589</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;&lt;/P&gt;&lt;P&gt;Did you sort and delete adjacent duplicate from LI_DATA?&amp;nbsp; If not I would try doing this.&amp;nbsp; With the for all entries It may be selecting the same record twice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 20:18:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304915#M1726589</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-02-26T20:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: ITAB_DUPLICATE_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304916#M1726590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;That sounds strange.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; - Please confirm: do you get that error during the execution of that SELECT statement?&lt;/P&gt;&lt;P&gt;-&amp;nbsp; Are there duplicate entries in LI_DATA? Does i still happen if you remove them&amp;gt;&lt;/P&gt;&lt;P&gt;-&amp;nbsp; Does it still happen if you use a STANDARD table instead of a HASHED table? (It shouldn't make any difference, but still)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 22:52:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304916#M1726590</guid>
      <dc:creator>paul_bakker2</dc:creator>
      <dc:date>2013-02-26T22:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: ITAB_DUPLICATE_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304917#M1726591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;FOR ALL ENTRIES does not work that way.&amp;nbsp; Any duplicates in LI_DATA are ignored.&amp;nbsp; From SAP help (&lt;A href="http://help.sap.com/saphelp_nw73/helpdata/en/fc/eb3a1f358411d1829f0000e829fbfe/frameset.htm" title="http://help.sap.com/saphelp_nw73/helpdata/en/fc/eb3a1f358411d1829f0000e829fbfe/frameset.htm"&gt;http://help.sap.com/saphelp_nw73/helpdata/en/fc/eb3a1f358411d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL style="list-style-type: upper-alpha;"&gt;&lt;LI&gt;&lt;EM style=": ; font-size: 13px; padding: 0px 0px 1px;"&gt;SELECT... &lt;SPAN style="padding: 0px 0px 1px; font-size: 13px;"&gt;FOR ALL ENTRIES IN itab WHERE cond&lt;/SPAN&gt;...&lt;/EM&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P style="margin-top: 9px; margin-bottom: 9px; color: #333333; font-family: arial, sans-serif; text-align: -webkit-auto; background-color: #ffffff;"&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN lang="DE" style="padding: 0px 0px 1px; font-size: 13px;"&gt;cond&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="DE" style="padding: 0px 0px 1px; font-size: 13px;"&gt; may be formulated as described above. If you specify a field of the internal table &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="DE" style="padding: 0px 0px 1px; font-size: 13px;"&gt;itab&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="DE" style="padding: 0px 0px 1px; font-size: 13px;"&gt; as an operand in a condition, you address all lines of the internal table. The comparison is then performed for each line of the internal table. For each line, the system selects the lines from the database table that satisfy the condition. The result set of the &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN lang="DE" style="padding: 0px 0px 1px; font-size: 13px;"&gt;SELECT&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN lang="DE" style="padding: 0px 0px 1px; font-size: 13px;"&gt; statement is the union of the individual selections for each line of the internal table. Duplicate lines are automatically eliminated from the result set. &lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="margin-top: 9px; margin-bottom: 9px; color: #333333; font-family: arial, sans-serif; text-align: -webkit-auto; background-color: #ffffff;"&gt;Also, Vineesh mentioned that I shouldn't use the hash in the into.&amp;nbsp; I can't see how that is an issue.&amp;nbsp; We are selecting UNIQUE records from MBEW to put into a hash table. I could throw them in a standard table first and then get rid of dupes and move to the hash, but the select can not return duplicate rows.&amp;nbsp; If the hash table has the same key as MBEW, then the&amp;nbsp; ITAB_DUPLICATE_KEY error is breaking the law, so to speak. &lt;/P&gt;&lt;P style="margin-top: 9px; margin-bottom: 9px; color: #333333; font-family: arial, sans-serif; text-align: -webkit-auto; background-color: #ffffff;"&gt;&lt;SPAN lang="DE" style="padding: 0px 0px 1px; font-size: 13px;"&gt;Something else must be going on here. Crazy&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-top: 9px; margin-bottom: 9px; color: #333333; font-family: arial, sans-serif; text-align: -webkit-auto; background-color: #ffffff;"&gt;Cheers,&lt;/P&gt;&lt;P style="margin-top: 9px; margin-bottom: 9px; color: #333333; font-family: arial, sans-serif; text-align: -webkit-auto; background-color: #ffffff;"&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 23:39:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304917#M1726591</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-02-26T23:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: ITAB_DUPLICATE_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304918#M1726592</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;the piece of code you posted was absolutely correct.. i think the problem is with the &lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px; background-color: #ffffff;"&gt;LI_DATA&lt;/SPAN&gt; internal table.. may be you should delete the duplicates entries from that IT&amp;nbsp; by &lt;STRONG&gt;SORT&lt;/STRONG&gt; and &lt;STRONG&gt;DELETE ADJACENT DUPLICATES ENTRIES&lt;/STRONG&gt; and try use this code.. it ll work fine i think..&lt;/P&gt;&lt;P&gt;you can remove &lt;STRONG&gt;into corresponding&lt;/STRONG&gt; from this code, cause it ll reduce your code performance.. anyway removing this wont help you to solve your issue.. but try to avoid it while coding..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Mathan R.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 04:34:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304918#M1726592</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-02-27T04:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: ITAB_DUPLICATE_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304919#M1726593</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;&lt;/P&gt;&lt;P&gt;Just a thought. Are there any entries that have blank MATNR or WERKS in the LI_DATA table? &lt;/P&gt;&lt;P&gt;Ideally MATNR shouldn't be blank but if these are dummy entries you never know. Since BWTAR is already blank, maybe there are entries where Material is the same, Plant is blank and BWTAR is blank or Material is blank, Plant is the same and BWTAR is blank. These can also cause duplicate entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you can sort the table LI_DATA by MATNR WERKS&lt;/P&gt;&lt;P&gt;Delete adjacent duplicates comparing MATNR WERKS&lt;/P&gt;&lt;P&gt;Delete LI_DATA where MATNR = space. or WERKS = space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then you may try. Hope this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 04:54:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304919#M1726593</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-02-27T04:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: ITAB_DUPLICATE_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304920#M1726594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hashed table wont allow duplicate keys use standard table or sorted table with out unique key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Ramu Velaga.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 05:27:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304920#M1726594</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-02-27T05:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: ITAB_DUPLICATE_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304921#M1726595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not really... if you have doubled entries in your FOR ALL ENTRIES table it will bring more than one match from other table... I do understand your point but that's the way it works. &lt;SPAN __jive_emoticon_name="wink" __jive_macro_name="emoticon" class="jive_macro jive_macro_emoticon jive_emote" src="https://community.sap.com/1214/images/emoticons/wink.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 05:33:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304921#M1726595</guid>
      <dc:creator>edgar_nagasaki</dc:creator>
      <dc:date>2013-02-27T05:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: ITAB_DUPLICATE_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304922#M1726596</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;Better use &lt;STRONG&gt;sort&lt;/STRONG&gt; and &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Delete adjacent duplicates entries comparing&lt;/STRONG&gt; &lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px; background-color: #ffffff;"&gt;MATNR &lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px; background-color: #ffffff;"&gt;BWKEY &lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 12px; background-color: #ffffff;"&gt;BWTAR.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12px; background-color: #ffffff; font-family: 'Courier New';"&gt;(i mean all the three fields) .. hence all the fields are primary key fields of MBEW.. so duplicates is not at all possible..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12px; background-color: #ffffff; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12px; background-color: #ffffff; font-family: 'Courier New';"&gt;or else try to change the hash table into standard table.. May be it ll work.. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12px; background-color: #ffffff; font-family: 'Courier New';"&gt;this wasnt a correct solution for this issue.. but give a try.. it may work..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12px; background-color: #ffffff; font-family: 'Courier New';"&gt;thanks, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12px; background-color: #ffffff; font-family: 'Courier New';"&gt;Mathan R.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 05:50:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304922#M1726596</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-02-27T05:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: ITAB_DUPLICATE_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304923#M1726597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;if the duplicate is still appearing use delete adjacent duplicates from itab.&lt;/P&gt;&lt;P&gt;hope it helps,&lt;/P&gt;&lt;P&gt;Vinoth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 05:57:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304923#M1726597</guid>
      <dc:creator>vinoth_aruldass</dc:creator>
      <dc:date>2013-02-27T05:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: ITAB_DUPLICATE_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304924#M1726598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am facing smilar issue.If you were able to resolve this,Please let me know the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Haritha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Aug 2013 19:14:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304924#M1726598</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-08-29T19:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: ITAB_DUPLICATE_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304925#M1726599</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;You can change the code as following and solve the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;DATA&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;IT_MBEW_HSH &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;STANDARD &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TABLE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;TY_MBEW&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;But if you have to know the reason for this error please insert a break point after select statement and execute the program.(After change the code.). then find the duplicate entry and try to view data it in se11.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Regards,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Prasad&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2013 13:47:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304925#M1726599</guid>
      <dc:creator>P1389307362</dc:creator>
      <dc:date>2013-09-02T13:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: ITAB_DUPLICATE_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304926#M1726600</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;You can also change the &lt;SPAN class="L0S52"&gt;TYPE &lt;SPAN class="L0S52"&gt;HASHED &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TABLE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF to &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;STANDARD &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TABLE.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;But if you have to know the reason for this error please insert a break point after select statement and execute the program.(After change the code.). then find the duplicate entry and try to view data it in se11.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Regards,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Prasad&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2013 13:49:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304926#M1726600</guid>
      <dc:creator>P1389307362</dc:creator>
      <dc:date>2013-09-02T13:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: ITAB_DUPLICATE_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304927#M1726601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;It is a good practice from performance point of view also, to use sort + Delete Adjascent Duplicates comparing fields&amp;nbsp; in case of large data in tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case also,&amp;nbsp; use sort LI_DATA by matnr werks.&lt;/P&gt;&lt;P&gt;Delete adjascent Duplicates from LI_DATA comparing matnr werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sumit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2013 14:04:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304927#M1726601</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-09-02T14:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: ITAB_DUPLICATE_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304928#M1726602</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;Check there is any duplicate values, to avoid this make the unique key field as like database table. I.E. if suppose the field is not an key field in database table try to avoid in internal table also. or use like &lt;A _jive_internal="true" href="https://answers.sap.com/people/sumit.sharma1989" style="font-weight: bold; font-size: 11px; background-color: #ffffff; color: #8b8b8b; text-decoration: underline !important;"&gt;Sumit Sharma &lt;/A&gt;said.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2013 14:51:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304928#M1726602</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-09-02T14:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: ITAB_DUPLICATE_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304929#M1726603</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 tried changing it as Type standard Table.&lt;/P&gt;&lt;P&gt;But I get a syntax error saying OBJVERS is not correctly defined.&lt;/P&gt;&lt;P&gt;My internal table is POSITION table with PERNR,OBJVERS,DATETO as key fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Haritha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 22:51:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304929#M1726603</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-09-04T22:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: ITAB_DUPLICATE_KEY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304930#M1726604</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;OBJVERS is not a valid data type. use RSOBJVERS insted.&lt;/P&gt;&lt;P&gt;in table declaration/type declaration change the code like this &lt;STRONG&gt;OBJVERS TYPE RSOBJVERS&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Prasad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2013 11:11:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/itab-duplicate-key/m-p/9304930#M1726604</guid>
      <dc:creator>P1389307362</dc:creator>
      <dc:date>2013-09-05T11:11:17Z</dc:date>
    </item>
  </channel>
</rss>

