<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3428327#M823516</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Siddhesh - please see:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[JOINS vs. FOR ALL ENTRIES - Which Performs Better?|/people/rob.burbank/blog/2007/03/19/joins-vs-for-all-entries--which-performs-better]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[FOR ALL ENTRIES vs DB2 JOIN|http://blogs.ittoolbox.com/sap/db2/archives/for-all-entries-vs-db2-join-8912]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Feb 2008 14:50:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-15T14:50:12Z</dc:date>
    <item>
      <title>Inner join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3428320#M823509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls check the below code and help me to know how to relate the table of vbak and vbrp.....for return orders in the same stmt.&lt;/P&gt;&lt;P&gt; I've used the inner join stmt and it displays the report other than the return orders of sales....if i add to display the return delivery reports...it can doable via vbak-&amp;gt;vbrp join....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI&lt;/P&gt;&lt;P&gt;if i use the 'INNER JOIN vbrp on vbak&lt;SUB&gt;vbeln eq vbrp&lt;/SUB&gt;vgbel instead of 'INNER JOIN vbrp on lips&lt;SUB&gt;vbeln eq vbrp&lt;/SUB&gt;vgbel' then the whole report goes duplication while appending.....&lt;/P&gt;&lt;P&gt;and in inner join, we can't use OR conditions.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(the below replies not solving my problem 14/2/08)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls advise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*****coding&lt;/P&gt;&lt;P&gt;SELECT vbak&lt;SUB&gt;vbeln vbak&lt;/SUB&gt;erdat vbak&lt;SUB&gt;kunnr kna1&lt;/SUB&gt;name1 lips~vbeln&lt;/P&gt;&lt;P&gt;       vbrp~vbeln&lt;/P&gt;&lt;P&gt;       makt&lt;SUB&gt;maktx vbrp&lt;/SUB&gt;matnr vbrp&lt;SUB&gt;fkimg vbrp&lt;/SUB&gt;netwr VBAK&lt;SUB&gt;AUART VBRP&lt;/SUB&gt;WERKS&lt;/P&gt;&lt;P&gt;INTO TABLE i_sales&lt;/P&gt;&lt;P&gt;FROM vbak&lt;/P&gt;&lt;P&gt;  inner join vbap on vbak&lt;SUB&gt;vbeln eq vbap&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;  INNER JOIN vbpa ON vbak&lt;SUB&gt;vbeln EQ vbpa&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;  INNER JOIN lips ON vbak&lt;SUB&gt;vbeln EQ lips&lt;/SUB&gt;vgbel&lt;/P&gt;&lt;P&gt;  INNER JOIN vbrp on lips&lt;SUB&gt;vbeln eq vbrp&lt;/SUB&gt;vgbel&lt;/P&gt;&lt;P&gt;  inner join kna1 on vbak&lt;SUB&gt;kunnr eq kna1&lt;/SUB&gt;kunnr&lt;/P&gt;&lt;P&gt;  inner join makt on vbrp&lt;SUB&gt;matnr eq makt&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt; WHERE vbpa&lt;SUB&gt;parvw EQ 'AG' and  lips&lt;/SUB&gt;posnr eq vbrp&lt;SUB&gt;vgpos and vbak&lt;/SUB&gt;vkorg in l_salorg&lt;/P&gt;&lt;P&gt; and vbak&lt;SUB&gt;vtweg in l_chanel and vbak&lt;/SUB&gt;spart in l_dvsn and vbak~erdat in l_date and&lt;/P&gt;&lt;P&gt; vbrp&lt;SUB&gt;matnr in l_matnr and VBAK&lt;/SUB&gt;AUART IN L_AUART AND vbrp~werks in l_werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks &amp;amp; regards&lt;/P&gt;&lt;P&gt;sankar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Feb 14, 2008 2:07 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: sankar babu on Feb 15, 2008 2:57 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2008 09:48:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3428320#M823509</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-14T09:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: Inner join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3428321#M823510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select a&lt;SUB&gt;kunag a&lt;/SUB&gt;vbeln a&lt;SUB&gt;fkdat a&lt;/SUB&gt;bukrs a~vbtyp&lt;/P&gt;&lt;P&gt;         b&lt;SUB&gt;matkl b&lt;/SUB&gt;matnr b&lt;SUB&gt;arktx b&lt;/SUB&gt;fkimg b&lt;SUB&gt;kzwi2 b&lt;/SUB&gt;wavwr&lt;/P&gt;&lt;P&gt;         c~name1&lt;/P&gt;&lt;P&gt;         d~kunn2&lt;/P&gt;&lt;P&gt;     into corresponding fields of table replines&lt;/P&gt;&lt;P&gt;        from vbrk as a&lt;/P&gt;&lt;P&gt;          inner join vbrp as b&lt;/P&gt;&lt;P&gt;             on a&lt;SUB&gt;vbeln = b&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;          inner join kna1 as c&lt;/P&gt;&lt;P&gt;             on a&lt;SUB&gt;kunag = c&lt;/SUB&gt;kunnr&lt;/P&gt;&lt;P&gt;          left outer join knvp as d&lt;/P&gt;&lt;P&gt;             on a&lt;SUB&gt;kunag = d&lt;/SUB&gt;kunnr and&lt;/P&gt;&lt;P&gt;                a&lt;SUB&gt;vkorg = d&lt;/SUB&gt;vkorg and&lt;/P&gt;&lt;P&gt;                a&lt;SUB&gt;vtweg = d&lt;/SUB&gt;vtweg and&lt;/P&gt;&lt;P&gt;                d~spart = '71' and&lt;/P&gt;&lt;P&gt;                d~parvw = 'CO' and&lt;/P&gt;&lt;P&gt;                d~parza = '000'&lt;/P&gt;&lt;P&gt;          where a~vkorg = '7100' and&lt;/P&gt;&lt;P&gt;                a~vbtyp in r_vtyp and&lt;/P&gt;&lt;P&gt;                a~fkdat in s_date and&lt;/P&gt;&lt;P&gt;                a~kunag in s_cust and&lt;/P&gt;&lt;P&gt;                b~matkl in s_mgrp and&lt;/P&gt;&lt;P&gt;                b~autyp in r_atyp.&lt;/P&gt;&lt;P&gt;END-OF-SELECTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;priya.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Feb 14, 2008 2:07 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2008 11:13:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3428321#M823510</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-14T11:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: Inner join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3428322#M823511</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;Dont use Inner joint,mostly we need to avoid use inner join,its not optimiz,use All entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select  vbeln erdat  kunnr AUART  from VBRK into IT_VBRK .&lt;/P&gt;&lt;P&gt;Select  vbeln matnr fkimg netwr WERKS from VBRP into IT_VBRP for all entries in it_vbrk where vbeln eq it_vbak-vbeln.&lt;/P&gt;&lt;P&gt;Select  vbeln from LIPS into it_lips for all entries in it_vbrp where vbeln =  it_vbrp-vgbel.&lt;/P&gt;&lt;P&gt;Select  kunnr name1 from KAN1 into IT_KNA1 for all entries IT_VBAK where kunnr = it_vbrk-kunnr.&lt;/P&gt;&lt;P&gt;Select matnr from makt into it_makt for all entries in it_vbrb where matnr = it_vbrp-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Feb 14, 2008 2:08 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2008 11:25:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3428322#M823511</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-14T11:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: Inner join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3428323#M823512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jay - that's incorrect. JOINs usually outperform FOR ALL ENTRIES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bear in mind that ABAP implements views using JOINs.&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, 14 Feb 2008 19:12:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3428323#M823512</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-14T19:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: Inner join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3428324#M823513</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 are using somany tables in innerjoins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do for more than 3 joins, the performance wise it is not good. First you join 3 tables. then for all entries of that table select from other tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;kamala.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2008 14:08:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3428324#M823513</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-15T14:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: Inner join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3428325#M823514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even in my opinion for all entries is better performance wise than join. A simple reason behind this is the time for which your database access remains open. This palys major role when your tables ahve huge data. It is quiet possible that your join statement might go in dump in case of huge data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siddhesh S.Tawate&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2008 14:16:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3428325#M823514</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-15T14:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: Inner join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3428326#M823515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kamala,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will u explain me clearly...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thansk &amp;amp; regards&lt;/P&gt;&lt;P&gt;sankar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2008 14:29:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3428326#M823515</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-15T14:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: Inner join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3428327#M823516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Siddhesh - please see:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[JOINS vs. FOR ALL ENTRIES - Which Performs Better?|/people/rob.burbank/blog/2007/03/19/joins-vs-for-all-entries--which-performs-better]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[FOR ALL ENTRIES vs DB2 JOIN|http://blogs.ittoolbox.com/sap/db2/archives/for-all-entries-vs-db2-join-8912]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2008 14:50:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3428327#M823516</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-15T14:50:12Z</dc:date>
    </item>
  </channel>
</rss>

