<?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: Performence - SELECT in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performence-select/m-p/2415755#M539180</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT DISTINCT bname
INTO TABLE bname_itab
...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Jun 2007 15:02:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-25T15:02:17Z</dc:date>
    <item>
      <title>Performence - SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performence-select/m-p/2415754#M539179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I hv SQL code like,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;1 -  SELECT bname&lt;/P&gt;&lt;P&gt;         INTO TABLE bname_itab&lt;/P&gt;&lt;P&gt;         FROM vbak&lt;/P&gt;&lt;P&gt;           WHERE ernam IN s_ernam&lt;/P&gt;&lt;P&gt;             AND bname NE space&lt;/P&gt;&lt;P&gt;             AND auart IN s_auart&lt;/P&gt;&lt;P&gt;             AND vkorg IN s_org&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           and ktokd in s_c_ag&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;             AND vtweg IN s_d_ch&lt;/P&gt;&lt;P&gt;             AND spart IN s_div.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 -  SORT bname_itab.&lt;/P&gt;&lt;P&gt;3 -  DELETE ADJACENT DUPLICATES FROM bname_itab.&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, the 1st statement is, consuming much time, as there 1000's BNAMEs in VBAK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to avoide selecting duplicates in the 1st SELECT statement itself? &lt;/P&gt;&lt;P&gt;I mean, only the new/differed BNAMEs shuld b selected! &lt;/P&gt;&lt;P&gt;(so, I dont use 2ns and 3rd stetents any more)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanq.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 14:58:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performence-select/m-p/2415754#M539179</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T14:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: Performence - SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performence-select/m-p/2415755#M539180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
SELECT DISTINCT bname
INTO TABLE bname_itab
...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 15:02:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performence-select/m-p/2415755#M539180</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T15:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: Performence - SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performence-select/m-p/2415756#M539181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi srikar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To read a several entries from the database, use the following: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT [DISTINCT] &amp;lt;cols&amp;gt; ... WHERE ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do not use DISTINCT (&amp;lt;lines&amp;gt; is then empty), the system reads all of the lines that satisfy the WHERE condition. If you use DISTINCT, the system excludes duplicate entries. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result of the selection is a table. The target area of the INTO clause can be an internal table with a line type appropriate for &amp;lt;cols&amp;gt;. If the target area is not an internal table, but a flat structure, you must include an ENDSELECT statement after the SELECT statement:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 15:10:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performence-select/m-p/2415756#M539181</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T15:10:35Z</dc:date>
    </item>
  </channel>
</rss>

