<?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 allentries in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-allentries/m-p/1728897#M317547</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If there are no records in the internal table used in for all entries, select statment get all entries in databse tqable.&lt;/P&gt;&lt;P&gt;Duplicates entries for result table are deleted.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Dec 2006 17:11:37 GMT</pubDate>
    <dc:creator>LucianoBentiveg</dc:creator>
    <dc:date>2006-12-07T17:11:37Z</dc:date>
    <item>
      <title>select allentries</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-allentries/m-p/1728894#M317544</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;OL&gt;&lt;LI level="1" type="ol"&gt;&lt;P&gt;what is the use of select for all entries in an internal&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;table?&lt;/P&gt;&lt;OL&gt;&lt;LI level="1" type="ol"&gt;&lt;P&gt;when you are using 2 internal table in program, you have&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;decided to use for all entries statement to retrieve data&lt;/P&gt;&lt;P&gt;but unfortunately there are no records in the first internal&lt;/P&gt;&lt;P&gt;table. What will be the result? (2nd internal table contains&lt;/P&gt;&lt;P&gt;records).&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Dec 2006 16:59:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-allentries/m-p/1728894#M317544</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-07T16:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: select allentries</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-allentries/m-p/1728895#M317545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the FOR ALL ENTRIES table is empty, the resulting table for the second select will contain all entries (that meet the other conditions of the WHERE).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Dec 2006 17:01:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-allentries/m-p/1728895#M317545</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-07T17:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: select allentries</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-allentries/m-p/1728896#M317546</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;&lt;/P&gt;&lt;P&gt;1) FOR ALL ENTRIES can be used to retrive the data based on the values of an internal table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXAMPLE.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------" /&gt;&lt;P&gt;DATA: T_VBAK TYPE STANDARD TABLE OF VBAK.&lt;/P&gt;&lt;P&gt;DATA: T_VBAP TYPE STANDARD TABLE OF VBAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT MANDT VBELN FROM VBAK&lt;/P&gt;&lt;P&gt;       INTO TABLE T_VBAK&lt;/P&gt;&lt;P&gt;       WHERE ERDAT = SY-DATUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT T_VBAK[] IS INITIAL.&lt;/P&gt;&lt;P&gt;  SELECT MANDT VBELN POSNR&lt;/P&gt;&lt;P&gt;         INTO TABLE T_VBAP&lt;/P&gt;&lt;P&gt;         FROM VBAP&lt;/P&gt;&lt;P&gt;         FOR ALL ENTRIES IN T_VBAK&lt;/P&gt;&lt;P&gt;         WHERE VBELN = T_VBAK-VBELN.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) If there is no record in the first internal table then it will select all the records from the table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above if you don't check for internal table value..then it will get all the records if the internal table T_VBAK is empty..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Dec 2006 17:02:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-allentries/m-p/1728896#M317546</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-07T17:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: select allentries</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-allentries/m-p/1728897#M317547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If there are no records in the internal table used in for all entries, select statment get all entries in databse tqable.&lt;/P&gt;&lt;P&gt;Duplicates entries for result table are deleted.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Dec 2006 17:11:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-allentries/m-p/1728897#M317547</guid>
      <dc:creator>LucianoBentiveg</dc:creator>
      <dc:date>2006-12-07T17:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: select allentries</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-allentries/m-p/1728898#M317548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&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;Examples&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there are no entries in the table then all the records are fetched.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Dec 2006 17:11:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-allentries/m-p/1728898#M317548</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-07T17:11:46Z</dc:date>
    </item>
  </channel>
</rss>

