<?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: Finding Duplicates Records in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/finding-duplicates-records/m-p/6661033#M1446282</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you already have data in itab1 from standard table then check something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Sort itab by f1.
Loop at itab.
Delete adjacent duplicates from itab comparing f1.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Mar 2010 06:44:40 GMT</pubDate>
    <dc:creator>GauthamV</dc:creator>
    <dc:date>2010-03-03T06:44:40Z</dc:date>
    <item>
      <title>Finding Duplicates Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/finding-duplicates-records/m-p/6661031#M1446280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have a scenario i got one internal table itab1 with 3 fields f1,f2,f3 and i am fetching some data from a standard table.Now i want to loop through the table itab1-f1 and see if there is any duplicate entries.How can this be done.I want some logic which is efficient.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: ravi r on Mar 3, 2010 7:34 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Mar 2010 06:33:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/finding-duplicates-records/m-p/6661031#M1446280</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-03T06:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: Finding Duplicates Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/finding-duplicates-records/m-p/6661032#M1446281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello ravi r ,&lt;/P&gt;&lt;P&gt;Your can very well use contror break for the itab for itab-f1 and  write the logic in same  u can use CNT(itab-F1) for counting the duplicates Chek for F1 help...!&lt;/P&gt;&lt;P&gt;AT END.&lt;/P&gt;&lt;P&gt;ENDAT.&lt;/P&gt;&lt;P&gt;in your loop.&lt;/P&gt;&lt;P&gt;or the  other way is Sort and Loop ...use binary search ..Use parell Cursor  for effeciency...!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Anup Deshmukh on Mar 3, 2010 7:43 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Mar 2010 06:42:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/finding-duplicates-records/m-p/6661032#M1446281</guid>
      <dc:creator>anup_deshmukh4</dc:creator>
      <dc:date>2010-03-03T06:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: Finding Duplicates Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/finding-duplicates-records/m-p/6661033#M1446282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you already have data in itab1 from standard table then check something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Sort itab by f1.
Loop at itab.
Delete adjacent duplicates from itab comparing f1.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Mar 2010 06:44:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/finding-duplicates-records/m-p/6661033#M1446282</guid>
      <dc:creator>GauthamV</dc:creator>
      <dc:date>2010-03-03T06:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: Finding Duplicates Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/finding-duplicates-records/m-p/6661034#M1446283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check example cnt will give you the number of duplicates count&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
NODES: spfli, sflight. 

FIELD-GROUPS: header, flight_info, flight_date. 

START-OF-SELECTION. 
  INSERT: spfli-carrid spfli-connid sflight-fldate 
            INTO header, 
          spfli-cityfrom spfli-cityto 
            INTO flight_info. 

GET spfli. 
  EXTRACT flight_info. 

GET sflight. 
  EXTRACT flight_date. 

END-OF-SELECTION. 
  SORT STABLE. 
  LOOP. 
    AT FIRST. 
      WRITE / 'Flight list'. 
      ULINE. 
    ENDAT. 
    AT flight_info WITH flight_date. 
      WRITE: / spfli-carrid , spfli-connid, sflight-fldate, 
               spfli-cityfrom, spfli-cityto. 
    ENDAT. 
    AT flight_date. 
      WRITE: / spfli-carrid , spfli-connid, sflight-fldate. 
    ENDAT. 
    AT LAST. 
      ULINE. 
      WRITE: cnt(spfli-carrid), 'Airlines'. 
      ULINE. 
    ENDAT. 
  ENDLOOP. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Anup Deshmukh on Mar 3, 2010 7:46 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Mar 2010 06:46:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/finding-duplicates-records/m-p/6661034#M1446283</guid>
      <dc:creator>anup_deshmukh4</dc:creator>
      <dc:date>2010-03-03T06:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: Finding Duplicates Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/finding-duplicates-records/m-p/6661035#M1446284</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;Use the following logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SORT itab ASCENDING BY f1.

LOOP AT itab.
MOVE SY-INDEX to indx.
indx = indx + 1.
READ itab into wa_temp with index indx.
IF itab-f1 eq wa_temp-f1.
   duplicate.
ELSE.
   process your logic.
ENDIF.
CLEAR indx.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shankar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Mar 2010 06:47:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/finding-duplicates-records/m-p/6661035#M1446284</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-03T06:47:07Z</dc:date>
    </item>
  </channel>
</rss>

