<?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 statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2124877#M445951</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes you can.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But there is chance of getting dupliate rows in the internal tbale.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points if it helps you.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds,&lt;/P&gt;&lt;P&gt;Rama chary.Pammi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Apr 2007 09:16:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-13T09:16:35Z</dc:date>
    <item>
      <title>select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2124875#M445949</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 doubt in select stmt. it is as follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select x y z from mara into table itab &lt;/P&gt;&lt;P&gt;for all entries in jtab where x = jtab-x.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here x y z are non key fields and jtab-x is a key field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can we use non-key = key in for all entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ratna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2007 09:14:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2124875#M445949</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-13T09:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2124876#M445950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI ratna,&lt;/P&gt;&lt;P&gt;                Yes we can do so....&amp;lt;b&amp;gt;Make sure&amp;lt;/b&amp;gt; that,the data types of mara-x and jtab-x are the same.&amp;lt;b&amp;gt;But you may get some duplicate records depending on the data in the tables.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Reward if helpful.&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;V.Raghavender.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2007 09:16:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2124876#M445950</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-13T09:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2124877#M445951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes you can.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But there is chance of getting dupliate rows in the internal tbale.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points if it helps you.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds,&lt;/P&gt;&lt;P&gt;Rama chary.Pammi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2007 09:16:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2124877#M445951</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-13T09:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2124878#M445952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do not see a problem in the select statement.. just make sure that the data types of mara-x and jtab-x are the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sudha&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Sudha Mohan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2007 09:16:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2124878#M445952</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-13T09:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2124879#M445953</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;YES..you can use non-key fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but before using for all entries..sort the internal table by x and delete the duplicate entries. and also check if the table has any entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;madhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2007 09:16:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2124879#M445953</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-13T09:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2124880#M445954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  Yes u can do that.&lt;/P&gt;&lt;P&gt;   The WHERE clause of the SELECT statement has a special variant that allows you to derive conditions from the lines and columns of an internal table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT ... FOR ALL ENTRIES IN &amp;lt;itab&amp;gt; WHERE &amp;lt;cond&amp;gt; ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;cond&amp;gt; may be formulated as described above. If you specify a field of the internal table &amp;lt;itab&amp;gt; as an operand in a condition, you address all lines of the internal table. The comparison is then performed for each line of the internal table. For each line, the system selects the lines from the database table that satisfy the condition. The result set of the SELECT statement is the union of the individual selections for each line of the internal table. Duplicate lines are automatically eliminated from the result set. If &amp;lt;itab&amp;gt; is empty, the addition FOR ALL ENTRIES is disregarded, and all entries are read. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The internal table &amp;lt;itab&amp;gt; must have a structured line type, and each field that occurs in the condition &amp;lt;cond&amp;gt; must be compatible with the column of the database with which it is compared. Do not use the operators LIKE, BETWEEN, and IN in comparisons using internal table fields. You may not use the ORDER BY clause in the same SELECT statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the option FOR ALL ENTRIES to replace nested select loops by operations on internal tables. This can significantly improve the performance for large sets of selected data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if helpful.&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;kiran kumar k.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        kiran kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2007 09:17:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2124880#M445954</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-13T09:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2124881#M445955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ratna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can very well use non-key = key in for all entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure u sort ur int table and also delete adjacent duplicates after the select statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;****reward points if useful.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pavithra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2007 09:21:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2124881#M445955</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-13T09:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2124882#M445956</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;yes, you can use but if u are using a non key field you may get duplicate records,&lt;/P&gt;&lt;P&gt;but for all entries eliminates the duplicate records in the result. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so it is advisable not use the non key fields..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can see the following links,&lt;/P&gt;&lt;P&gt;it helps you a lot..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3a1f358411d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3a1f358411d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/people/david.halitsky/blog/2006/08/21/anyone-got-some-real-benchmark-stats-on-for-all-entries&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/people/rob.burbank/blog/2007/03/19/joins-vs-for-all-entries--which-performs-better&lt;/P&gt;&lt;P&gt;Hope it helps you...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if u have any more doubt...&lt;/P&gt;&lt;P&gt;Reward points if useful......&lt;/P&gt;&lt;P&gt;Suresh.......&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2007 09:26:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2124882#M445956</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-13T09:26:50Z</dc:date>
    </item>
  </channel>
</rss>

