<?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: delete duplicates in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-duplicates/m-p/391607#M9671</link>
    <description>&lt;P&gt;You need to first sort the result (t_tab) into the order you want (so your "duplicates" line up) and then call the "delete adjacent" on them.&lt;/P&gt;</description>
    <pubDate>Wed, 18 Jan 2017 12:43:19 GMT</pubDate>
    <dc:creator>ChrisSolomon</dc:creator>
    <dc:date>2017-01-18T12:43:19Z</dc:date>
    <item>
      <title>delete duplicates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-duplicates/m-p/391606#M9670</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;I need to delete duplicates, my code is&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT k~ebeln
 k~lifnr
 k~bedat k~bsart
 p~werks p~lgort p~adrnr
 a~name1 a~name2 a~city1 a~post_code1
 a~street a~house_num1 a~country
 FROM ekko AS k
 JOIN ekpo AS p
 ON k~ebeln EQ p~ebeln
 JOIN adrc AS a
 ON p~adrnr EQ a~addrnumber
 INTO CORRESPONDING FIELDS OF TABLE t_tab
 WHERE k~bsart IN s_bsart
 AND k~lifnr IN s_lifnr
 AND k~bedat IN s_bedat.

DELETE ADJACENT DUPLICATES FROM t_tab 
 COMPARING name1 street house_num1 post_code1 city1 country.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I want to have all duplicates deleted if the comparing fields are same but EBELN should be ignored, I only need to show 1 EBELN , 1 WERKS and 1 LIFNR. LGORT is normally empty.&lt;/P&gt;&lt;P&gt;like this example, only line 1 should be showed:&lt;/P&gt;&lt;P&gt;ebeln lifnr werks lgort name1 name2 street no city country&lt;BR /&gt;123    555  001   space test1   test2    street1  XX  DE&lt;BR /&gt;124    555  001   space test1 test2    street1    XX DE&lt;BR /&gt;125    555  001  space  test1 test2   street1    XX  DE&lt;/P&gt;&lt;P&gt;The "delete adjacent duplicates"-statement deletes records where also ebeln has duplicates. Is there a possibility to ignore ebeln or may I select one ebeln with those compared fields for 1 row. They only want to see our plants adresses and the vendor but the ebeln only once as "reference value" &lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2017 12:39:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-duplicates/m-p/391606#M9670</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-01-18T12:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: delete duplicates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-duplicates/m-p/391607#M9671</link>
      <description>&lt;P&gt;You need to first sort the result (t_tab) into the order you want (so your "duplicates" line up) and then call the "delete adjacent" on them.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2017 12:43:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-duplicates/m-p/391607#M9671</guid>
      <dc:creator>ChrisSolomon</dc:creator>
      <dc:date>2017-01-18T12:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: delete duplicates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-duplicates/m-p/391608#M9672</link>
      <description>&lt;P&gt;so I have&lt;/P&gt;&lt;P&gt;SORT t_tab BY lifnr werks lgort ASCENDING.&lt;/P&gt;&lt;P&gt;this might be the fault &lt;span class="lia-unicode-emoji" title=":face_with_open_mouth:"&gt;😮&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2017 12:48:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-duplicates/m-p/391608#M9672</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-01-18T12:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: delete duplicates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-duplicates/m-p/391609#M9673</link>
      <description>&lt;P&gt;thank you! that was a bad mistake I did &lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2017 14:19:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-duplicates/m-p/391609#M9673</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-01-18T14:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: delete duplicates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-duplicates/m-p/391610#M9674</link>
      <description>&lt;P&gt;Not "bad"....you just missed it....happens to all of us....comes with being a developer....can I tell you how many times I misspelled a keyword or left off a period or comma somewhere? Oh no....I NEVER do that. haha&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2017 14:45:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-duplicates/m-p/391610#M9674</guid>
      <dc:creator>ChrisSolomon</dc:creator>
      <dc:date>2017-01-18T14:45:43Z</dc:date>
    </item>
  </channel>
</rss>

