<?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: SAP Query Remove Duplicate Records in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388474#M1841402</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In order to compile your code you'll need to use "dynamic" references to get the sort and "delete adjacent duplicates" to work - here's a simple example where two copies of the T001 table are loaded into GT_T001, and the subroutine "logic" then eliminates:the duplicates (note: replace the { } brackets shown with the usual field-symbol angle brackets) :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;report zlocal_jc_dynamic_sort_del. data:&amp;nbsp;&amp;nbsp; gt_t001&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type standard table of t001. start-of-selection.&amp;nbsp;&amp;nbsp; select * into table gt_t001&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from t001.&amp;nbsp;&amp;nbsp; select * appending table gt_t001&amp;nbsp; "create some dupes&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from t001.&amp;nbsp;&amp;nbsp; perform logic. *&amp;amp;---------------------------------------------------------------------* *&amp;amp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Form&amp;nbsp; logic *&amp;amp;---------------------------------------------------------------------* form logic.&amp;nbsp;&amp;nbsp; field-symbols:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {lfst_table}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type any table.&amp;nbsp;&amp;nbsp; assign ('GT_T001') to {lfst_table}.&amp;nbsp;&amp;nbsp; describe table {lfst_table}.&amp;nbsp;&amp;nbsp; write: / 'Lines =', sy-tfill.&amp;nbsp;&amp;nbsp; sort {lfst_table} by ('BUTXT').&amp;nbsp;&amp;nbsp; delete adjacent duplicates from {lfst_table} comparing ('BUTXT').&amp;nbsp;&amp;nbsp; describe table {lfst_table}.&amp;nbsp;&amp;nbsp; write: / 'Lines =', sy-tfill. endform.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "logic &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 25 May 2014 23:43:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2014-05-25T23:43:26Z</dc:date>
    <item>
      <title>SAP Query Remove Duplicate Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388454#M1841382</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 have query which has a number of duplicate records and I have tried to remove them using the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Record processing of infoset:&lt;/P&gt;&lt;P&gt;================================ &lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;ASSIGN &lt;SPAN class="L0S55"&gt;(&lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'%dtab[]'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;) &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;&amp;lt;dtab&amp;gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;DELETE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;ADJACENT &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;DUPLICATES &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;FROM &lt;/SPAN&gt;&amp;lt;dtab&amp;gt; &lt;SPAN class="L0S52"&gt;comparing &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;all &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;fields&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;==========================================================&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Before I added the above I had 3 identical records, now I have only got 2 but I only want 1 record showing therefore I assume I need a LOOP statement? how should I adjust the above code to include the LOOP statement to check all the records in the dtab table?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;thanks&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Joe&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 20:37:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388454#M1841382</guid>
      <dc:creator>former_member355038</dc:creator>
      <dc:date>2014-05-22T20:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query Remove Duplicate Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388455#M1841383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Were there other records in dbtab other than the three duplicates records?&amp;nbsp; If so, you might need to include a "sort dbtab." before the "delete adjacent.." to ensure the three rows are next to each other... also check that every column of those three rows match - if not, you can "delete adjacent ... comparing x y z" to compare the key values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 03:24:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388455#M1841383</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-05-23T03:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query Remove Duplicate Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388456#M1841384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 08:47:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388456#M1841384</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-05-23T08:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query Remove Duplicate Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388457#M1841385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I have now changed the code to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;============&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;ASSIGN &lt;SPAN class="L0S55"&gt;(&lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'%dtab[]'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;) &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;&amp;lt;dtab&amp;gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;sort &lt;/SPAN&gt;&amp;lt;dtab&amp;gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;DELETE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;ADJACENT &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;DUPLICATES &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;FROM &lt;/SPAN&gt;&amp;lt;dtab&amp;gt; &lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;comparing &lt;/SPAN&gt;qmnum&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;=====================&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;But Iwhen saving the codeI get the message:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;The specified type has no structure and therefore no component called "QMNUM". component called "QMNUM".&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;I want to compare the field QMNUM in dtab and only return 1 record when there are multiple records.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;thanks for your help&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Joe&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 09:24:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388457#M1841385</guid>
      <dc:creator>former_member355038</dc:creator>
      <dc:date>2014-05-23T09:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query Remove Duplicate Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388458#M1841386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joe,&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;Your&amp;nbsp; '&lt;EM&gt;Delete Adjacent duplicates .... comparing all fields'&amp;nbsp; &lt;/EM&gt;syntax was removing only one record instead of 2 out of 3 lines.... this can be most probably due to the rest of the 2 lines are having atleast one field value not equal. (Hope you've understood).&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;EM&gt; &lt;/EM&gt;I suggest you to try the &lt;EM&gt;&lt;STRONG&gt;CHECK &lt;/STRONG&gt;&lt;/EM&gt;syntax. For this you need to identify the fields which have different values and identify the value which you desire. For example the field is &lt;STRONG&gt;&lt;EM&gt;ABCKZ,&amp;nbsp; &lt;/EM&gt;&lt;/STRONG&gt;then give this line in the &lt;STRONG&gt;&lt;EM&gt;Record Processing&lt;/EM&gt;&lt;/STRONG&gt; section.&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;STRONG&gt;&lt;EM&gt;CHECK VIQMEL-ABCKZ = 'A' .&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;(Assuming that you've used VIQMEL table)&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Jogeswara Rao K&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 13:27:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388458#M1841386</guid>
      <dc:creator>jogeswararao_kavala</dc:creator>
      <dc:date>2014-05-23T13:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query Remove Duplicate Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388459#M1841387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I understand 1 field is different to the other 2 therefore I want to use a COMPARE statement to delete the records based on QMNUM field(same in all 3 rows):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;============&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;ASSIGN &lt;SPAN class="L0S55"&gt;(&lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'%dtab[]'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;) &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;&amp;lt;dtab&amp;gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;sort &lt;/SPAN&gt;&amp;lt;dtab&amp;gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;DELETE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;ADJACENT &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;DUPLICATES &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;FROM &lt;/SPAN&gt;&amp;lt;dtab&amp;gt; &lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;comparing &lt;/SPAN&gt;qmnum&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;=====================&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;But I when saving the code I get the message:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;The specified type has no structure and therefore no component called "QMNUM". component called "QMNUM".&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Do I have to do something with the data definition?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;thanks&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Joe&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 13:54:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388459#M1841387</guid>
      <dc:creator>former_member355038</dc:creator>
      <dc:date>2014-05-23T13:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query Remove Duplicate Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388460#M1841388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May try with &lt;EM&gt;&lt;STRONG&gt;Comparing &amp;lt;dtab&amp;gt;-QMNUM&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 14:26:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388460#M1841388</guid>
      <dc:creator>jogeswararao_kavala</dc:creator>
      <dc:date>2014-05-23T14:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query Remove Duplicate Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388461#M1841389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Di you declare your table with header line?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 14:31:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388461#M1841389</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-05-23T14:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query Remove Duplicate Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388462#M1841390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do I declare the table with a header line?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 14:49:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388462#M1841390</guid>
      <dc:creator>former_member355038</dc:creator>
      <dc:date>2014-05-23T14:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query Remove Duplicate Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388463#M1841391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I checked the records and the query is deleting all duplicates apart for the last record, so for example I have 10 records and 5 are duplicates the query removes 4 but always leaves the last one, is there a LOOP statement that needs to go in there? current code is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;ASSIGN &lt;SPAN class="L0S55"&gt;(&lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'%dtab[]'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;) &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;&amp;lt;dtab&amp;gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;sort &lt;/SPAN&gt;&amp;lt;dtab&amp;gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;DELETE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;ADJACENT &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;DUPLICATES &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;FROM &lt;/SPAN&gt;&amp;lt;dtab&amp;gt; &lt;SPAN class="L0S52"&gt;comparing &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;all &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;fields&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 14:54:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388463#M1841391</guid>
      <dc:creator>former_member355038</dc:creator>
      <dc:date>2014-05-23T14:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query Remove Duplicate Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388464#M1841392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you&amp;nbsp; know the fields that probably are the same,&amp;nbsp; don't you? so try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT itab by [ASCENDING/DESCENDING] FLD1 [ASCENDING/DESCENDING] FLD2.&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATES FROM itab comparing FLD1 FLD2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 15:03:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388464#M1841392</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-05-23T15:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query Remove Duplicate Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388465#M1841393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Sort &amp;lt;dtab&amp;gt; by &amp;lt;dtab&amp;gt;-qmnum.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 15:04:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388465#M1841393</guid>
      <dc:creator>jogeswararao_kavala</dc:creator>
      <dc:date>2014-05-23T15:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query Remove Duplicate Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388466#M1841394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tried &lt;EM&gt;&lt;STRONG&gt;Sort &amp;lt;dtab&amp;gt; by &amp;lt;dtab&amp;gt;-qmnum. &lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Get the following:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&amp;lt;DTAB&amp;gt;" is a table without a header line and therefore has no component called "QMNUM".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 15:23:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388466#M1841394</guid>
      <dc:creator>former_member355038</dc:creator>
      <dc:date>2014-05-23T15:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query Remove Duplicate Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388467#M1841395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you declare your internal table with &lt;SPAN class="L0S52"&gt;WITH &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;HEADER &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;LINE&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab TYPE STANDARD TABLE OF typetable WITH HEADER LINE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 15:28:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388467#M1841395</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-05-23T15:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query Remove Duplicate Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388468#M1841396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, I have following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;FIELD-SYMBOLS &amp;lt;dtab&amp;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 class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 15:33:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388468#M1841396</guid>
      <dc:creator>former_member355038</dc:creator>
      <dc:date>2014-05-23T15:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query Remove Duplicate Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388469#M1841397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;add to the sentence the following. WITH HEADER LINE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 15:35:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388469#M1841397</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-05-23T15:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query Remove Duplicate Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388470#M1841398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried to change it to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;FIELD-SYMBOLS &amp;lt;dtab&amp;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 class="L0S52"&gt;WITH &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;HEADER &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;LINE&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;But I get the message:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;"." expected after "TABLE"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt; and when I add the "." I get the message:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;The statement "WITH" is not designated.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 15:58:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388470#M1841398</guid>
      <dc:creator>former_member355038</dc:creator>
      <dc:date>2014-05-23T15:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query Remove Duplicate Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388471#M1841399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;don't you have a type for your table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of type1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; campo1(10),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; campo2 type i,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end of type1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab type standard table of type1 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want to assing it to a field-symbol would be as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field-symbols: &amp;lt;dtab&amp;gt; like itab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 16:07:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388471#M1841399</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-05-23T16:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query Remove Duplicate Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388472#M1841400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using SQ02 to add code to the infoset, when I check the query via SE38, the following code exists:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;data %dtab &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;/1BCDWB/IQ000000000167 &lt;SPAN class="L0S52"&gt;with &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;header &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;line&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 16:15:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388472#M1841400</guid>
      <dc:creator>former_member355038</dc:creator>
      <dc:date>2014-05-23T16:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query Remove Duplicate Records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388473#M1841401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, you can order the table %dtab[] using the fields you know are the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT %dtab[] by [ASCENDING/DESCENDING] FLD1 [ASCENDING/DESCENDING] FLD2.&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATES FROM itab comparing FLD1 FLD2.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 16:23:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query-remove-duplicate-records/m-p/10388473#M1841401</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-05-23T16:23:03Z</dc:date>
    </item>
  </channel>
</rss>

