<?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: Using: Delete Adjacent Duplicates in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-delete-adjacent-duplicates/m-p/820076#M42642</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raja,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that we can specify the fieldname dynamically. But there is a limitation I am facing. I have more that 1 field that are to be compared at one moment...somewhat like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMPARING (K1 K2 K3)...now the system throws a dump when i try to generate this COMPARING clause by concatinating the elements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So How can we use the Delete Adjacent Duplicate when there are more that one comparison Characteristics at are to be made at the same time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to use a table and pass that in the COMPARINg clause. It doesnot throw a dump but also the duplicates are not deleted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arunava&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arunava&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 28 Aug 2004 11:38:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2004-08-28T11:38:38Z</dc:date>
    <item>
      <title>Using: Delete Adjacent Duplicates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-delete-adjacent-duplicates/m-p/820074#M42640</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;How can we use Delete Adjacent Duplicates where comparing clause is dynamic. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The the number of comparison characteristics are dependent on some other conditions and are decided at runtime. Also can this be used with Field-Symbols.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arunava&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Aug 2004 10:07:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-delete-adjacent-duplicates/m-p/820074#M42640</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-08-28T10:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using: Delete Adjacent Duplicates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-delete-adjacent-duplicates/m-p/820075#M42641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arunava,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following were taken from ABAP key word documentation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. The DELETE ADJACENT DUPLICATES statement works particularly well if you have sorted the internal table itab according to the fields that you want to compare when looking for duplicates. In this case, deleting adjacent duplicates is the same as deleting all duplicates. The direction of the sort is irrelevant. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. &amp;lt;b&amp;gt;If you do not know a comparison expression until runtime, you can specify it dynamically as the contents of the field name in the expression COMPARING ... (name) .... If name is empty at runtime, the comparison expression is ignored. If name contains an invalid component name, a runtime error occurs.&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. You can further restrict comparison expressions - both static and dynamic - by specifying offset and length. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Aug 2004 11:18:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-delete-adjacent-duplicates/m-p/820075#M42641</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2004-08-28T11:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using: Delete Adjacent Duplicates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-delete-adjacent-duplicates/m-p/820076#M42642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Raja,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that we can specify the fieldname dynamically. But there is a limitation I am facing. I have more that 1 field that are to be compared at one moment...somewhat like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMPARING (K1 K2 K3)...now the system throws a dump when i try to generate this COMPARING clause by concatinating the elements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So How can we use the Delete Adjacent Duplicate when there are more that one comparison Characteristics at are to be made at the same time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to use a table and pass that in the COMPARINg clause. It doesnot throw a dump but also the duplicates are not deleted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arunava&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arunava&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Aug 2004 11:38:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-delete-adjacent-duplicates/m-p/820076#M42642</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-08-28T11:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using: Delete Adjacent Duplicates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-delete-adjacent-duplicates/m-p/820077#M42643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arunava?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at the sample code below , i think you are looking for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT  Y_TEST_DELETE                           .

tables: csks .

data: itab like csks occurs 0 with header line .

data: name1(40) ,
      name2(40) .

start-of-selection .
clear: itab, name1 , name2 .
refresh itab .

move: 'KOSTL' to name1 ,
      'BUKRS' to name2 .

select * from csks into table itab where kostl eq '0000353540' .

delete adjacent duplicates from itab comparing (name1) (name2) .

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Aug 2004 12:36:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-delete-adjacent-duplicates/m-p/820077#M42643</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2004-08-28T12:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Using: Delete Adjacent Duplicates</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-delete-adjacent-duplicates/m-p/820078#M42644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arunava,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can put the maximum number of fields (That is possible) in the comparing clause.If at run time there is no value in that then it will not take any value and will not be considered. if some value then it will be taken in to consideration at run time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Aug 2004 13:41:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-delete-adjacent-duplicates/m-p/820078#M42644</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-08-28T13:41:58Z</dc:date>
    </item>
  </channel>
</rss>

