<?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: Inner Join Question in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-question/m-p/1313477#M162765</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your answer is correct, if it is left outer join.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually there is ambiguity in the question..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'Redundant data' Whether  refers to the record extracted from one table even if there is no record in the other table OR is that extracting same details of 1 table for multiple records of the other table??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Vijay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 May 2006 12:39:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-05-17T12:39:35Z</dc:date>
    <item>
      <title>Inner Join Question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-question/m-p/1313472#M162760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am looking at a sample question for the ABAP certification exam.  Either I am reading the question incorrectly, or I missed an important concept.  I'd appreciate someone to check me here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;What happens when a 1 to many relationship is encountered with an inner join?

A.  Redundant data from the right-hand table is included.
B.  Redundant data from either table is not returned to the result set.
C.  Redundant data from the left-hand table is included.
D.  Runtime error.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I chose C, but the answer key says B.  Did I miss an important concept, or is the answer key wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2006 12:32:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-question/m-p/1313472#M162760</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-17T12:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join Question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-question/m-p/1313473#M162761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jerry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With an inner join, you only get the records of the cross-product for which there is an entry in all tables used in the view. So the answer is B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suresh Datti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2006 12:36:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-question/m-p/1313473#M162761</guid>
      <dc:creator>suresh_datti</dc:creator>
      <dc:date>2006-05-17T12:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join Question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-question/m-p/1313474#M162762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;go thru this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;select * FROM tabref1 [INNER] JOIN tabref2 ON cond&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;effect&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data is to be selected from transparent database tables and/or views determined by tabref1 and tabref2. tabref1 and tabref2 each have the same form as in variant 1 or are themselves Join expressions. The keyword INNER does not have to be specified. The database tables or views determined by tabref1 and tabref2 must be recognized by the ABAP Dictionary. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a relational data structure, it is quite normal for data that belongs together to be split up across several tables to help the process of standardization (see relational databases). To regroup this information into a database query, you can link tables using the join command. This formulates conditions for the columns in the tables involved. The inner join contains all combinations of lines from the database table determined by tabref1 with lines from the table determined by tabref2, whose values together meet the logical condition (join condition) specified using ON&amp;gt;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;Inner join between table 1 and table 2, where column D in both tables in the join condition is set the same: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table 1                      Table 2 &lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;HR originaltext="---" /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;HR originaltext="---" /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;HR originaltext="---" /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;HR originaltext="---" /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;HR originaltext="---" /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;HR originaltext="---" /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;HR originaltext="---" /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;HR originaltext="---" /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;HR originaltext="---" /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt; &lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;A&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;B&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;C&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;D&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;D&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;E&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;F&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;G&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;H&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt; &lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;HR originaltext="---" /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;HR originaltext="---" /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;HR originaltext="---" /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;HR originaltext="---" /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;HR originaltext="---" /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;HR originaltext="---" /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;HR originaltext="---" /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;HR originaltext="---" /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;HR originaltext="---" /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt; &lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;a1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;b1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;c1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;e1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;f1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;g1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;h1&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt; &lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;a2&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;b2&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;c2&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;e2&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;f2&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;g2&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;h2&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt; &lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;a3&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;b3&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;c3&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;2&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;e3&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;f3&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;g3&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;h3&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt; &lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;a4&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;b4&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;c4&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;HR originaltext="---" /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;HR originaltext="---" /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;HR originaltext="---" /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;HR originaltext="---" /&gt;&lt;/TD&gt;&lt;TD&gt;&lt;HR originaltext="---" /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;|--&lt;DEL&gt;|&lt;/DEL&gt;&lt;DEL&gt;|&lt;/DEL&gt;&lt;DEL&gt;|&lt;/DEL&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;    Inner Join &lt;/P&gt;&lt;P&gt;    |--&lt;DEL&gt;|&lt;/DEL&gt;&lt;DEL&gt;|&lt;/DEL&gt;&lt;DEL&gt;|&lt;/DEL&gt;&lt;DEL&gt;|&lt;/DEL&gt;&lt;DEL&gt;|&lt;/DEL&gt;&lt;DEL&gt;|&lt;/DEL&gt;&lt;DEL&gt;|&lt;/DEL&gt;&lt;DEL&gt;|&lt;/DEL&gt;--| &lt;/P&gt;&lt;P&gt;    | A  | B  | C  | D  | D  | E  | F  | G  | H  | &lt;/P&gt;&lt;P&gt;    |--&lt;DEL&gt;|&lt;/DEL&gt;&lt;DEL&gt;|&lt;/DEL&gt;&lt;DEL&gt;|&lt;/DEL&gt;&lt;DEL&gt;|&lt;/DEL&gt;&lt;DEL&gt;|&lt;/DEL&gt;&lt;DEL&gt;|&lt;/DEL&gt;&lt;DEL&gt;|&lt;/DEL&gt;&lt;DEL&gt;|&lt;/DEL&gt;--| &lt;/P&gt;&lt;P&gt;    | a1 | b1 | c1 | 1  | 1  | e1 | f1 | g1 | h1 | &lt;/P&gt;&lt;P&gt;    | a2 | b2 | c2 | 1  | 1  | e1 | f1 | g1 | h1 | &lt;/P&gt;&lt;P&gt;    | a4 | b4 | c4 | 3  | 3  | e2 | f2 | g2 | h2 | &lt;/P&gt;&lt;P&gt;    |--&lt;DEL&gt;|&lt;/DEL&gt;&lt;DEL&gt;|&lt;/DEL&gt;&lt;DEL&gt;|&lt;/DEL&gt;&lt;DEL&gt;|&lt;/DEL&gt;&lt;DEL&gt;|&lt;/DEL&gt;&lt;DEL&gt;|&lt;/DEL&gt;&lt;DEL&gt;|&lt;/DEL&gt;&lt;DEL&gt;|&lt;/DEL&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;Example &lt;/P&gt;&lt;P&gt;Output a list of all flights from Frankfurt to New York between September 10th and 20th, 2001 that are not sold out: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: DATE   LIKE SFLIGHT-FLDATE, &lt;/P&gt;&lt;P&gt;      CARRID LIKE SFLIGHT-CARRID, &lt;/P&gt;&lt;P&gt;      CONNID LIKE SFLIGHT-CONNID. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT F&lt;SUB&gt;CARRID F&lt;/SUB&gt;CONNID F~FLDATE &lt;/P&gt;&lt;P&gt;    INTO (CARRID, CONNID, DATE) &lt;/P&gt;&lt;P&gt;    FROM SFLIGHT AS F INNER JOIN SPFLI AS P &lt;/P&gt;&lt;P&gt;           ON F&lt;SUB&gt;CARRID = P&lt;/SUB&gt;CARRID AND &lt;/P&gt;&lt;P&gt;              F&lt;SUB&gt;CONNID = P&lt;/SUB&gt;CONNID &lt;/P&gt;&lt;P&gt;    WHERE P~CITYFROM = 'FRANKFURT' &lt;/P&gt;&lt;P&gt;      AND P~CITYTO   = 'NEW YORK' &lt;/P&gt;&lt;P&gt;      AND F~FLDATE BETWEEN '20010910' AND '20010920' &lt;/P&gt;&lt;P&gt;      AND F&lt;SUB&gt;SEATSOCC &amp;lt; F&lt;/SUB&gt;SEATSMAX. &lt;/P&gt;&lt;P&gt;  WRITE: / DATE, CARRID, CONNID. &lt;/P&gt;&lt;P&gt;ENDSELECT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there are columns with the same name in both tables, you must distinguish between them by prefixing the field descriptor with the table name or a table alias. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;In order to determine the result of a SELECT command where the FROM clause contains a join, the database system first creates a temporary table containing the lines that meet the ON condition. The WHERE condition is then applied to the temporary table. It does not matter in an inner join whether the condition is in the ON or WHEREclause. The following example returns the same solution as the previous one. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Output of a list of all flights from Frankfurt to New York between September 10th and 20th, 2001 that are not sold out: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: DATE   LIKE SFLIGHT-FLDATE, &lt;/P&gt;&lt;P&gt;      CARRID LIKE SFLIGHT-CARRID, &lt;/P&gt;&lt;P&gt;      CONNID LIKE SFLIGHT-CONNID. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT F&lt;SUB&gt;CARRID F&lt;/SUB&gt;CONNID F~FLDATE &lt;/P&gt;&lt;P&gt;    INTO (CARRID, CONNID, DATE) &lt;/P&gt;&lt;P&gt;    FROM SFLIGHT AS F INNER JOIN SPFLI AS P &lt;/P&gt;&lt;P&gt;           ON F&lt;SUB&gt;CARRID = P&lt;/SUB&gt;CARRID &lt;/P&gt;&lt;P&gt;    WHERE F&lt;SUB&gt;CONNID = P&lt;/SUB&gt;CONNID &lt;/P&gt;&lt;P&gt;      AND P~CITYFROM = 'FRANKFURT' &lt;/P&gt;&lt;P&gt;      AND P~CITYTO   = 'NEW YORK' &lt;/P&gt;&lt;P&gt;      AND F~FLDATE BETWEEN '20010910' AND '20010920' &lt;/P&gt;&lt;P&gt;      AND F&lt;SUB&gt;SEATSOCC &amp;lt; F&lt;/SUB&gt;SEATSMAX. &lt;/P&gt;&lt;P&gt;  WRITE: / DATE, CARRID, CONNID. &lt;/P&gt;&lt;P&gt;ENDSELECT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;Since not all of the database systems supported by SAP use the standard syntax for ON conditions, the syntax has been restricted. It only allows those joins that produce the same results on all of the supported database systems: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only a table or view may appear to the right of the JOIN operator, not another join expression. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only AND is possible in the ON condition as a logical operator. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each comparison in the ON condition must contain a field from the right-hand table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If an outer join occurs in the FROM clause, all the ON conditions must contain at least one "real" JOIN condition (a condition that contains a field from tabref1 amd a field from tabref2. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;In some cases, '*' may be specified in the SELECT clause, and an internal table or work area is entered into the INTO clause (instead of a list of fields). If so, the fields are written to the target area from left to right in the order in which the tables appear in the FROM clause, according to the structure of each table work area. There can then be gaps between table work areas if you use an Alignment Request. For this reason, you should define the target work area with reference to the types of the database tables, not simply by counting the total number of fields. For an example, see below: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz reward if useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2006 12:37:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-question/m-p/1313474#M162762</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-17T12:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join Question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-question/m-p/1313475#M162763</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;NNER JOIN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One or more lines on the right-hand table is linked to a line in the&lt;/P&gt;&lt;P&gt;left-hand table. Lines from the left-handed table&lt;/P&gt;&lt;P&gt;is only selected if they meet the ON criteria.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                   FROM from vbak as a inner join vbap as b&lt;/P&gt;&lt;P&gt;                             ON b&lt;SUB&gt;vbeln = a&lt;/SUB&gt;vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One or more lines from vbap is selected for each line in vbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Limits on the ON clause:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEFT OUTER JOIN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The left outer join read lines from the left-handed table EVEN if there is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;no corresponding line in the right hand table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                   FROM vbak as a left outer join vbap as b&lt;/P&gt;&lt;P&gt;                             ON b&lt;SUB&gt;vbeln = a&lt;/SUB&gt;vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If  vbap does not contain any lines that meets the condition, a single line&lt;/P&gt;&lt;P&gt;where the values from vbap is filled with null values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT a&lt;SUB&gt;zafstemnr b&lt;/SUB&gt;zafstemnr b~zsaknr                &lt;/P&gt;&lt;P&gt;    INTO CORRESPONDING FIELDS OF TABLE i_tab             &lt;/P&gt;&lt;P&gt;    FROM zcostafstm as a INNER JOIN zcostplan as b       &lt;/P&gt;&lt;P&gt;    ON b&lt;SUB&gt;zafstemnr = a&lt;/SUB&gt;zafstemnr.                        &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT lips&lt;SUB&gt;vbeln lips&lt;/SUB&gt;lfimg likp~wadat &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    INTO corresponding fields of table ltab_orders &lt;/P&gt;&lt;P&gt;    FROM lips JOIN likp on ( lips&lt;SUB&gt;vbeln = likp&lt;/SUB&gt;vbeln ) &lt;/P&gt;&lt;P&gt;                       JOIN vbfa on ( lips&lt;SUB&gt;vbeln = vbfa&lt;/SUB&gt;vbelv ) &lt;/P&gt;&lt;P&gt;   WHERE      lips~matnr = matnr &lt;/P&gt;&lt;P&gt;                      and lips~vbeln in vbeln &lt;/P&gt;&lt;P&gt;                      and likp~vbeln in vbeln &lt;/P&gt;&lt;P&gt;                      and vbfa~vbelv in vbeln &lt;/P&gt;&lt;P&gt;                      and lips~werks in werks &lt;/P&gt;&lt;P&gt;                      and likp~wadat in datum &lt;/P&gt;&lt;P&gt;                      and vbfa~vbtyp_n = 'Q' "WMS transfer order &lt;/P&gt;&lt;P&gt;                     and vbfa~vbtyp_v = 'J'. "Delivery &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From ABAP hints &amp;amp; Tips:  &lt;A href="http://oasis.fortunecity.com/skegness/110/JOIN.html" target="test_blank"&gt;http://oasis.fortunecity.com/skegness/110/JOIN.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2006 12:38:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-question/m-p/1313475#M162763</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-17T12:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join Question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-question/m-p/1313476#M162764</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;That is the correct answer actually. There will be no redundancy if you use innerjoin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For ex: If you join VBAK and VBAP tables there will not be any redundancy. It will fetch exact records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Surya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2006 12:38:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-question/m-p/1313476#M162764</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-17T12:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join Question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-question/m-p/1313477#M162765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your answer is correct, if it is left outer join.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually there is ambiguity in the question..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'Redundant data' Whether  refers to the record extracted from one table even if there is no record in the other table OR is that extracting same details of 1 table for multiple records of the other table??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Vijay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2006 12:39:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-question/m-p/1313477#M162765</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-17T12:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join Question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-question/m-p/1313478#M162766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe it is the terminology they are using.  If I have a table with one row (t005n), and join it using the primary keys to a table with many rows (t005o), aren't the records I get back from the first table redundant?  n~mandt is returned many times, though there is only 1 row in the left table.&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;PRE&gt;&lt;CODE&gt;REPORT  zz_download_table.

TYPES: BEGIN OF type_t005o.
        INCLUDE STRUCTURE t005o.
TYPES: END OF type_t005o.

DATA: g_t_t005o TYPE TABLE OF type_t005o.

FIELD-SYMBOLS &amp;lt;fs&amp;gt; TYPE t005o.

START-OF-SELECTION.
  SELECT n~mandt
         n~land1
         n~nameformat
         o~lfdnr
         o~fieldname
         o~value
         o~fieldconv
  INTO CORRESPONDING FIELDS OF TABLE g_t_t005o
  FROM t005n AS n
           INNER JOIN
       t005o AS o
   ON  n~mandt = o~mandt
   AND n~land1 = o~land1
   AND n~nameformat = o~nameformat
   WHERE n~mandt = '010'
   AND n~land1 = 'DE'
   AND n~nameformat = '01'.

  LOOP AT g_t_t005o ASSIGNING &amp;lt;fs&amp;gt;.
    WRITE:/ &amp;lt;fs&amp;gt;-mandt,
            &amp;lt;fs&amp;gt;-land1,
            &amp;lt;fs&amp;gt;-nameformat,
            &amp;lt;fs&amp;gt;-lfdnr.
  ENDLOOP.

010 DE  01 01 
010 DE  01 02 
010 DE  01 03 
010 DE  01 04 

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2006 12:46:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-question/m-p/1313478#M162766</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-17T12:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join Question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-question/m-p/1313479#M162767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The answer is B, redundant data is returned only when we use outer joins... no redundant data is displayed during inner join&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select scustom~name scustom~city  		                                               sbook~carrid sbook~bookid 
	  into (scustom-name, scustom-city,
	        sbook-bookid, sbook-carrid)
	  from scustom left outer join sbook  
	  on scustom~id    = sbook~customid and 
	        sbook~fldate = '19971015&amp;#146;.                       
    	           write:/ scustom-name,scustom-ity,
		          sbook-carrid,sbook-bookid.  
		clear: scustom,sbook.                                  
    endselect..&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the code above redundant data from sbook is also returned&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refer to this thread&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2006 12:50:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-question/m-p/1313479#M162767</guid>
      <dc:creator>rahulkavuri</dc:creator>
      <dc:date>2006-05-17T12:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join Question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-question/m-p/1313480#M162768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know this is an old thread, but there is no way the answer to the question is "B".  &lt;STRONG&gt;The answer to this question is without a doubt "C: Redundant data from the left-hand table is included.".&lt;/STRONG&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From reading the other replies, I can only assume that there was some sort of misunderstanding of the term "Redundant data."  In the context of this particular inner join question, redundant data refers to repeated field values and has nothing to do with how many records are returned.  When you have a 1:N relationship (e.g. 1 header record may have zero to many line item records; think VBAK and VBAP) clearly you will get repeated field values from the left-hand table (a.k.a. superior table) when there are more than one corresponding records in the right-hand table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take a look at this example and ask yourself if the VBAK &lt;STRONG&gt;fields&lt;/STRONG&gt; are considered to be &lt;STRONG&gt;redundant&lt;/STRONG&gt; (meaning repeated):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
VBAK-VBELN     VBAK-ERDAT    VBAK-VBTYP     VBAP-POSNR     VBAP-MATNR
12345          20090101      XYZ             10            MAT123
12345          20090101      XYZ             20            MAT456
12345          20090101      XYZ             30            MAT789
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Because there is only 1 VBAK header record in this example but 3 VBAP item records, all of the VBAK header fields are repeated.  Therefore, I refer you back to answer "C".  Furthermore, since there is redundant data in this 1 to many inner join example (i.e. the repeated VBAK fields) answer "B" is not possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way, I have seen this exact same question in other sample exams where the given correct answer is that there is redudant data from the left-hand table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Jamie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2009 19:11:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-question/m-p/1313480#M162768</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-18T19:11:21Z</dc:date>
    </item>
  </channel>
</rss>

