<?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: INTERNAL TABLE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3448755#M828397</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can loop the first one and read table the other two...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
LOOP AT T_TABLE1.
 MOVE CORRESPONDING T_TABLE1 TO T_FINAL.
 READ TABLE T_TABLE2 WITH WITH FIELD1 = T_TABLE1-FIELD1.
 IF SY-SUBRC EQ 0.
   MOVE CORRESPONDING T_TABLE2 TO T_FINAL.
 ENDIF.
 READ TABLE T_TABLE3 WITH WITH FIELD1 = T_TABLE1-FIELD1.
 IF SY-SUBRC EQ 0.
   MOVE CORRESPONDING T_TABLE3 TO T_FINAL.
 ENDIF.
APPEND T_FINAL.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Feb 2008 14:46:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-20T14:46:20Z</dc:date>
    <item>
      <title>INTERNAL TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3448753#M828395</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;i have an ALV report in that report i have data in three internal tables but i want 2 move that data into one final internal table wit specific fields&lt;/P&gt;&lt;P&gt;from the individual internal tables&lt;/P&gt;&lt;P&gt;how can i write the logic&lt;/P&gt;&lt;P&gt;can any one help me&lt;/P&gt;&lt;P&gt; thankss&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2008 14:43:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3448753#M828395</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-20T14:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: INTERNAL TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3448754#M828396</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 as below:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at itab.

read table itab1 with key &amp;lt;fieldname&amp;gt; = itab-&amp;lt;fieldname&amp;gt; "Key field

if sy-subrc eq 0.

move fields to itab-fields.

endif.

read table itab1 with key &amp;lt;fieldname&amp;gt; = itab-&amp;lt;fieldname&amp;gt; "Key field

if sy-subrc eq 0.

move fields to itab-fields.

endif.

modify itab.
clear itab.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sriram Ponna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2008 14:45:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3448754#M828396</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-20T14:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: INTERNAL TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3448755#M828397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can loop the first one and read table the other two...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
LOOP AT T_TABLE1.
 MOVE CORRESPONDING T_TABLE1 TO T_FINAL.
 READ TABLE T_TABLE2 WITH WITH FIELD1 = T_TABLE1-FIELD1.
 IF SY-SUBRC EQ 0.
   MOVE CORRESPONDING T_TABLE2 TO T_FINAL.
 ENDIF.
 READ TABLE T_TABLE3 WITH WITH FIELD1 = T_TABLE1-FIELD1.
 IF SY-SUBRC EQ 0.
   MOVE CORRESPONDING T_TABLE3 TO T_FINAL.
 ENDIF.
APPEND T_FINAL.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2008 14:46:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3448755#M828397</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-20T14:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: INTERNAL TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3448756#M828398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Should have atleast one common field ... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itab1.&lt;/P&gt;&lt;P&gt;  read table itab2 with key &amp;lt;field1&amp;gt; = itab1-field1.&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;     move-corresponding itab2 to final_itab.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  read table itab3 with key &amp;lt;field1&amp;gt; = itab1-field1.&lt;/P&gt;&lt;P&gt;  if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;     move-corresponding itab3 to final_itab.&lt;/P&gt;&lt;P&gt;  endif.  &lt;/P&gt;&lt;P&gt;  move-corresponding itab1 to final_itab.&lt;/P&gt;&lt;P&gt;  append final_itab.&lt;/P&gt;&lt;P&gt;  clear  final_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2008 14:48:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3448756#M828398</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-20T14:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: INTERNAL TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3448757#M828399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Verma,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 1:&lt;/STRONG&gt;  Find out the comprehensive table out the 3 (ie, which contain all the records ). for example say internal table it_3.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 2 :&lt;/STRONG&gt; loop at the table found in step 1.&lt;/P&gt;&lt;P&gt;ie loop at it_3.&lt;/P&gt;&lt;P&gt;   endloop. &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 3 :&lt;/STRONG&gt; Inside the loop of step 2 read the other tables using READ TABLE stmt, and if success ( ie sy-subrc = 0 ), then copy the required fields into your final table. &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Step 4 :&lt;/STRONG&gt; Append the final table values into the final table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds,&lt;/P&gt;&lt;P&gt;Harikrishna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2008 14:54:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3448757#M828399</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-20T14:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: INTERNAL TABLE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3448758#M828400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;supoose u have &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
itab1

itab2

and Final_itab.

final_itab[] = itab1[].

append lines of itab2 to final_itab
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Feb 20, 2008 10:02 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2008 15:00:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table/m-p/3448758#M828400</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-20T15:00:24Z</dc:date>
    </item>
  </channel>
</rss>

