<?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: intersection from 3 tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/intersection-from-3-tables/m-p/1684719#M301574</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this code you can put into the internal table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECT a&lt;SUB&gt;equnr a&lt;/SUB&gt;bis a&lt;SUB&gt;ab a&lt;/SUB&gt;devloc b&lt;SUB&gt;zzmun c&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;         FROM egerh AS a INNER JOIN&lt;/P&gt;&lt;P&gt;              iflot AS b&lt;/P&gt;&lt;P&gt;              ON a&lt;SUB&gt;devloc EQ b&lt;/SUB&gt;tplnr&lt;/P&gt;&lt;P&gt;              INNER JOIN equi AS c&lt;/P&gt;&lt;P&gt;              ON a&lt;SUB&gt;equnr EQ c&lt;/SUB&gt;equnr&lt;/P&gt;&lt;P&gt;              INTO TABLE i_dpoint&lt;/P&gt;&lt;P&gt;              FOR ALL ENTRIES IN i_bill_reg&lt;/P&gt;&lt;P&gt;              WHERE a~equnr EQ i_bill_reg-equnr .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Nov 2006 13:56:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-14T13:56:07Z</dc:date>
    <item>
      <title>intersection from 3 tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/intersection-from-3-tables/m-p/1684716#M301571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hellow I have an 3 selects and n all select I doing  iNTO CORRESPONDING FIELDS OF TABLE itab (1,2,3) how can Iintersection from the 3 tables (values I wont) into one table .example is very help regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Nov 2006 13:50:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/intersection-from-3-tables/m-p/1684716#M301571</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-14T13:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: intersection from 3 tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/intersection-from-3-tables/m-p/1684717#M301572</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;Declare one final table...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB1.&lt;/P&gt;&lt;P&gt;MOVE-CORRESPONDING TO ITAB1 to ITAB_FINAL.&lt;/P&gt;&lt;P&gt;READ TABLE ITAB2 WITH KEY FILED1 = ITAB1-FIELD1.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;MOVE-CORRESPONDING TO ITAB2 to ITAB_FINAL.&lt;/P&gt;&lt;P&gt;endif,&lt;/P&gt;&lt;P&gt;READ TABLE ITAB3 WITH KEY FILED1 = ITAB1-FIELD1.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;MOVE-CORRESPONDING TO ITAB2 to ITAB_FINAL.&lt;/P&gt;&lt;P&gt;endif,&lt;/P&gt;&lt;P&gt;append itab_final.&lt;/P&gt;&lt;P&gt;clear itab_final.&lt;/P&gt;&lt;P&gt;endloop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If useful reward,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Nov 2006 13:54:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/intersection-from-3-tables/m-p/1684717#M301572</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-14T13:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: intersection from 3 tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/intersection-from-3-tables/m-p/1684718#M301573</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 this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data : begin of itab1 occurs 0. "itab with work area.
key_field1 like ztable1-key_field1,
field1 like ztable1-field1,
field2 like ztable1-field2,
endof itab1. 

data : begin of itab2 occurs 0. "itab with work area.
key_field2 like ztable2-key_field2,
field3 like ztable2-field3,
field4 like ztable2-field4,
endof itab2. 

data : begin of itab_final occurs 0.
key_field1 like ztable1-key_field1,
field1 like ztable1-field1,
field2 like ztable1-field2,
field3 like ztable2-field3,
field4 like ztable2-field4,
endof itab_final. 


put the date final(merged) internal table
*****************************************
1. loop at itab1.
read table itab2 with key keyfield2 = itab1-keyfield1.
if sy-surc = 0.
itab_final-key_field1 = itab1-keyfield1
itab_final-field1 = itab1-field1.
itab_final-field2 = itab1-keyfield2.
itab_final-field3 = itab2-field2.
itab_final-field4 = itab2-keyfield2.
append itab_final.
clear itab_final.
endif.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anver&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if hlped pls mark points&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Nov 2006 13:55:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/intersection-from-3-tables/m-p/1684718#M301573</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2006-11-14T13:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: intersection from 3 tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/intersection-from-3-tables/m-p/1684719#M301574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this code you can put into the internal table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECT a&lt;SUB&gt;equnr a&lt;/SUB&gt;bis a&lt;SUB&gt;ab a&lt;/SUB&gt;devloc b&lt;SUB&gt;zzmun c&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;         FROM egerh AS a INNER JOIN&lt;/P&gt;&lt;P&gt;              iflot AS b&lt;/P&gt;&lt;P&gt;              ON a&lt;SUB&gt;devloc EQ b&lt;/SUB&gt;tplnr&lt;/P&gt;&lt;P&gt;              INNER JOIN equi AS c&lt;/P&gt;&lt;P&gt;              ON a&lt;SUB&gt;equnr EQ c&lt;/SUB&gt;equnr&lt;/P&gt;&lt;P&gt;              INTO TABLE i_dpoint&lt;/P&gt;&lt;P&gt;              FOR ALL ENTRIES IN i_bill_reg&lt;/P&gt;&lt;P&gt;              WHERE a~equnr EQ i_bill_reg-equnr .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Nov 2006 13:56:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/intersection-from-3-tables/m-p/1684719#M301574</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-14T13:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: intersection from 3 tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/intersection-from-3-tables/m-p/1684720#M301575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi..&lt;/P&gt;&lt;P&gt;You can try joining two of the tables and then use for all entries for third table.&lt;/P&gt;&lt;P&gt;or otherwise you can write two jon statements in single select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;Select * &lt;/P&gt;&lt;P&gt;from (&lt;/P&gt;&lt;P&gt;         INNER JOIN AFIH             "afih: Maint order header&lt;/P&gt;&lt;P&gt;         ON  AFIH&lt;SUB&gt;AUFNR = AUFK&lt;/SUB&gt;AUFNR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         INNER JOIN ILOA             "iloa: PM Obj Loc &amp;amp; Acct Assgmt&lt;/P&gt;&lt;P&gt;         ON  ILOA&lt;SUB&gt;ILOAN = AFIH&lt;/SUB&gt;ILOAN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         INNER JOIN AFVV             "afvv: qty/dates in operation&lt;/P&gt;&lt;P&gt;         ON  AFVV&lt;SUB&gt;AUFPL = AFKO&lt;/SUB&gt;AUFPL&lt;/P&gt;&lt;P&gt;) where condition.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Nov 2006 13:56:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/intersection-from-3-tables/m-p/1684720#M301575</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-14T13:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: intersection from 3 tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/intersection-from-3-tables/m-p/1684721#M301576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Code like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;select p1&lt;SUB&gt;field1 p2&lt;/SUB&gt;field2 p3&lt;SUB&gt;field3 from tab1 as p1 inner join tab2 as p2 on p1&lt;/SUB&gt;field = p2&lt;SUB&gt;field inner join tab3 as p3 on p3&lt;/SUB&gt;field = p1~field into corresponding fields of table itab.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark points if helpful.&lt;/P&gt;&lt;P&gt;Regs&lt;/P&gt;&lt;P&gt;Manas Ranjan Panda&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Nov 2006 13:57:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/intersection-from-3-tables/m-p/1684721#M301576</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-14T13:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: intersection from 3 tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/intersection-from-3-tables/m-p/1684722#M301577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;declare all internal table what u required,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB1.&lt;/P&gt;&lt;P&gt;MOVE-CORRESPONDING TO ITAB1 to ITAB_FINAL.&lt;/P&gt;&lt;P&gt;READ TABLE ITAB2 WITH KEY FILED1 = ITAB1-FIELD1.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;MOVE-CORRESPONDING TO ITAB2 to ITAB_FINAL.&lt;/P&gt;&lt;P&gt;endif,&lt;/P&gt;&lt;P&gt;READ TABLE ITAB3 WITH KEY FILED1 = ITAB1-FIELD1.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;MOVE-CORRESPONDING TO ITAB2 to ITAB_FINAL.&lt;/P&gt;&lt;P&gt;endif,&lt;/P&gt;&lt;P&gt;append itab_final.&lt;/P&gt;&lt;P&gt;clear itab_final.&lt;/P&gt;&lt;P&gt;endloop&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Nov 2006 14:01:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/intersection-from-3-tables/m-p/1684722#M301577</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-14T14:01:59Z</dc:date>
    </item>
  </channel>
</rss>

