<?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: for all entries in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries/m-p/2680456#M619468</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;a small but mighty addition:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must SELECT all key fields of the FROM table even if you do not have them in the target area of the INTO CORRESPONDING FIELDS clause because the FOR ALL ENTRIES clause will cause a deletion of duplicates in the retrieved data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And a small note: If the FOR ALL ENTRIES table is empty, the WHERE clause is ignored completely - even other conditions are ignored (!!).&lt;/P&gt;&lt;P&gt;&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>Sun, 12 Aug 2007 16:40:05 GMT</pubDate>
    <dc:creator>Clemenss</dc:creator>
    <dc:date>2007-08-12T16:40:05Z</dc:date>
    <item>
      <title>for all entries</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries/m-p/2680452#M619464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi exerts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is necessary step before writing the &amp;#145;for all entries&amp;#146; statement? Give the syntax?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Aug 2007 03:04:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries/m-p/2680452#M619464</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-12T03:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: for all entries</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries/m-p/2680453#M619465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is good practice  to check whether the internal table body(itab1) is not initial before doing select for all entries....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;syntax :

if not itab1 is initial.
         select f1 f1 f3....
          from dbt1  into itab2 for all entries in itab1
          where &amp;lt;cond&amp;gt;.
endif.
f1 , f2 ,f3 - fields
dbt1 - data base table
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Aug 2007 03:13:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries/m-p/2680453#M619465</guid>
      <dc:creator>SG141</dc:creator>
      <dc:date>2007-08-12T03:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: for all entries</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries/m-p/2680454#M619466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When using "Select.. For all Entries". The following 4 rules MUST be followed:&lt;/P&gt;&lt;P&gt;          1 Check to make sure driver itab is not empty&lt;/P&gt;&lt;P&gt;          2 Always SORT the itab (driver table) by keys. Specify all keys used in the Where clause&lt;/P&gt;&lt;P&gt;          3 DELETE Adjacent Duplicates Comparing the keys that were sorted.&lt;/P&gt;&lt;P&gt;          4 All Primary Key Fields must be in the Select List &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it helped, you can acknowledge the same by rewarding&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Aug 2007 15:30:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries/m-p/2680454#M619466</guid>
      <dc:creator>suredarreddy_pulimamidi</dc:creator>
      <dc:date>2007-08-12T15:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: for all entries</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries/m-p/2680455#M619467</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;&amp;lt;b&amp;gt;Points to note are :-&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;1. Duplicates are discarded from the result set. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. If the internal table itab does not contain any entries, the system treats the statement as though there were no WHERE cond condition, and selects all records. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. If you use FOR ALL ENTRIES IN itab, you cannot use ORDER BY f1 ... fn in the ORDER-BY clause. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Sample Code :-&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM SFLIGHT INTO WA_SFLIGHT &lt;/P&gt;&lt;P&gt;    FOR ALL ENTRIES IN FTAB &lt;/P&gt;&lt;P&gt;    WHERE CARRID = FTAB-CARRID AND &lt;/P&gt;&lt;P&gt;          CONNID = FTAB-CONNID AND &lt;/P&gt;&lt;P&gt;          FLDATE = '19950228'. &lt;/P&gt;&lt;P&gt;  RATIO = WA_SFLIGHT-SEATSOCC / WA_SFLIGHT-SEATSMAX. &lt;/P&gt;&lt;P&gt;  WRITE: / WA_SFLIGHT-CARRID, WA_SFLIGHT-CONNID, RATIO. &lt;/P&gt;&lt;P&gt;ENDSELECT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enjoy SAP.&lt;/P&gt;&lt;P&gt;Pankaj Singh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Aug 2007 16:38:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries/m-p/2680455#M619467</guid>
      <dc:creator>messier31</dc:creator>
      <dc:date>2007-08-12T16:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: for all entries</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries/m-p/2680456#M619468</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;a small but mighty addition:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You must SELECT all key fields of the FROM table even if you do not have them in the target area of the INTO CORRESPONDING FIELDS clause because the FOR ALL ENTRIES clause will cause a deletion of duplicates in the retrieved data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And a small note: If the FOR ALL ENTRIES table is empty, the WHERE clause is ignored completely - even other conditions are ignored (!!).&lt;/P&gt;&lt;P&gt;&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>Sun, 12 Aug 2007 16:40:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/for-all-entries/m-p/2680456#M619468</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2007-08-12T16:40:05Z</dc:date>
    </item>
  </channel>
</rss>

