<?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: Help with INNER JOIN in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-inner-join/m-p/1636942#M283948</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also, your last join:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    LEFT OUTER JOIN eban AS d
      ON a~ebeln EQ d~ebeln
      AND a~ebelp EQ d~ebelp
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;doesn't use an index. Remove this and see if it speeds things up. If it does, see if there's another way to get this data.&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 Sep 2006 18:48:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-15T18:48:45Z</dc:date>
    <item>
      <title>Help with INNER JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-inner-join/m-p/1636940#M283946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following code takes a lot of time to execute. Can anyone suggest to fine tune the following inner join statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT a&lt;SUB&gt;ebeln a&lt;/SUB&gt;ebelp a&lt;SUB&gt;txz01 a&lt;/SUB&gt;matnr a~werks&lt;/P&gt;&lt;P&gt;           a&lt;SUB&gt;lgort a&lt;/SUB&gt;menge a&lt;SUB&gt;meins a&lt;/SUB&gt;netpr a~peinh&lt;/P&gt;&lt;P&gt;           a&lt;SUB&gt;webaz a&lt;/SUB&gt;insmk a&lt;SUB&gt;pstyp a&lt;/SUB&gt;knttp a~labnr&lt;/P&gt;&lt;P&gt;           a&lt;SUB&gt;konnr a&lt;/SUB&gt;ktpnr a&lt;SUB&gt;evers a&lt;/SUB&gt;kunnr a~adrnr&lt;/P&gt;&lt;P&gt;           a&lt;SUB&gt;revlv a&lt;/SUB&gt;emlif a&lt;SUB&gt;adrn2 a&lt;/SUB&gt;mtart a&lt;SUB&gt;elikz a&lt;/SUB&gt;retpo&lt;/P&gt;&lt;P&gt;           b&lt;SUB&gt;lifnr b&lt;/SUB&gt;ekgrp b&lt;SUB&gt;waers b&lt;/SUB&gt;bedat b~inco1&lt;/P&gt;&lt;P&gt;           b&lt;SUB&gt;inco2 c&lt;/SUB&gt;etenr c&lt;SUB&gt;eindt c&lt;/SUB&gt;slfdt c~menge &lt;/P&gt;&lt;P&gt;           c&lt;SUB&gt;wemng d&lt;/SUB&gt;banfn d~bnfpo         &lt;/P&gt;&lt;P&gt;      INTO TABLE t_po&lt;/P&gt;&lt;P&gt;      FROM ekko AS b&lt;/P&gt;&lt;P&gt;     INNER JOIN ekpo AS a&lt;/P&gt;&lt;P&gt;        ON a&lt;SUB&gt;ebeln EQ b&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt;     INNER JOIN eket AS c&lt;/P&gt;&lt;P&gt;        ON c&lt;SUB&gt;ebeln EQ a&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt;       AND c&lt;SUB&gt;ebelp EQ a&lt;/SUB&gt;ebelp&lt;/P&gt;&lt;P&gt;     LEFT OUTER JOIN eban AS d&lt;/P&gt;&lt;P&gt;       ON a&lt;SUB&gt;ebeln EQ d&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt;      AND a&lt;SUB&gt;ebelp EQ d&lt;/SUB&gt;ebelp&lt;/P&gt;&lt;P&gt;     WHERE b~ebeln IN s_ebeln       "Purchasing Document&lt;/P&gt;&lt;P&gt;       AND b~bsart IN s_bsart       "Document Type&lt;/P&gt;&lt;P&gt;       AND b~loekz EQ space         "Deletion Indicator, Header&lt;/P&gt;&lt;P&gt;       AND b~lifnr IN s_lifnr       "Vendor Number&lt;/P&gt;&lt;P&gt;       AND b~ekorg IN s_ekorg       "Purchasing Organization&lt;/P&gt;&lt;P&gt;       AND b~ekgrp IN s_ekgrp       "Purchasing Group&lt;/P&gt;&lt;P&gt;       AND b~bedat IN s_bedat       "Document Date&lt;/P&gt;&lt;P&gt;       AND b~bukrs IN s_bukrs                            &lt;/P&gt;&lt;P&gt;       AND a~elikz = space          "delivery not complete&lt;/P&gt;&lt;P&gt;       AND a~loekz EQ space         "Deletion Indicator, Line&lt;/P&gt;&lt;P&gt;       AND a~txz01 IN r_txz01       "Short Text&lt;/P&gt;&lt;P&gt;       AND a~matnr IN s_matnr       "Material Number&lt;/P&gt;&lt;P&gt;       AND a~werks IN s_werks       "Plant&lt;/P&gt;&lt;P&gt;       AND a~lgort IN s_lgort       "Storage Location&lt;/P&gt;&lt;P&gt;       AND a~matkl IN s_matkl       "Material Group&lt;/P&gt;&lt;P&gt;       AND a~idnlf IN s_idnlf       "Vendor's Material Number&lt;/P&gt;&lt;P&gt;       AND a~pstyp IN r_pstyp       "Item Category&lt;/P&gt;&lt;P&gt;       AND a~knttp IN s_knttp       "Account Assign. Category&lt;/P&gt;&lt;P&gt;       AND a~bstae IN s_bstae       "Confirmation Control Key&lt;/P&gt;&lt;P&gt;       AND c~eindt IN s_eindt.      "Item Delivery Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Brain&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Sep 2006 17:35:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-inner-join/m-p/1636940#M283946</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-15T17:35:48Z</dc:date>
    </item>
    <item>
      <title>Re: Help with INNER JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-inner-join/m-p/1636941#M283947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check that s_ebeln is not empty before doing the select.&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 Sep 2006 18:23:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-inner-join/m-p/1636941#M283947</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-15T18:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help with INNER JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-inner-join/m-p/1636942#M283948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also, your last join:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    LEFT OUTER JOIN eban AS d
      ON a~ebeln EQ d~ebeln
      AND a~ebelp EQ d~ebelp
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;doesn't use an index. Remove this and see if it speeds things up. If it does, see if there's another way to get this data.&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 Sep 2006 18:48:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-inner-join/m-p/1636942#M283948</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-15T18:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: Help with INNER JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-inner-join/m-p/1636943#M283949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To follow up on Rob's suggestion, BANFN and BNFPO are on EKPO.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Sep 2006 19:37:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-inner-join/m-p/1636943#M283949</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-15T19:37:59Z</dc:date>
    </item>
  </channel>
</rss>

