<?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: Problem with Left Outer Join in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-left-outer-join/m-p/1051826#M89420</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Basically, the inner join will give you a record everytime the join conditions are met.  The outter join fields will be null where the join conditions are not met and populated when they are met.  So if you are not getting a record, then look to the inner join.  If you are getting a record and the outer join fields are null then look into the relationships of the outter join.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Brent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Dec 2005 17:51:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-12-14T17:51:18Z</dc:date>
    <item>
      <title>Problem with Left Outer Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-left-outer-join/m-p/1051823#M89417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm experiencing a problem with my select statement below. I've created a join on 4 tables, namely.&lt;/P&gt;&lt;P&gt;AFKO (Order Hdr), AFPO (Order Itm), QMEL (Qnote), QMFE (Qnote problem codes). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I expect the result to give me all the matching records for QMEL and QMFE on QMNUM (Qnote no) but its only returning one entry of QMFE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions is very much appreciated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZTEST14 .&lt;/P&gt;&lt;P&gt;tables: afko, afpo, qmel, qmfe.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options: sgentr for afko-getri,&lt;/P&gt;&lt;P&gt;                ssernp for afpo-sernp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of stab,&lt;/P&gt;&lt;P&gt;        aufnr type aufnr,&lt;/P&gt;&lt;P&gt;        getri type datum,&lt;/P&gt;&lt;P&gt;        sernp type serail,&lt;/P&gt;&lt;P&gt;        qnote type qmnum,&lt;/P&gt;&lt;P&gt;        fenum type fenum,&lt;/P&gt;&lt;P&gt;      end of stab.&lt;/P&gt;&lt;P&gt;data: itab type table of stab.&lt;/P&gt;&lt;P&gt;refresh: itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT AFKO&lt;SUB&gt;AUFNR AFKO&lt;/SUB&gt;GETRI AFPO&lt;SUB&gt;AUFNR AFPO&lt;/SUB&gt;SERNP  QMEL&lt;SUB&gt;FERTAUFNR QMEL&lt;/SUB&gt;QMNUM QMFE&lt;SUB&gt;FENUM QMFE&lt;/SUB&gt;QMNUM&lt;/P&gt;&lt;P&gt;INTO (AFKO-AUFNR , AFKO-GETRI , AFPO-AUFNR , AFPO-SERNP&lt;/P&gt;&lt;P&gt;     , QMEL-FERTAUFNR , QMEL-QMNUM , QMFE-FENUM , QMFE-QMNUM )&lt;/P&gt;&lt;P&gt;FROM ( AFKO&lt;/P&gt;&lt;P&gt;       INNER JOIN AFPO&lt;/P&gt;&lt;P&gt;       ON AFPO&lt;SUB&gt;AUFNR = AFKO&lt;/SUB&gt;AUFNR&lt;/P&gt;&lt;P&gt;       LEFT OUTER JOIN QMEL&lt;/P&gt;&lt;P&gt;       ON QMEL&lt;SUB&gt;FERTAUFNR = AFPO&lt;/SUB&gt;AUFNR&lt;/P&gt;&lt;P&gt;       INNER JOIN QMFE&lt;/P&gt;&lt;P&gt;       ON QMFE&lt;SUB&gt;QMNUM = QMEL&lt;/SUB&gt;QMNUM )&lt;/P&gt;&lt;P&gt;       WHERE AFKO~GETRI IN SGENTR&lt;/P&gt;&lt;P&gt;         AND AFPO~SERNP IN SSERNP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write:/1 AFKO-AUFNR , 11 AFKO-GETRI , 22 AFPO-AUFNR , 33 AFPO-SERNP , 44 QMEL-FERTAUFNR , 55 QMEL-QMNUM , 66 QMFE-FENUM , 72 QMFE-QMNUM&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2005 17:30:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-left-outer-join/m-p/1051823#M89417</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-14T17:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Left Outer Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-left-outer-join/m-p/1051824#M89418</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;Please use the following function module by using QMEL-QMNUM this will give all the data you needed. Join may leads to performance related issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'READ_NOTIFICATION'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          QMNUM          = QMEL-QMNUM&lt;/P&gt;&lt;P&gt;          I_VIQMEL       = QMEL&lt;/P&gt;&lt;P&gt;          IV_AKTYP       = 'A'&lt;/P&gt;&lt;P&gt;        TABLES&lt;/P&gt;&lt;P&gt;          IVIQMFE        = IWQMFE&lt;/P&gt;&lt;P&gt;          IVIQMMA        = IWQMMA&lt;/P&gt;&lt;P&gt;          IVIQMSM        = IWQMSM&lt;/P&gt;&lt;P&gt;          IVIQMUR        = IWQMUR&lt;/P&gt;&lt;P&gt;          TRIWO020TAB    = G_RIWO020TAB&lt;/P&gt;&lt;P&gt;        EXCEPTIONS&lt;/P&gt;&lt;P&gt;          INVALID_NUMBER = 1&lt;/P&gt;&lt;P&gt;          OTHERS         = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Need more help on this function let me know.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2005 17:37:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-left-outer-join/m-p/1051824#M89418</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-14T17:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Left Outer Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-left-outer-join/m-p/1051825#M89419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Lanka,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually this join statement was generated by SAP from an Infoset I'm building. I created an SAP Query and was trying to find a solution so I copy and pasted the join and placed it in an abap program to play with it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know if an Inner Join after an Outer Join causes it to become another Inner?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2005 17:43:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-left-outer-join/m-p/1051825#M89419</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-14T17:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Left Outer Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-left-outer-join/m-p/1051826#M89420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Basically, the inner join will give you a record everytime the join conditions are met.  The outter join fields will be null where the join conditions are not met and populated when they are met.  So if you are not getting a record, then look to the inner join.  If you are getting a record and the outer join fields are null then look into the relationships of the outter join.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Brent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2005 17:51:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-left-outer-join/m-p/1051826#M89420</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-14T17:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Left Outer Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-left-outer-join/m-p/1051827#M89421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If ur using 4 tables using a single select statement it will lead to performance problem....so try to combine join 2 tables or 3 tables in an internal table and with this internal table and the other table  use  'select for all entries ' to get ur data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for now u can get easily. but in production you will have huge data. so try to reduce as possible as it is.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2005 18:29:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-left-outer-join/m-p/1051827#M89421</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-14T18:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Left Outer Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-left-outer-join/m-p/1051828#M89422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok. Then try to combine tables .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;USe Views :  CUAFV  (AFKO + AUFK)&lt;/P&gt;&lt;P&gt;             VIQMFEL (QMFE,QMEL,QMIH,ILOA)&lt;/P&gt;&lt;P&gt;             VIQMEL &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because you join really leads to performance problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Lanka Murthy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2005 18:37:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-left-outer-join/m-p/1051828#M89422</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-14T18:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Left Outer Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-left-outer-join/m-p/1051829#M89423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks gentlemen fo rall your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2008 20:46:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-left-outer-join/m-p/1051829#M89423</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-11T20:46:46Z</dc:date>
    </item>
  </channel>
</rss>

