<?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: difference between inner join and for all entries in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-inner-join-and-for-all-entries/m-p/3378089#M811128</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;STRONG&gt;Inner Join:&lt;/STRONG&gt; Retrieves data from Data base tables based on the 'WITH KEY'  fields which you have mentioned in your 'SELECT' query.  It also depends on the 'WHERE' condition.  In total the 'Inner Join' is filtering the data at DATABASE LEVEL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;for all entries:&lt;/STRONG&gt; let us take a simple example to disclose the beauty of 'FOR ALL ENTRIES'.&lt;/P&gt;&lt;P&gt;IT_KNA1 is an internal table which has been used to retrieve the customers from KNA1 table.&lt;/P&gt;&lt;P&gt;IT_VBAK is an internal table which, you are going to use to retrieve the sales orders from VBAK table for the IT_KNA1 internal table customers.&lt;/P&gt;&lt;P&gt;slect vbeln&lt;/P&gt;&lt;P&gt;        erdat&lt;/P&gt;&lt;P&gt;        from VBAK&lt;/P&gt;&lt;P&gt;        for all entries IT_KNA1&lt;/P&gt;&lt;P&gt;        where erdat in s_erdat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above select query can extracts the Sales Orders for the customers in IT_KNA1 based on the selection screen input S_ERDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if IT_KNA1 is empty....what would happend to the above select query.&lt;/P&gt;&lt;P&gt;The above select query will work fine, provided it will extract all the data(for all customers in KNA1 table) in between the selection screen input S_ERDAT, which is one way or other way burden on the data base.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SO WHILE USING 'FOR ALL ENTRIES', ITS USERS RESPONSIBILITY TO CHECK THE INITIALITY OF THE FIRST INTERNAL TABLE. (IT_KNA1 IN OUR CASE).&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Feb 2008 07:22:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-21T07:22:35Z</dc:date>
    <item>
      <title>difference between inner join and for all entries</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-inner-join-and-for-all-entries/m-p/3378087#M811126</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;experts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please answer me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;difference between inner join and for all entries&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2008 20:35:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-inner-join-and-for-all-entries/m-p/3378087#M811126</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-20T20:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: difference between inner join and for all entries</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-inner-join-and-for-all-entries/m-p/3378088#M811127</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;Inner Join : here you are going to use two database tables having common fields, on the basis of which you will fetch the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex. select a&lt;SUB&gt;field1 b&lt;/SUB&gt;field2 a~field3 into table itab where DB1 as a join DB2 as b on &amp;lt;specify the condtion on common field&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For all entries: Here at first you are going to fetch data from Db1 into itab1 for specified condition. then again you will use one more select query to fetch the values from DB2 for the corresponding entries in internal table itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex select f1 f2 field into table itab1 from DB1 where &amp;lt;condition&amp;gt;&lt;/P&gt;&lt;P&gt;select f3 f4 into tabe itab2 from DB2 for all entries in itab1 &lt;/P&gt;&lt;P&gt;where field = itab1-field and &amp;lt;other conditions&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2008 06:19:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-inner-join-and-for-all-entries/m-p/3378088#M811127</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-21T06:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: difference between inner join and for all entries</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-inner-join-and-for-all-entries/m-p/3378089#M811128</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;STRONG&gt;Inner Join:&lt;/STRONG&gt; Retrieves data from Data base tables based on the 'WITH KEY'  fields which you have mentioned in your 'SELECT' query.  It also depends on the 'WHERE' condition.  In total the 'Inner Join' is filtering the data at DATABASE LEVEL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;for all entries:&lt;/STRONG&gt; let us take a simple example to disclose the beauty of 'FOR ALL ENTRIES'.&lt;/P&gt;&lt;P&gt;IT_KNA1 is an internal table which has been used to retrieve the customers from KNA1 table.&lt;/P&gt;&lt;P&gt;IT_VBAK is an internal table which, you are going to use to retrieve the sales orders from VBAK table for the IT_KNA1 internal table customers.&lt;/P&gt;&lt;P&gt;slect vbeln&lt;/P&gt;&lt;P&gt;        erdat&lt;/P&gt;&lt;P&gt;        from VBAK&lt;/P&gt;&lt;P&gt;        for all entries IT_KNA1&lt;/P&gt;&lt;P&gt;        where erdat in s_erdat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above select query can extracts the Sales Orders for the customers in IT_KNA1 based on the selection screen input S_ERDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if IT_KNA1 is empty....what would happend to the above select query.&lt;/P&gt;&lt;P&gt;The above select query will work fine, provided it will extract all the data(for all customers in KNA1 table) in between the selection screen input S_ERDAT, which is one way or other way burden on the data base.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SO WHILE USING 'FOR ALL ENTRIES', ITS USERS RESPONSIBILITY TO CHECK THE INITIALITY OF THE FIRST INTERNAL TABLE. (IT_KNA1 IN OUR CASE).&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2008 07:22:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-inner-join-and-for-all-entries/m-p/3378089#M811128</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-21T07:22:35Z</dc:date>
    </item>
  </channel>
</rss>

