<?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/2982956#M704296</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;select l&lt;SUB&gt;vbeln l&lt;/SUB&gt;vkorg l&lt;SUB&gt;kunnr l&lt;/SUB&gt;zukrl l~werks into table i_vbeln&lt;/P&gt;&lt;P&gt;from ( likp as l inner join vbpa as v&lt;/P&gt;&lt;P&gt;on l&lt;SUB&gt;vbeln = v&lt;/SUB&gt;vbeln )&lt;/P&gt;&lt;P&gt;where l~vstel in so_vstel&lt;/P&gt;&lt;P&gt;and l~vkorg in so_vkorg&lt;/P&gt;&lt;P&gt;and l~wadat in so_wadat&lt;/P&gt;&lt;P&gt;and l~route in so_route&lt;/P&gt;&lt;P&gt;and l~kunnr in so_wempf&lt;/P&gt;&lt;P&gt;and l~wadat_ist in so_udate&lt;/P&gt;&lt;P&gt;and l~werks in so_werks&lt;/P&gt;&lt;P&gt;and v~parvw in so_parvw&lt;/P&gt;&lt;P&gt;and v~kunnr in so_parnr&lt;/P&gt;&lt;P&gt;and v~land1 in so_land1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;select vbeln vkorg kunnr zukrl werks into table i_likp&lt;/P&gt;&lt;P&gt;from likp &lt;/P&gt;&lt;P&gt;where vstel in so_vstel&lt;/P&gt;&lt;P&gt;and vkorg in so_vkorg&lt;/P&gt;&lt;P&gt;and wadat in so_wadat&lt;/P&gt;&lt;P&gt;and route in so_route&lt;/P&gt;&lt;P&gt;and kunnr in so_wempf&lt;/P&gt;&lt;P&gt;and wadat_ist in so_udate&lt;/P&gt;&lt;P&gt;and werks in so_werks.&lt;/P&gt;&lt;P&gt;if not i_likp[] is initial.&lt;/P&gt;&lt;P&gt;select Vbeln kunnr parvw into i_vbpa from vbpa&lt;/P&gt;&lt;P&gt;for all entries in i_likp&lt;/P&gt;&lt;P&gt;where&lt;/P&gt;&lt;P&gt;vbeln = i_likp-vbeln and&lt;/P&gt;&lt;P&gt;and parvw in so_parvw&lt;/P&gt;&lt;P&gt;and kunnr in so_parnr&lt;/P&gt;&lt;P&gt;and land1 in so_land1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Oct 2007 08:22:04 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-25T08:22:04Z</dc:date>
    <item>
      <title>Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2982953#M704293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can we improve performance by using simple queries instead of inner joins?&lt;/P&gt;&lt;P&gt;I have one query&lt;/P&gt;&lt;P&gt;select l&lt;SUB&gt;vbeln l&lt;/SUB&gt;vkorg l&lt;SUB&gt;kunnr l&lt;/SUB&gt;zukrl l~werks into table i_vbeln&lt;/P&gt;&lt;P&gt;          from ( likp as l inner join vbpa as v&lt;/P&gt;&lt;P&gt;                 on  l&lt;SUB&gt;mandt = v&lt;/SUB&gt;mandt&lt;/P&gt;&lt;P&gt;                 and l&lt;SUB&gt;vbeln = v&lt;/SUB&gt;vbeln )&lt;/P&gt;&lt;P&gt;          where  l~mandt    = sy-mandt&lt;/P&gt;&lt;P&gt;          and    l~vstel   in so_vstel&lt;/P&gt;&lt;P&gt;          and    l~vkorg   in so_vkorg&lt;/P&gt;&lt;P&gt;          and    l~wadat   in so_wadat&lt;/P&gt;&lt;P&gt;          and    l~route   in so_route&lt;/P&gt;&lt;P&gt;          and    l~kunnr   in so_wempf&lt;/P&gt;&lt;P&gt;          and    l~wadat_ist in so_udate&lt;/P&gt;&lt;P&gt;          and    l~werks   in so_werks&lt;/P&gt;&lt;P&gt;          and    v~parvw   in so_parvw&lt;/P&gt;&lt;P&gt;          and    v~kunnr   in so_parnr&lt;/P&gt;&lt;P&gt;          and    v~land1   in so_land1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can we modify it to improve th efficiency?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2007 08:02:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2982953#M704293</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-25T08:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2982954#M704294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi mahendra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;no  its not possible to use simple select statement as we have to use inner joins to improve its effieciency as when u r working on DEVELOPMENT SERVER it will work fine(simple select statements) as dere is less less amount of data but when we want to execute on PRODUCTION SERVER OR MAIN SERVER ,its efficiency will lead go down as dere will be more amount  of data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so ,for dis reason i suggest u to use inner joins insted of simple select statements.&lt;/P&gt;&lt;P&gt;on more thing ,try to use maximum of 3 inner joins as in 1 select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if u find it useful.plzzzzz do give points toooo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;ric.s&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2007 08:08:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2982954#M704294</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-25T08:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2982955#M704295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mahendra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; if you want to improve the performance, first you retrive data from likp and then retrive data from vbpa using for all entries in likp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points for helpful answers&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2007 08:19:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2982955#M704295</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-25T08:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2982956#M704296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;select l&lt;SUB&gt;vbeln l&lt;/SUB&gt;vkorg l&lt;SUB&gt;kunnr l&lt;/SUB&gt;zukrl l~werks into table i_vbeln&lt;/P&gt;&lt;P&gt;from ( likp as l inner join vbpa as v&lt;/P&gt;&lt;P&gt;on l&lt;SUB&gt;vbeln = v&lt;/SUB&gt;vbeln )&lt;/P&gt;&lt;P&gt;where l~vstel in so_vstel&lt;/P&gt;&lt;P&gt;and l~vkorg in so_vkorg&lt;/P&gt;&lt;P&gt;and l~wadat in so_wadat&lt;/P&gt;&lt;P&gt;and l~route in so_route&lt;/P&gt;&lt;P&gt;and l~kunnr in so_wempf&lt;/P&gt;&lt;P&gt;and l~wadat_ist in so_udate&lt;/P&gt;&lt;P&gt;and l~werks in so_werks&lt;/P&gt;&lt;P&gt;and v~parvw in so_parvw&lt;/P&gt;&lt;P&gt;and v~kunnr in so_parnr&lt;/P&gt;&lt;P&gt;and v~land1 in so_land1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;select vbeln vkorg kunnr zukrl werks into table i_likp&lt;/P&gt;&lt;P&gt;from likp &lt;/P&gt;&lt;P&gt;where vstel in so_vstel&lt;/P&gt;&lt;P&gt;and vkorg in so_vkorg&lt;/P&gt;&lt;P&gt;and wadat in so_wadat&lt;/P&gt;&lt;P&gt;and route in so_route&lt;/P&gt;&lt;P&gt;and kunnr in so_wempf&lt;/P&gt;&lt;P&gt;and wadat_ist in so_udate&lt;/P&gt;&lt;P&gt;and werks in so_werks.&lt;/P&gt;&lt;P&gt;if not i_likp[] is initial.&lt;/P&gt;&lt;P&gt;select Vbeln kunnr parvw into i_vbpa from vbpa&lt;/P&gt;&lt;P&gt;for all entries in i_likp&lt;/P&gt;&lt;P&gt;where&lt;/P&gt;&lt;P&gt;vbeln = i_likp-vbeln and&lt;/P&gt;&lt;P&gt;and parvw in so_parvw&lt;/P&gt;&lt;P&gt;and kunnr in so_parnr&lt;/P&gt;&lt;P&gt;and land1 in so_land1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2007 08:22:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2982956#M704296</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-25T08:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2982957#M704297</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;   To improve the performance first retrive the data from lips table and&lt;/P&gt;&lt;P&gt;then retrive data from vbpa table using for all entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2007 08:24:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2982957#M704297</guid>
      <dc:creator>former_member386202</dc:creator>
      <dc:date>2007-10-25T08:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2982958#M704298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mahendra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, we can improve the performance by using FOR ALL ENTRIES instead of INNER JOINS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Modify form of your query for the improve efficiency is as follow:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT VBELN MANDT&lt;/P&gt;&lt;P&gt;       FROM VBAP&lt;/P&gt;&lt;P&gt;       INTO CORRESPONDING FIELDS OF TABLE ITAB1&lt;/P&gt;&lt;P&gt;       WHERE MANDT = SY-MANDT&lt;/P&gt;&lt;P&gt;          AND parvw in so_parvw&lt;/P&gt;&lt;P&gt;          and kunnr in so_parnr&lt;/P&gt;&lt;P&gt;          and land1 in so_land1.&lt;/P&gt;&lt;P&gt;       &lt;/P&gt;&lt;P&gt;SELECT VBELN&lt;/P&gt;&lt;P&gt;       VKORG&lt;/P&gt;&lt;P&gt;       KUNNR&lt;/P&gt;&lt;P&gt;       ZUKRL&lt;/P&gt;&lt;P&gt;       WERKS&lt;/P&gt;&lt;P&gt;       FROM LIKP&lt;/P&gt;&lt;P&gt;       INTO CORRESPONDING FIELDS OF TABLE ITAB2&lt;/P&gt;&lt;P&gt;       FOR ALL ENTRIES IN ITAB1&lt;/P&gt;&lt;P&gt;       WHERE VBELN = ITAB1-VBELN&lt;/P&gt;&lt;P&gt;         AND MANDT = ITAB1-MANDT&lt;/P&gt;&lt;P&gt;         AND vstel in so_vstel&lt;/P&gt;&lt;P&gt;         and vkorg in so_vkorg&lt;/P&gt;&lt;P&gt;         and wadat in so_wadat&lt;/P&gt;&lt;P&gt;         and route in so_route&lt;/P&gt;&lt;P&gt;         and kunnr in so_wempf&lt;/P&gt;&lt;P&gt;         and wadat_ist in so_udate&lt;/P&gt;&lt;P&gt;         and werks in so_werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Reward if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shilpi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2007 08:43:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/2982958#M704298</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-25T08:43:27Z</dc:date>
    </item>
  </channel>
</rss>

