<?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: Select duplicate Data with same No. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-duplicate-data-with-same-no/m-p/6003498#M1344680</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if its a ztable then better to keep a counter field for your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;parameter : count type i. "this holds number of required data.

select * from TT_XYZ into table gt_itab. 
loop at gt_itab into gs_itab.
 at end of post_no. 
   count = count - 1.
 endat.
 if count = 0.
  exit.
 endif.
 append gs_itab to gt_itab2.
 clear gs_itab.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now gt_itab2 holds required entries for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 22 Aug 2009 06:47:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-22T06:47:45Z</dc:date>
    <item>
      <title>Select duplicate Data with same No.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-duplicate-data-with-same-no/m-p/6003495#M1344677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All experts, &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;    How  we giong to select the data with same No as 1 record count. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example :    Bellow is the sample table contains 5 rows records, but of records ard same number. &lt;/P&gt;&lt;P&gt;           &lt;/P&gt;&lt;P&gt;      post No.               Name&lt;/P&gt;&lt;P&gt;      1001                      Jacky &lt;/P&gt;&lt;P&gt;      1001                      Jimmy&lt;/P&gt;&lt;P&gt;      1002                      Mark&lt;/P&gt;&lt;P&gt;      1003                     Jin &lt;/P&gt;&lt;P&gt;      1004                     chloe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when  i use the select statement bellow :  &lt;/P&gt;&lt;P&gt; Select * from table into corresposding of table t_table up to  3.  &lt;/P&gt;&lt;P&gt; will get the result  like below . &lt;/P&gt;&lt;P&gt;      1001                      Jacky &lt;/P&gt;&lt;P&gt;      1001                      Jimmy&lt;/P&gt;&lt;P&gt;      1002                      Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question is , how i going to write the statement  to get the 3(depend on user insert how many record)  different no.  example , 2records of 1001, 1002 , and 1003 .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Aug 2009 05:49:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-duplicate-data-with-same-no/m-p/6003495#M1344677</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-22T05:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: Select duplicate Data with same No.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-duplicate-data-with-same-no/m-p/6003496#M1344678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your requirement is still not clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Explain with proper example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Augustin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Aug 2009 06:28:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-duplicate-data-with-same-no/m-p/6003496#M1344678</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-22T06:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: Select duplicate Data with same No.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-duplicate-data-with-same-no/m-p/6003497#M1344679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi olrang,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not clear with your requirement but It appears that if there are duplicate records then u want it to display just first record for that number. In such case u can fetch whole data in internal table sort your table on number field and then use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATES FROM t_table COMPARING &amp;lt;POST NUMBER FIELD NAME&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this may help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Vaibhav Pendse.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Aug 2009 06:38:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-duplicate-data-with-same-no/m-p/6003497#M1344679</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-22T06:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: Select duplicate Data with same No.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-duplicate-data-with-same-no/m-p/6003498#M1344680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if its a ztable then better to keep a counter field for your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;parameter : count type i. "this holds number of required data.

select * from TT_XYZ into table gt_itab. 
loop at gt_itab into gs_itab.
 at end of post_no. 
   count = count - 1.
 endat.
 if count = 0.
  exit.
 endif.
 append gs_itab to gt_itab2.
 clear gs_itab.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now gt_itab2 holds required entries for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Aug 2009 06:47:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-duplicate-data-with-same-no/m-p/6003498#M1344680</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-22T06:47:45Z</dc:date>
    </item>
  </channel>
</rss>

