<?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 query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246442#M1527043</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;  Thanks. The issue is fixed. The problem was not in the query but in structure of it_join where the field name didnt match with the query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sridevi S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Sep 2010 05:33:50 GMT</pubDate>
    <dc:creator>former_member671009</dc:creator>
    <dc:date>2010-09-23T05:33:50Z</dc:date>
    <item>
      <title>Left outer join query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246428#M1527029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    I am facing a problem with left outer join query. Am using one standard table and ztable for this join. My problem is values are not extracted from the Ztable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Query:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
      SELECT  b~lifnr b~belnr b~gjahr b~xblnr b~shkzg b~blart b~zfbdt b~budat b~wrbtr
         b~wskto b~zlspr s~EXTRACT_STATUS s~maturity_date FROM bsik AS b
         LEFT OUTER JOIN zprm_rvne_sapdoc AS s
         ON s~belnr  EQ  b~belnr
         AND s~gjahr EQ b~gjahr
         INTO CORRESPONDING FIELDS OF TABLE it_join
            WHERE b~zlsch = p_zlsch
            AND b~xblnr IN so_invno
            ORDER BY b~lifnr b~xblnr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have all entries of BSIK table in Ztable with extract status as Y but this query is not fetching extract status and maturity date of ztable so it is blank in the internal table.&lt;/P&gt;&lt;P&gt;Need solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sridevi S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Sep 2010 04:47:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246428#M1527029</guid>
      <dc:creator>former_member671009</dc:creator>
      <dc:date>2010-09-22T04:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: Left outer join query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246429#M1527030</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 querry is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think in the custom table matched records are not found so only you are not getting records.&lt;/P&gt;&lt;P&gt;In this querry in where condition is not satisfying so you are getting zero records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to comment where condition and the check out the result then uncommnet one by one and see the result .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pravin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Sep 2010 06:10:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246429#M1527030</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-22T06:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: Left outer join query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246430#M1527031</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;Check if in the Z table, you are storing in internal format or external format for BELNR.  If in the Z table, it is in external format, query will not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sujay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Sep 2010 06:34:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246430#M1527031</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-22T06:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: Left outer join query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246431#M1527032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sujay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Can u clearly explain me what is this internal format and external format and how to check this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sridevi S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Sep 2010 06:48:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246431#M1527032</guid>
      <dc:creator>former_member671009</dc:creator>
      <dc:date>2010-09-22T06:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: Left outer join query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246432#M1527033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;are you really sure fieldnames in your ZTABLE and in the structure you want to select into are equal?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Sep 2010 06:51:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246432#M1527033</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-22T06:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: Left outer join query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246433#M1527034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For &lt;STRONG&gt;LEFT OUTER JOIN&lt;/STRONG&gt; all records from table B are extracted even no corresponding records from table S are found. So when for given key there is no record in S, you will have these fields left empty (in internal table), although the B table-related fields are filled correctly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to extract only matching records use &lt;STRONG&gt;INNER JOIN&lt;/STRONG&gt; instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Sep 2010 06:53:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246433#M1527034</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-09-22T06:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: Left outer join query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246434#M1527035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yeah my Ztable has the values(belnr) similiar to bsik table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to use left outer join only. Even if the records doesnt exist in Ztable i want the records from BSIK table.&lt;/P&gt;&lt;P&gt;My problem is for the existing record in Ztable the field am fetching from Ztable(extract_status) is coming as empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sridevi Sivanandam on Sep 22, 2010 8:55 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Sep 2010 06:54:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246434#M1527035</guid>
      <dc:creator>former_member671009</dc:creator>
      <dc:date>2010-09-22T06:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: Left outer join query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246435#M1527036</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;While checking if the Z table has correct entries in SE16, Don't check "Check conversion exits" in the settings -&amp;gt; user parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sujay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Sep 2010 06:59:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246435#M1527036</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-22T06:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: Left outer join query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246436#M1527037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried checking and unchecking the conversion exits but still its not fetching the value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sridevi Sivanandam on Sep 22, 2010 9:52 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Sep 2010 07:04:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246436#M1527037</guid>
      <dc:creator>former_member671009</dc:creator>
      <dc:date>2010-09-22T07:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: Left outer join query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246437#M1527038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do we need to maintain any settings in the table for performing join query&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Sep 2010 08:58:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246437#M1527038</guid>
      <dc:creator>former_member671009</dc:creator>
      <dc:date>2010-09-22T08:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: Left outer join query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246438#M1527039</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;see the sample wiki for writing the Left outer join &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://wiki.sdn.sap.com/wiki/display/Snippets/Employee" target="test_blank"&gt;http://wiki.sdn.sap.com/wiki/display/Snippets/Employee&lt;/A&gt;&lt;EM&gt;Infotype&lt;/EM&gt;0000&lt;EM&gt;to&lt;/EM&gt;9999&lt;EM&gt;Change&lt;/EM&gt;History&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Specifying Two or More Database Tables as a Left Outer Join&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The left outer join, on the other hand, reads lines from the left-hand database table or join even if there is no corresponding line in the right-hand table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT... &lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;  FROM &amp;lt;tab&amp;gt; LEFT [OUTER] JOIN &amp;lt;dbtab&amp;gt; [AS &amp;lt;alias&amp;gt;] ON &amp;lt;cond&amp;gt; &lt;/P&gt;&lt;P&gt;       &amp;lt;options&amp;gt; &lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;tab&amp;gt; and &amp;lt;dbtab&amp;gt; are subject to the same rules and conditions as in an inner join. The OUTER addition is optional. The tables are linked in the same way as the inner join with the one exception that all lines selected from &amp;lt;tab&amp;gt; are included in the final selection. If &amp;lt;dbtab&amp;gt; does not contain any lines that meet the condition &amp;lt;cond&amp;gt;, the system includes a single line in the selection whose columns from &amp;lt;dbtab&amp;gt; are filled with null values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the left outer join, more restrictions apply to the condition &amp;lt;cond&amp;gt; than in the inner join. In addition to the above restrictions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EQ or = is the only permitted relational operator. &lt;/P&gt;&lt;P&gt;There must be at least one comparison between columns from &amp;lt;tab&amp;gt; and &amp;lt;dbtab&amp;gt;. &lt;/P&gt;&lt;P&gt;The WHERE clause may not contain any comparisons with columns from &amp;lt;dbtab&amp;gt;. All comparisons using columns from &amp;lt;dbtab&amp;gt; must appear in the condition &amp;lt;cond&amp;gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we have two tables named stud1,stud2 with the following data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stud1: id Name stud2: id Name&lt;/P&gt;&lt;P&gt;1 xxx 1 aaa&lt;/P&gt;&lt;P&gt;2 yyy 2 bbb&lt;/P&gt;&lt;P&gt;3 zzz 4 ccc&lt;/P&gt;&lt;P&gt;4 www 6 ddd&lt;/P&gt;&lt;P&gt;When we use Left Outer Join we get the output as:&lt;/P&gt;&lt;P&gt;1 aaa&lt;/P&gt;&lt;P&gt;2 bbb&lt;/P&gt;&lt;P&gt;3 &amp;lt;Null&amp;gt;&lt;/P&gt;&lt;P&gt;4 ccc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When we use Right Outer Join we get the output as:&lt;/P&gt;&lt;P&gt;1 aaa&lt;/P&gt;&lt;P&gt;2 bbb&lt;/P&gt;&lt;P&gt;4 ccc&lt;/P&gt;&lt;P&gt;&amp;lt;Null&amp;gt; ddd&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When we use Full Outer Join we get the output as:&lt;/P&gt;&lt;P&gt;1 aaa&lt;/P&gt;&lt;P&gt;2 bbb&lt;/P&gt;&lt;P&gt;3 &amp;lt;Null&amp;gt;&lt;/P&gt;&lt;P&gt;4 ccc&lt;/P&gt;&lt;P&gt;&amp;lt;Null&amp;gt; ddd&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prabhudas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Sep 2010 09:09:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246438#M1527039</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-22T09:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: Left outer join query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246439#M1527040</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;I tested your query using tables BSIK and BKPF and it is picking data correctly. There is issue in the way BELNR is stored in your Z TABLE.  As we explained, check if the value in your BELNR field in the Z table has internal / external format. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sujay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Sep 2010 09:21:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246439#M1527040</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-22T09:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Left outer join query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246440#M1527041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The field conversion exists checkbox is unchecked in my case. But still am not getting values from the ztable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Sep 2010 09:34:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246440#M1527041</guid>
      <dc:creator>former_member671009</dc:creator>
      <dc:date>2010-09-22T09:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: Left outer join query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246441#M1527042</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;There's nothing wrong with the select query. Maybe you do not have matching records in both the standard and the Ztable.&lt;/P&gt;&lt;P&gt;Check once again removing the where conditions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Sep 2010 05:24:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246441#M1527042</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-23T05:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: Left outer join query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246442#M1527043</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;  Thanks. The issue is fixed. The problem was not in the query but in structure of it_join where the field name didnt match with the query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sridevi S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Sep 2010 05:33:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/left-outer-join-query/m-p/7246442#M1527043</guid>
      <dc:creator>former_member671009</dc:creator>
      <dc:date>2010-09-23T05:33:50Z</dc:date>
    </item>
  </channel>
</rss>

