<?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: Inner Join issue in Select statement.. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-issue-in-select-statement/m-p/6733255#M1457413</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;First of all, its never recommended to have a select with five tables. As soon as three tables are used with join for a select statement, the performance gets affected remarkably. This is because the JOIN bypasses the buffer and everytime SELECT hits the databse.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would suggest you to first select the records from the main table into an internal table based upon the selection parameters. Also, try to maximize the use of key fields of the tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Jayesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Mar 2010 06:10:54 GMT</pubDate>
    <dc:creator>jayesh_gupta</dc:creator>
    <dc:date>2010-03-23T06:10:54Z</dc:date>
    <item>
      <title>Inner Join issue in Select statement..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-issue-in-select-statement/m-p/6733252#M1457410</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 wrote select statement which is having InnerJoin with 5 tables, but it is taking lot of time for execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can anyone give me the best way.   my peace of code is below :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECT a~vbeln&lt;/P&gt;&lt;P&gt;         a~vkorg&lt;/P&gt;&lt;P&gt;         a~vkbur&lt;/P&gt;&lt;P&gt;         p~vbeln&lt;/P&gt;&lt;P&gt;         p~prctr&lt;/P&gt;&lt;P&gt;         p~matnr&lt;/P&gt;&lt;P&gt;         p~werks&lt;/P&gt;&lt;P&gt;         p~netpr&lt;/P&gt;&lt;P&gt;         p~kpein&lt;/P&gt;&lt;P&gt;         k~provg&lt;/P&gt;&lt;P&gt;         e~bmeng&lt;/P&gt;&lt;P&gt;         e~edatu&lt;/P&gt;&lt;P&gt;         b~omeng&lt;/P&gt;&lt;P&gt;     INTO CORRESPONDING FIELDS OF TABLE it_so&lt;/P&gt;&lt;P&gt;     FROM ( ( ( ( vbak AS a INNER JOIN vbap AS p&lt;/P&gt;&lt;P&gt;     ON a&lt;SUB&gt;vbeln = p&lt;/SUB&gt;vbeln )&lt;/P&gt;&lt;P&gt;     INNER JOIN mvke AS k ON k&lt;SUB&gt;matnr = p&lt;/SUB&gt;matnr )&lt;/P&gt;&lt;P&gt;     INNER JOIN vbep AS e ON e&lt;SUB&gt;vbeln = a&lt;/SUB&gt;vbeln )&lt;/P&gt;&lt;P&gt;     INNER JOIN vbbe AS b ON b&lt;SUB&gt;vbeln = p&lt;/SUB&gt;vbeln )&lt;/P&gt;&lt;P&gt;     WHERE k~provg IN s_provg&lt;/P&gt;&lt;P&gt;     AND p~prctr IN s_prctr&lt;/P&gt;&lt;P&gt;     AND p~matnr IN s_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;sudha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Mar 2010 06:02:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-issue-in-select-statement/m-p/6733252#M1457410</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-23T06:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join issue in Select statement..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-issue-in-select-statement/m-p/6733253#M1457411</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;you can try for all entries &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select.. from vbak into lt_vabk&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;select... vbap for all entries in lt_vbak where vbeln = lt_vbak.&lt;/P&gt;&lt;P&gt;end if.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Mar 2010 06:09:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-issue-in-select-statement/m-p/6733253#M1457411</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-23T06:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join issue in Select statement..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-issue-in-select-statement/m-p/6733254#M1457412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. You should do away with the INTO CORRESPONDING FIELDS OF TABLE &amp;amp; replace by INTO TABLE. (I know many people will disagree with this but try in SE30 &amp;amp; check if you have any improved timeframes for the latter)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Out of the 3 selection criteria s_provg, s_prctr &amp;amp; s_matnr which ones are mandatory? Also none of these are key fields for the tables in question so definitely it is going to impact the performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Mar 2010 06:09:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-issue-in-select-statement/m-p/6733254#M1457412</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-03-23T06:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join issue in Select statement..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-issue-in-select-statement/m-p/6733255#M1457413</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;First of all, its never recommended to have a select with five tables. As soon as three tables are used with join for a select statement, the performance gets affected remarkably. This is because the JOIN bypasses the buffer and everytime SELECT hits the databse.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would suggest you to first select the records from the main table into an internal table based upon the selection parameters. Also, try to maximize the use of key fields of the tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Jayesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Mar 2010 06:10:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-issue-in-select-statement/m-p/6733255#M1457413</guid>
      <dc:creator>jayesh_gupta</dc:creator>
      <dc:date>2010-03-23T06:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join issue in Select statement..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-issue-in-select-statement/m-p/6733256#M1457414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First write a select with tables vbap and mvke and get the corresponding fields into an internal table ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Later you may use SELECT ..........FOR ALL ENTRIES IN ITAB.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Mar 2010 06:17:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-issue-in-select-statement/m-p/6733256#M1457414</guid>
      <dc:creator>jayesh_gupta</dc:creator>
      <dc:date>2010-03-23T06:17:16Z</dc:date>
    </item>
  </channel>
</rss>

