<?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: about outer join in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/about-outer-join/m-p/2312994#M506826</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Join the columns carrid, carrname and connid of the database tables scarr and spfli using an outer join. The column connid is set to the null value for all flights that do not fly from p_cityfr. This null value is then converted to the appropriate initial value when it is transferred to the assigned data object. The LOOP returns all airlines that do not fly from p_cityfr. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS p_cityfr TYPE spfli-cityfrom. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF wa, &lt;/P&gt;&lt;P&gt;        carrid   TYPE scarr-carrid, &lt;/P&gt;&lt;P&gt;        carrname TYPE scarr-carrname, &lt;/P&gt;&lt;P&gt;        connid   TYPE spfli-connid, &lt;/P&gt;&lt;P&gt;      END OF wa, &lt;/P&gt;&lt;P&gt;      itab LIKE SORTED TABLE OF wa &lt;/P&gt;&lt;P&gt;                WITH NON-UNIQUE KEY carrid. &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 &lt;/P&gt;&lt;P&gt;                                  AND p~cityfrom = p_cityfr. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab INTO wa. &lt;/P&gt;&lt;P&gt;  IF wa-connid = '0000'. &lt;/P&gt;&lt;P&gt;    WRITE: / wa-carrid, wa-carrname. &lt;/P&gt;&lt;P&gt;  ENDIF. &lt;/P&gt;&lt;P&gt;ENDLOOP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 May 2007 06:03:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-16T06:03:19Z</dc:date>
    <item>
      <title>about outer join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/about-outer-join/m-p/2312992#M506824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi experts can somebody provide &amp;lt;b&amp;gt;one ex. with coading , how to declare outer join&amp;lt;/b&amp;gt; functionality.&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;regards.&lt;/P&gt;&lt;P&gt;subhasis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2007 05:33:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/about-outer-join/m-p/2312992#M506824</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-16T05:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: about outer join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/about-outer-join/m-p/2312993#M506825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi subhasis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Outer joins basically copnsists of the conpect of union of the set theory . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   here you go with an example from SAP documents :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Join the columns carrid, carrname and connid of the database tables scarr and spfli using an outer join. The column connid is set to the null value for all flights that do not fly from p_cityfr. This null value is then converted to the appropriate initial value when it is transferred to the assigned data object. The LOOP returns all airlines that do not fly from p_cityfr. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS p_cityfr TYPE spfli-cityfrom. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF wa, &lt;/P&gt;&lt;P&gt;        carrid   TYPE scarr-carrid, &lt;/P&gt;&lt;P&gt;        carrname TYPE scarr-carrname, &lt;/P&gt;&lt;P&gt;        connid   TYPE spfli-connid, &lt;/P&gt;&lt;P&gt;      END OF wa, &lt;/P&gt;&lt;P&gt;      itab LIKE SORTED TABLE OF wa &lt;/P&gt;&lt;P&gt;                WITH NON-UNIQUE KEY carrid. &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 &lt;/P&gt;&lt;P&gt;                                  AND p~cityfrom = p_cityfr. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab INTO wa. &lt;/P&gt;&lt;P&gt;  IF wa-connid = '0000'. &lt;/P&gt;&lt;P&gt;    WRITE: / wa-carrid, wa-carrname. &lt;/P&gt;&lt;P&gt;  ENDIF. &lt;/P&gt;&lt;P&gt;ENDLOOP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful !&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ranjita&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2007 05:41:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/about-outer-join/m-p/2312993#M506825</guid>
      <dc:creator>former_member196299</dc:creator>
      <dc:date>2007-05-16T05:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: about outer join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/about-outer-join/m-p/2312994#M506826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Join the columns carrid, carrname and connid of the database tables scarr and spfli using an outer join. The column connid is set to the null value for all flights that do not fly from p_cityfr. This null value is then converted to the appropriate initial value when it is transferred to the assigned data object. The LOOP returns all airlines that do not fly from p_cityfr. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS p_cityfr TYPE spfli-cityfrom. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF wa, &lt;/P&gt;&lt;P&gt;        carrid   TYPE scarr-carrid, &lt;/P&gt;&lt;P&gt;        carrname TYPE scarr-carrname, &lt;/P&gt;&lt;P&gt;        connid   TYPE spfli-connid, &lt;/P&gt;&lt;P&gt;      END OF wa, &lt;/P&gt;&lt;P&gt;      itab LIKE SORTED TABLE OF wa &lt;/P&gt;&lt;P&gt;                WITH NON-UNIQUE KEY carrid. &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 &lt;/P&gt;&lt;P&gt;                                  AND p~cityfrom = p_cityfr. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab INTO wa. &lt;/P&gt;&lt;P&gt;  IF wa-connid = '0000'. &lt;/P&gt;&lt;P&gt;    WRITE: / wa-carrid, wa-carrname. &lt;/P&gt;&lt;P&gt;  ENDIF. &lt;/P&gt;&lt;P&gt;ENDLOOP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2007 06:03:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/about-outer-join/m-p/2312994#M506826</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-16T06:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: about outer join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/about-outer-join/m-p/2312995#M506827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  Z_TEST                  .

TABLES: SCUSTOM, SBOOK.

SELECT SCUSTOM~NAME SCUSTOM~POSTCODE SCUSTOM~CITY
       SBOOK~FLDATE SBOOK~CARRID SBOOK~CONNID SBOOK~BOOKID
       INTO (SCUSTOM-NAME, SCUSTOM-POSTCODE, SCUSTOM-CITY,
             SBOOK-FLDATE, SBOOK-CARRID, SBOOK-CONNID,
             SBOOK-BOOKID)
       FROM SCUSTOM LEFT OUTER JOIN SBOOK
         ON SCUSTOM~ID = SBOOK~CUSTOMID AND
            SBOOK~FLDATE = '19971015'
       ORDER BY SCUSTOM~NAME SBOOK~FLDATE.
  WRITE: / SCUSTOM-NAME, SCUSTOM-POSTCODE, SCUSTOM-CITY,
           SBOOK-FLDATE, SBOOK-CARRID, SBOOK-CONNID,
           SBOOK-BOOKID.
ENDSELECT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also check &amp;lt;a href="http://help.sap.com/saphelp_nw04/helpdata/en/67/7e4b3eaf72561ee10000000a114084/frameset.htm"&amp;gt;http://help.sap.com/saphelp_nw04/helpdata/en/67/7e4b3eaf72561ee10000000a114084/frameset.htm&amp;lt;/a&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Sarath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2007 06:11:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/about-outer-join/m-p/2312995#M506827</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-16T06:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: about outer join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/about-outer-join/m-p/2312996#M506828</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 this simple example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;table name  : &amp;lt;b&amp;gt;emp&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;empno name
a         sasi
b          xxx 
c          yyy&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Outer join&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;*************************&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select e~empno e~name 
s~sal into table  int_table
from emp as e
LEFT OUTER JOIN sal
on 
e~empno = s~empno.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you made outer join (left /right ) the left table kept as it is the &lt;/P&gt;&lt;P&gt;if the condition satisfy the right table entries will fetch else leave it blank&lt;/P&gt;&lt;P&gt;the output will be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;a sasi a 1000
b xxx b 2000
c yyy&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;Reshma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2007 06:14:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/about-outer-join/m-p/2312996#M506828</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-16T06:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: about outer join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/about-outer-join/m-p/2312997#M506829</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 are two ways : 1. outer join with db tab and 2. with itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For db tab:&lt;/P&gt;&lt;P&gt;SELECT - join &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax &lt;/P&gt;&lt;P&gt;... [(] {dbtab_left [AS tabalias_left]} | join &lt;/P&gt;&lt;P&gt;          {[INNER] JOIN}|{LEFT [OUTER] JOIN} &lt;/P&gt;&lt;P&gt;            {dbtab_right [AS tabalias_right] ON join_cond} [)] ...  . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The join syntax represents a recursively nestable join expression. A join expression consists of a left-hand and a right- hand side, which are joined either by means of [INNER] JOIN or LEFT [OUTER] JOIN . Depending on the type of join, a join expression can be either an inner ( INNER) or an outer (LEFT OUTER) join. Every join expression can be enclosed in round brackets. If a join expression is used, the SELECT command circumvents SAP buffering. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g. &lt;/P&gt;&lt;P&gt;SELECT c&lt;SUB&gt;carrname p&lt;/SUB&gt;connid f~fldate &lt;/P&gt;&lt;P&gt;       INTO CORRESPONDING FIELDS OF TABLE itab &lt;/P&gt;&lt;P&gt;       FROM ( ( scarr AS c &lt;/P&gt;&lt;P&gt;         INNER JOIN spfli AS p ON p&lt;SUB&gt;carrid   = c&lt;/SUB&gt;carrid &lt;/P&gt;&lt;P&gt;                              AND p~cityfrom = p_cityfr &lt;/P&gt;&lt;P&gt;                              AND p~cityto   = p_cityto ) &lt;/P&gt;&lt;P&gt;         INNER JOIN sflight AS f ON f&lt;SUB&gt;carrid = p&lt;/SUB&gt;carrid &lt;/P&gt;&lt;P&gt;                                AND f&lt;SUB&gt;connid = p&lt;/SUB&gt;connid ). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Itab.:&lt;/P&gt;&lt;P&gt;SELECT - cond &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax &lt;/P&gt;&lt;P&gt;... [FOR ALL ENTRIES IN itab] WHERE sql_cond ... . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect: &lt;/P&gt;&lt;P&gt;The addition WHERE restricts the number of lines included in the result set by the statement SELECT, by using a logical expression sql_cond. The logical expression compares the content of columns in the database with the content of ABAP data objects, or with the content of other columns. You can use the optional addition FOR ALL ENTRIES to compare the content of a column in the database with a component with all lines of a structured internal table itab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The logical expression sql_cond is either true, false, or unknown. The expression is unknown if one of the columns involved in the database contains a null value and is evaluated with another comparison as IS NULL. A line is only included in the resulting set if the logical expression is true. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Except for columns of type STRING or RAWSTRING, all columns of the database tables or views listed after FROM can be evaluated after the WHERE condition. The columns do not necessarily have to be a part of the resulting set. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jogdand M B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2007 06:15:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/about-outer-join/m-p/2312997#M506829</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-16T06:15:00Z</dc:date>
    </item>
  </channel>
</rss>

