<?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: selection query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-query/m-p/1742014#M322313</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;store the currency combinations into an internal table. As soon as one combination apperas more than once, it can not be stored and you can do what you want in this case to be done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data:
  begin of ls_conv,
  fcurr like...
  tcurr like...
  end of ls_conv,
  lt_conv like hashed table of ls_conv
   with unique key table_line.
loop at itab.
  move-corresponding itab to ls_conv.
  insert ls_conv into table lt_conv.
  if sy-subrc &amp;lt;&amp;gt; 0.
"Alarm: Here comes the duplicate
*  TAKE ACTION
  endif.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At least this is the fastest solution.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Jan 2007 15:25:55 GMT</pubDate>
    <dc:creator>Clemenss</dc:creator>
    <dc:date>2007-01-01T15:25:55Z</dc:date>
    <item>
      <title>selection query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-query/m-p/1742012#M322311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi guys,&lt;/P&gt;&lt;P&gt;I have a data in internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;iam extracting based upon the fields KURST and GDATU.&lt;/P&gt;&lt;P&gt;If i have more than one same currencey conversion like given below , i should display a error message,&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------------" /&gt;&lt;P&gt;kurst      fcurr             tcurr           gdatu      &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------------------------------" /&gt;&lt;P&gt;TCL       GBP            EUR           13.03.2006&lt;/P&gt;&lt;P&gt;TCL       GBP            EUR           31.03.2006&lt;/P&gt;&lt;P&gt;It should not have more than one time same currency conversion.&lt;/P&gt;&lt;P&gt;GBP--&amp;gt;EUR&lt;/P&gt;&lt;P&gt;GBP--&amp;gt;EUR.&lt;/P&gt;&lt;P&gt;how can i do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jan 2007 12:19:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-query/m-p/1742012#M322311</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-01T12:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: selection query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-query/m-p/1742013#M322312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ahmed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try with a logic similar to below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: tabix like sy-tabix,
      wa like itab.

sort itab by kurst fcurr tcurr.

loop at itab.
     tabix = sy-tabix.
     tabix = tabix + 1.
     read table itab index tabix.
     if sy-subrc eq 0 and 
        itab-kurst = wa-kurst and
        itab-fcurr = wa-fcurr and
        itab-tcurr = wa-tcurr.
        Write:/ 'Duplicate Record:', itab.
     endif.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jan 2007 13:05:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-query/m-p/1742013#M322312</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-01T13:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: selection query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-query/m-p/1742014#M322313</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;store the currency combinations into an internal table. As soon as one combination apperas more than once, it can not be stored and you can do what you want in this case to be done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data:
  begin of ls_conv,
  fcurr like...
  tcurr like...
  end of ls_conv,
  lt_conv like hashed table of ls_conv
   with unique key table_line.
loop at itab.
  move-corresponding itab to ls_conv.
  insert ls_conv into table lt_conv.
  if sy-subrc &amp;lt;&amp;gt; 0.
"Alarm: Here comes the duplicate
*  TAKE ACTION
  endif.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At least this is the fastest solution.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jan 2007 15:25:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-query/m-p/1742014#M322313</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2007-01-01T15:25:55Z</dc:date>
    </item>
  </channel>
</rss>

