<?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: appending two internal tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/appending-two-internal-tables/m-p/3194666#M761240</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if 2 internal fields are same then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
appending lines of i_tab1 to i_tab2.


if fields are not same


loop at i_tab1
  v_tabix = sy-tabix.
  read table i_tab3 with key &amp;lt;key fields of i_tab1&amp;gt;
  if sy-subrc eq 0.
    move corresponding fields i_tab1 to i_tab3.
    modify i_tab3 index v_tabix..
  else.
    move corresponding fields i_tab1 to i_tab3.
    append i_tab3.    
 endif.
endloop.

loop at i_tab2
  v_tabix = sy-tabix.
  read table i_tab3 with key &amp;lt;key fields of i_tab2&amp;gt;
  if sy-subrc eq 0.
    move corresponding fields i_tab2 to i_tab3.
    modify i_tab3 index v_tabix..
  else.
    move corresponding fields i_tab2 to i_tab3.
    append i_tab3.    
 endif.
endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After this I_tab3 cotnains the combined results of i_tab1 &amp;amp; I_tab2&lt;/P&gt;&lt;P&gt; a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Dec 2007 16:09:08 GMT</pubDate>
    <dc:creator>former_member194669</dc:creator>
    <dc:date>2007-12-21T16:09:08Z</dc:date>
    <item>
      <title>appending two internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/appending-two-internal-tables/m-p/3194663#M761237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i met with a situation, where i have to join 3 tables using the common fields using inner join.&lt;/P&gt;&lt;P&gt; i wrote 2 select statements and added contents to two different internal tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;F&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 16:00:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/appending-two-internal-tables/m-p/3194663#M761237</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-21T16:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: appending two internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/appending-two-internal-tables/m-p/3194664#M761238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I dint find a question in ur post.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but if you are looking to append that two internal table.. if the structures are same then say&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; append lines of itab1 to itab2      ( structure of both need to be &amp;gt;same)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 16:07:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/appending-two-internal-tables/m-p/3194664#M761238</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2007-12-21T16:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: appending two internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/appending-two-internal-tables/m-p/3194665#M761239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;loop at one internal table and append it to the other.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or use INTO APPENDING TABLE T_XXXX in the second select statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thnaks &lt;/P&gt;&lt;P&gt;Sayak&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 16:07:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/appending-two-internal-tables/m-p/3194665#M761239</guid>
      <dc:creator>RoySayak</dc:creator>
      <dc:date>2007-12-21T16:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: appending two internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/appending-two-internal-tables/m-p/3194666#M761240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if 2 internal fields are same then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
appending lines of i_tab1 to i_tab2.


if fields are not same


loop at i_tab1
  v_tabix = sy-tabix.
  read table i_tab3 with key &amp;lt;key fields of i_tab1&amp;gt;
  if sy-subrc eq 0.
    move corresponding fields i_tab1 to i_tab3.
    modify i_tab3 index v_tabix..
  else.
    move corresponding fields i_tab1 to i_tab3.
    append i_tab3.    
 endif.
endloop.

loop at i_tab2
  v_tabix = sy-tabix.
  read table i_tab3 with key &amp;lt;key fields of i_tab2&amp;gt;
  if sy-subrc eq 0.
    move corresponding fields i_tab2 to i_tab3.
    modify i_tab3 index v_tabix..
  else.
    move corresponding fields i_tab2 to i_tab3.
    append i_tab3.    
 endif.
endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After this I_tab3 cotnains the combined results of i_tab1 &amp;amp; I_tab2&lt;/P&gt;&lt;P&gt; a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Dec 2007 16:09:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/appending-two-internal-tables/m-p/3194666#M761240</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-12-21T16:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: appending two internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/appending-two-internal-tables/m-p/3194667#M761241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your suggestions. i have reached the solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2007 06:11:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/appending-two-internal-tables/m-p/3194667#M761241</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-28T06:11:57Z</dc:date>
    </item>
  </channel>
</rss>

