<?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: Join not working in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/join-not-working/m-p/5408783#M1242071</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 can do join till 3 tables ...if you want to get the data from the 5 tables then you use the JOIn on the basic tables and then Using FOR ALL entries get the data from other table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the below code&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select single a~matnr a~bwkey a~bwtar b~werks
into corresponding field of table i_zjoin       
from marc as b inner join mbew as a
on a~matnr = b~matnr
where b~matnr = 'R2R-EQUIPMENT'.

IF NOT i_join[] is iniitial.
 SELECT * FROm marc into table i_marc 
   for all entries in i_zjoin 
    where matnr = i_zjoin-matnr and
             werks = i_zjoin-werks.
ENDIF.



&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Apr 2009 16:23:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-02T16:23:03Z</dc:date>
    <item>
      <title>Join not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/join-not-working/m-p/5408782#M1242070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have this code but it doesnt do not. This is a simple one with 2 tables. Given the case I need to join 5 table is the join the correct method because  I heard that it is nort recomended for so many tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: mbew, marc, ZJOIN.&lt;/P&gt;&lt;P&gt;data :&lt;/P&gt;&lt;P&gt;i_zjoin type standard table of zjoin,&lt;/P&gt;&lt;P&gt;w_zjoin type zjoin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single a&lt;SUB&gt;matnr a&lt;/SUB&gt;bwkey a&lt;SUB&gt;bwtar  b&lt;/SUB&gt;werks&lt;/P&gt;&lt;P&gt;into  (zjoin-matnr, zjoin-bwkey, zjoin-bwtar, zjoin-werks)&lt;/P&gt;&lt;P&gt;from marc as b inner join mbew as a&lt;/P&gt;&lt;P&gt;on a&lt;SUB&gt;matnr = b&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;where b~matnr = 'R2R-EQUIPMENT'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2009 16:16:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/join-not-working/m-p/5408782#M1242070</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-02T16:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: Join not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/join-not-working/m-p/5408783#M1242071</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 can do join till 3 tables ...if you want to get the data from the 5 tables then you use the JOIn on the basic tables and then Using FOR ALL entries get the data from other table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the below code&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select single a~matnr a~bwkey a~bwtar b~werks
into corresponding field of table i_zjoin       
from marc as b inner join mbew as a
on a~matnr = b~matnr
where b~matnr = 'R2R-EQUIPMENT'.

IF NOT i_join[] is iniitial.
 SELECT * FROm marc into table i_marc 
   for all entries in i_zjoin 
    where matnr = i_zjoin-matnr and
             werks = i_zjoin-werks.
ENDIF.



&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2009 16:23:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/join-not-working/m-p/5408783#M1242071</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-02T16:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: Join not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/join-not-working/m-p/5408784#M1242072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you mean that it is not working? Syntax error, dump, incorrect results?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2009 16:29:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/join-not-working/m-p/5408784#M1242072</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-02T16:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: Join not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/join-not-working/m-p/5408785#M1242073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Now it gives this erroe &lt;/P&gt;&lt;P&gt;Field "corresponding is un known. It is nethier in one of the specified tables nor defined by a "data :" statement&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2009 16:31:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/join-not-working/m-p/5408785#M1242073</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-02T16:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Join not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/join-not-working/m-p/5408786#M1242074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Zjoion dosent have anything after runnig the code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2009 16:33:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/join-not-working/m-p/5408786#M1242074</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-02T16:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: Join not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/join-not-working/m-p/5408787#M1242075</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 now ..it works &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT SINGLE a~matnr a~bwkey a~bwtar b~werks
FROM marc AS b INNER JOIN mbew AS a
INTO CORRESPONDING FIELDS OF TABLE i_zjoin
ON a~matnr = b~matnr
WHERE b~matnr = 'R2R-EQUIPMENT'.

IF NOT i_join[] IS INIITIAL.
  SELECT * FROM marc INTO  TABLE i_marc
    FOR ALL ENTRIES IN i_zjoin
     WHERE matnr = i_zjoin-matnr AND
              werks = i_zjoin-werks.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2009 16:35:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/join-not-working/m-p/5408787#M1242075</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-02T16:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Join not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/join-not-working/m-p/5408788#M1242076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Still I get this error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Incorrect structure of FROM clause&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2009 16:52:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/join-not-working/m-p/5408788#M1242076</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-02T16:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: Join not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/join-not-working/m-p/5408789#M1242077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see  the examples and use the appropriate one...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;lt; Cut and paste without attribution from &lt;A href="http://www.saptechies.com/join-in-open-sql/" target="test_blank"&gt;http://www.saptechies.com/join-in-open-sql/&lt;/A&gt; removed &amp;gt;&amp;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;Prabhudas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on Apr 2, 2009 1:37 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2009 17:14:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/join-not-working/m-p/5408789#M1242077</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-02T17:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: Join not working</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/join-not-working/m-p/5408790#M1242078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;David - I don't see anything wrong with your original code. The fact that it doesn't return any value may just mean that there is no data to select. Have you run the material through the conversion exit before SELECTing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2009 17:41:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/join-not-working/m-p/5408790#M1242078</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-02T17:41:57Z</dc:date>
    </item>
  </channel>
</rss>

