<?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: left outer join in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join/m-p/7297453#M1533677</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually your assumption is incorrect. You are allowed multiple left outer joins on an SELECT But you are not allowed to reference the fields on other tables. The error you are getting is because you are trying to JOIN EKBE using a field from EKPO. You have already defined EKPO as a left outer join.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Sep 2010 14:37:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-09-06T14:37:25Z</dc:date>
    <item>
      <title>left outer join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join/m-p/7297451#M1533675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following code doesn't work because you can't have two left outer joins in a single slect statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select ekko~ebeln ekpo~ebelp lifnr ekpo~matnr ekpo~menge ekpo~meins
          ekbe~vgabe budat ekbe~menge as meng1 wrbtr ekbe~waers
  from   ekko left outer join ekpo on ekko~ebeln = ekpo~ebeln 
                     left outer join ekbe on ekbe~ebeln = ekpo~ebeln
                                                and ekbe~ebelp = ekpo~ebelp 
  into corresponding fields of table i_order
  where ekko~ebeln = p_order
  order by ekpo~ebelp.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So how might I easily do this (I can think of a few verbose ways of doing it)? Basically I need to list POs even if there are no items (first outer join), and if there are items but no history (second outer join).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chris.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 14:07:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join/m-p/7297451#M1533675</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-06T14:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: left outer join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join/m-p/7297452#M1533676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use view WB2_V_EKKO_EKPO2 and then directly select the data and then use a for all entries to ekbe.&lt;/P&gt;&lt;P&gt;avoid the joins&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 14:23:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join/m-p/7297452#M1533676</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-09-06T14:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: left outer join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join/m-p/7297453#M1533677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually your assumption is incorrect. You are allowed multiple left outer joins on an SELECT But you are not allowed to reference the fields on other tables. The error you are getting is because you are trying to JOIN EKBE using a field from EKPO. You have already defined EKPO as a left outer join.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 14:37:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join/m-p/7297453#M1533677</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-06T14:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: left outer join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join/m-p/7297454#M1533678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, thanks for that. As you say, it's possible for two or more outer joins, provided a single table does not have an outer join in both directions, so to speak.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Sep 2010 07:57:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join/m-p/7297454#M1533678</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-07T07:57:42Z</dc:date>
    </item>
  </channel>
</rss>

