<?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: joins in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1750202#M325270</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sam &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check in the SAP Documentation. You will find a lot of usefull stuff.&lt;/P&gt;&lt;P&gt;Check in transaction ABAPDOCU for sample code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Elan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Dec 2006 05:49:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-15T05:49:56Z</dc:date>
    <item>
      <title>joins</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1750197#M325265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;could you all send me some sample code in ineer join and outer join....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for learning purpose only.......&lt;/P&gt;&lt;P&gt;thanks &amp;amp; regards...&lt;/P&gt;&lt;P&gt;sam.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2006 05:41:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1750197#M325265</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-15T05:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: joins</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1750198#M325266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Chk this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/inner-joins.htm" target="test_blank"&gt;http://www.sap-img.com/abap/inner-joins.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2006 05:45:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1750198#M325266</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-15T05:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: joins</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1750199#M325267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sam&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check this link:&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2788770"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2006 05:46:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1750199#M325267</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-15T05:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: joins</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1750200#M325268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;check this&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/tables/tab_cooiselect.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/tables/tab_cooiselect.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2032412"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="1891279"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2280225"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-charitha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2006 05:48:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1750200#M325268</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-15T05:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: joins</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1750201#M325269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Specifying Two or More Database Tables as an Inner Join&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a relational database, you normally need to read data simultaneously from more than one database table into an application program. You can read from more than one table in a single SELECT statement, such that the data in the tables all has to meet the same conditions, using the following join expression:&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; [INNER] JOIN &amp;lt;dbtab&amp;gt; [AS &amp;lt;alias&amp;gt;] ON &amp;lt;cond&amp;gt; &amp;lt;options&amp;gt; &lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where &amp;lt;dbtab&amp;gt; is a single database table and &amp;lt;tab&amp;gt; is either a table or another join expression. The database tables can be specified statically or dynamically as described above. You may also use aliases. You can enclose each join expression in parentheses. The INNER addition is optional.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A join expression links each line of &amp;lt;tab&amp;gt; with the lines in &amp;lt;dbtab&amp;gt; that meet the condition &amp;lt;cond&amp;gt;. This means that there is always one or more lines from the right-hand table that is linked to each line from the left-hand table by the join. If &amp;lt;dbtab&amp;gt; does not contain any lines that meet the condition &amp;lt;cond&amp;gt;, the line from &amp;lt;tab&amp;gt; is not included in the selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The syntax of the &amp;lt;cond&amp;gt; condition is like that of the WHERE clause, although individual comparisons can only be linked using AND. Furthermore, each comparison must contain a column from the right-hand table &amp;lt;dbtab&amp;gt;. It does not matter on which side of the comparison it occurs. For the column names in the comparison, you can use the same names that occur in the SELECT clause, to differentiate columns from different database tables that have the same names. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The comparisons in the condition &amp;lt;cond&amp;gt; can appear in the WHERE clause instead of the ON clause, since both clauses are applied equally to the temporary table containing all of the lines resulting from the join. However, each join must contain at least one comparison 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;SELECT  p&lt;SUB&gt;carrid p&lt;/SUB&gt;connid f&lt;SUB&gt;fldate b&lt;/SUB&gt;bookid&lt;/P&gt;&lt;P&gt;  INTO  CORRESPONDING FIELDS OF TABLE itab&lt;/P&gt;&lt;P&gt;  FROM  ( ( spfli AS p&lt;/P&gt;&lt;P&gt;            INNER JOIN sflight AS f ON p&lt;SUB&gt;carrid = f&lt;/SUB&gt;carrid AND&lt;/P&gt;&lt;P&gt;                                       p&lt;SUB&gt;connid = f&lt;/SUB&gt;connid    )&lt;/P&gt;&lt;P&gt;            INNER JOIN sbook   AS b ON b&lt;SUB&gt;carrid = f&lt;/SUB&gt;carrid AND&lt;/P&gt;&lt;P&gt;                                       b&lt;SUB&gt;connid = f&lt;/SUB&gt;connid AND&lt;/P&gt;&lt;P&gt;                                       b&lt;SUB&gt;fldate = f&lt;/SUB&gt;fldate     )&lt;/P&gt;&lt;P&gt;  WHERE p~cityfrom = 'FRANKFURT' AND&lt;/P&gt;&lt;P&gt;        p~cityto   = 'NEW YORK'  AND&lt;/P&gt;&lt;P&gt;        f&lt;SUB&gt;seatsmax &amp;gt; f&lt;/SUB&gt;seatsocc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Specifying Two or More Database Tables as a Left Outer Join&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In an inner join, a line from the left-hand database table or join is only included in the selection if there is one or more lines in the right-hand database table that meet the ON condition &amp;lt;cond&amp;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;SELECT s&lt;SUB&gt;carrid s&lt;/SUB&gt;carrname p~connid&lt;/P&gt;&lt;P&gt;  INTO CORRESPONDING FIELDS OF TABLE itab&lt;/P&gt;&lt;P&gt;  FROM scarr AS s&lt;/P&gt;&lt;P&gt;       LEFT OUTER JOIN spfli AS p ON s&lt;SUB&gt;carrid   =  p&lt;/SUB&gt;carrid AND&lt;/P&gt;&lt;P&gt;                                     p~cityfrom = 'FRANKFURT'.&lt;/P&gt;&lt;P&gt;&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;Vara&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2006 05:49:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1750201#M325269</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-15T05:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: joins</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1750202#M325270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sam &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check in the SAP Documentation. You will find a lot of usefull stuff.&lt;/P&gt;&lt;P&gt;Check in transaction ABAPDOCU for sample code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Elan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2006 05:49:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1750202#M325270</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-15T05:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: joins</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1750203#M325271</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;sample code for inner join is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT MKPF&lt;SUB&gt;BUDAT MKPF&lt;/SUB&gt;CPUTM &lt;/P&gt;&lt;P&gt;     MSEG&lt;SUB&gt;MATNR MSEG&lt;/SUB&gt;WERKS MSEG~EBELN  &lt;/P&gt;&lt;P&gt;      MSEG&lt;SUB&gt;EBELP  MSEG&lt;/SUB&gt;ERFMG &lt;/P&gt;&lt;P&gt;           INTO CORRESPONDING FIELDS OF TABLE  &lt;/P&gt;&lt;P&gt;           W_DTL_INVOICE &lt;/P&gt;&lt;P&gt;           FROM MKPF INNER JOIN MSEG &lt;/P&gt;&lt;P&gt;                  ON  MKPF&lt;SUB&gt;MBLNR = MSEG&lt;/SUB&gt;MBLNR &lt;/P&gt;&lt;P&gt;                  AND MKPF&lt;SUB&gt;MJAHR = MSEG&lt;/SUB&gt;MJAHR &lt;/P&gt;&lt;P&gt;           WHERE MKPF~BUDAT &amp;gt; '20040721' AND &lt;/P&gt;&lt;P&gt;                 MSEG~BWART = '101'       AND &lt;/P&gt;&lt;P&gt;                 MSEG~BUKRS = '1733'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for outer join : same code, replace the INNER JOIN with OUTER JOIN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the below link for more help:&lt;/P&gt;&lt;P&gt;&amp;lt;a href="http://help.sap.com/saphelp_erp2004/helpdata/en/67/7e4b3eaf72561ee10000000a114084/content.htm"&amp;gt;http://help.sap.com/saphelp_erp2004/helpdata/en/67/7e4b3eaf72561ee10000000a114084/content.htm&amp;lt;/a&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2006 05:50:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1750203#M325271</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-15T05:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: joins</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1750204#M325272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Inner join:it ill work like intersection (it will take the common records based on the 'on condition').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Outer join : ill work as a union.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select fields &lt;/P&gt;&lt;P&gt;          into table iternal table &lt;/P&gt;&lt;P&gt;          from dbtabname innerjoin dbtabname1 &lt;/P&gt;&lt;P&gt;          on condition &lt;/P&gt;&lt;P&gt;          where condition (depending upon the requirement)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   select vbak&lt;SUB&gt;vbeln vbak&lt;/SUB&gt;ernam vbak&lt;SUB&gt;erdat kna1&lt;/SUB&gt;name1 into table itab&lt;/P&gt;&lt;P&gt;  from vbak inner join kna1 on vbak&lt;SUB&gt;kunnr = kna1&lt;/SUB&gt;kunnr where vbak~erdat&lt;/P&gt;&lt;P&gt;    ge date-low ."and vbak~erdat le date-high.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; select mbew&lt;SUB&gt;bwkey mara&lt;/SUB&gt;matnr makt&lt;SUB&gt;maktx marm&lt;/SUB&gt;laeng marm&lt;SUB&gt;hoehe marm&lt;/SUB&gt;volum&lt;/P&gt;&lt;P&gt; marm&lt;SUB&gt;voleh marm&lt;/SUB&gt;brgew marm~gewei&lt;/P&gt;&lt;P&gt; into CORRESPONDING FIELDS OF table itab&lt;/P&gt;&lt;P&gt; from mbew&lt;/P&gt;&lt;P&gt; inner join mara on mbew&lt;SUB&gt;matnr = mara&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt; inner join makt on mara&lt;SUB&gt;matnr = makt&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt; inner join marm on makt&lt;SUB&gt;matnr = marm&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt; where mbew~bwkey = p_key and spras = 'EN'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2006 06:05:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joins/m-p/1750204#M325272</guid>
      <dc:creator>former_member842213</dc:creator>
      <dc:date>2006-12-15T06:05:59Z</dc:date>
    </item>
  </channel>
</rss>

