<?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 Inner Join in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/7434372#M1550784</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;&lt;/P&gt;&lt;P&gt;I have recently came across this statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select t001w&lt;SUB&gt;werks t001w&lt;/SUB&gt;ekorg t001w~vlfkz &lt;/P&gt;&lt;P&gt;        from ( t001w inner join t024w on t024w&lt;SUB&gt;werks = t001w&lt;/SUB&gt;werks )&lt;/P&gt;&lt;P&gt;        into table lt_t001w&lt;/P&gt;&lt;P&gt;        where t001w~vlfkz in lr_vlfkz and&lt;/P&gt;&lt;P&gt;                    t001w~ekorg in lr_ekorg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically in T024W, I have 25 entries of WERKS of different EKORG and in T001W, i have 13 entries of WERKS of EKORG = 1001 and VLFKZ = A.  When running the statement above with the condition 1001 in LR_EKORG  and A in LR_VLFKZ repectively, I get all 25 entries with those WERKS which is not originally EKORG = 1001 in T024W becomes 1001 in the output result. I couldn't put my fingers together for this...anyone can help me here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message: please use more descriptive subject lines when starting a thread.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Thomas Zloch on Nov 22, 2010 4:33 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Nov 2010 14:50:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-11-22T14:50:50Z</dc:date>
    <item>
      <title>Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/7434372#M1550784</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;&lt;/P&gt;&lt;P&gt;I have recently came across this statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select t001w&lt;SUB&gt;werks t001w&lt;/SUB&gt;ekorg t001w~vlfkz &lt;/P&gt;&lt;P&gt;        from ( t001w inner join t024w on t024w&lt;SUB&gt;werks = t001w&lt;/SUB&gt;werks )&lt;/P&gt;&lt;P&gt;        into table lt_t001w&lt;/P&gt;&lt;P&gt;        where t001w~vlfkz in lr_vlfkz and&lt;/P&gt;&lt;P&gt;                    t001w~ekorg in lr_ekorg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically in T024W, I have 25 entries of WERKS of different EKORG and in T001W, i have 13 entries of WERKS of EKORG = 1001 and VLFKZ = A.  When running the statement above with the condition 1001 in LR_EKORG  and A in LR_VLFKZ repectively, I get all 25 entries with those WERKS which is not originally EKORG = 1001 in T024W becomes 1001 in the output result. I couldn't put my fingers together for this...anyone can help me here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message: please use more descriptive subject lines when starting a thread.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Thomas Zloch on Nov 22, 2010 4:33 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Nov 2010 14:50:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/7434372#M1550784</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-22T14:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/7434373#M1550785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try with the below code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select a&lt;SUB&gt;werks b&lt;/SUB&gt;ekorg b~vlfkz&lt;/P&gt;&lt;P&gt;  from t024w as a inner join t001w as b&lt;/P&gt;&lt;P&gt;     on a&lt;SUB&gt;werks = b&lt;/SUB&gt;werks&lt;/P&gt;&lt;P&gt;into table it_t001w&lt;/P&gt;&lt;P&gt;  where b~vlfkz in lr_vlfkz and&lt;/P&gt;&lt;P&gt;              b~ekorg in lr_ekorg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Praveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Nov 2010 15:13:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/7434373#M1550785</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-22T15:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/7434374#M1550786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, that other post isn't really going to help - adding an alias and changing the field selection for one field...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To answer your question, think about the restriction you have put on the selection and the join: the join is by PLANT and the restriction is by purchasing org from T001W (only).  You did not restrict the purchasing org selection from T024W.  This means that the join will pick up all purchasing org entries for the plants that were found in T001W.  Look at a trace and you'll see how it works.  It sounds like since you received all 25 entries from T024W, then the plants found in the T001W cover all of those entries?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Nov 2010 15:39:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/7434374#M1550786</guid>
      <dc:creator>brad_bohn</dc:creator>
      <dc:date>2010-11-22T15:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/7434375#M1550787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cady,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brad has already pointed out the root cause . You can add EKORG in where clause while joining the  two tables e.g. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select t001w&lt;SUB&gt;werks t001w&lt;/SUB&gt;ekorg t001w~vlfkz &lt;/P&gt;&lt;P&gt;from ( t001w inner join t024w on t024w&lt;SUB&gt;werks = t001w&lt;/SUB&gt;werks AND t024w&lt;SUB&gt;ekorg = t001w&lt;/SUB&gt;ekorg  )&lt;/P&gt;&lt;P&gt;into table lt_t001w&lt;/P&gt;&lt;P&gt;where t001w~vlfkz in lr_vlfkz and&lt;/P&gt;&lt;P&gt;t001w~ekorg in lr_ekorg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Tushar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Nov 2010 19:48:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/7434375#M1550787</guid>
      <dc:creator>tushar_shukla</dc:creator>
      <dc:date>2010-11-22T19:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/7434376#M1550788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just realized there's duplicates entries in the return result...after deleting duplicates, it's fine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all your input.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Nov 2010 04:50:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/7434376#M1550788</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-23T04:50:04Z</dc:date>
    </item>
  </channel>
</rss>

