<?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 tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2218335#M475915</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Use the below syntax if your second table is an index table....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT LINES of &amp;lt;itab2&amp;gt; FROM n1 TO n2 INTO TABLE &amp;lt;itab1&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Hakim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 05 May 2007 04:46:12 GMT</pubDate>
    <dc:creator>abdul_hakim</dc:creator>
    <dc:date>2007-05-05T04:46:12Z</dc:date>
    <item>
      <title>internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2218331#M475911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;consider i m having two internal tables. my first internal table has  10 records and my second internal table having   20 records. i want to append 11-20 records in second internal table to first internal table. whats the syntax&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 May 2007 03:40:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2218331#M475911</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-05T03:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2218332#M475912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Geetha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           Consider Itab1, Itab2 are the two internal tables having &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       Both are having one field like Emp name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        So now we are going to Move the records from Itab2 to Itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax is,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at Itab2 into wa2.&lt;/P&gt;&lt;P&gt;if sy-tabix &amp;gt; 9.&lt;/P&gt;&lt;P&gt;  itab1 =  wa2.&lt;/P&gt;&lt;P&gt; append itab1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;endloop.&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;Reward If Helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 May 2007 03:47:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2218332#M475912</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-05T03:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2218333#M475913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CHECK OUT THIS SAMPLE CODE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF WA,&lt;/P&gt;&lt;P&gt;       CH1(3),&lt;/P&gt;&lt;P&gt;       NAME(5),&lt;/P&gt;&lt;P&gt;       END OF WA,&lt;/P&gt;&lt;P&gt;       &lt;/P&gt;&lt;P&gt;       IT1 LIKE STANDARD TABLE OF WA WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;       IT2 LIKE STANDARD TABLE OF WA WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;       &lt;/P&gt;&lt;P&gt;       &lt;/P&gt;&lt;P&gt;IT2-CH1 = 'AB'.&lt;/P&gt;&lt;P&gt;IT2-NAME = 'VIJAY'.&lt;/P&gt;&lt;P&gt;APPEND IT2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IT2-CH1 = 'CD'.&lt;/P&gt;&lt;P&gt;IT2-NAME = 'MANI'.&lt;/P&gt;&lt;P&gt;APPEND IT2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IT2-CH1 = 'EF'.&lt;/P&gt;&lt;P&gt;IT2-NAME = 'REGIS'.&lt;/P&gt;&lt;P&gt;APPEND IT2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IT2-CH1 = 'GH'.&lt;/P&gt;&lt;P&gt;IT2-NAME = 'VINOTH'.&lt;/P&gt;&lt;P&gt;APPEND IT2.       &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT2 INTO WA.&lt;/P&gt;&lt;P&gt; WRITE: / WA-CH1, WA-NAME.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IT1-CH1 = 'W1'.&lt;/P&gt;&lt;P&gt;IT1-NAME = 'REGIS'.&lt;/P&gt;&lt;P&gt;APPEND IT1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IT1-CH1 = 'W2'.&lt;/P&gt;&lt;P&gt;IT1-NAME = 'VINOTH'.&lt;/P&gt;&lt;P&gt;APPEND IT1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ULINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT1.&lt;/P&gt;&lt;P&gt; WRITE: / IT1-CH1, IT1-NAME.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ULINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT2.&lt;/P&gt;&lt;P&gt; IF SY-TABIX &amp;gt; 2.&lt;/P&gt;&lt;P&gt;   IT1 = IT2.&lt;/P&gt;&lt;P&gt;   APPEND IT1.&lt;/P&gt;&lt;P&gt; ENDIF. &lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT1.&lt;/P&gt;&lt;P&gt; WRITE: / IT1-CH1, IT1-NAME.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ULINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS,&lt;/P&gt;&lt;P&gt;VIJI.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 May 2007 03:57:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2218333#M475913</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-05T03:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2218334#M475914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;loop at itab2.
 check sy-tabix GE 10.
 append lines of itab2 to itab1.
endloop.

or try this..not sure about syntax..

loop at itab2 from 11 to 20.
append lines of itab2 to itab1.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 May 2007 04:22:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2218334#M475914</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-05T04:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2218335#M475915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Use the below syntax if your second table is an index table....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT LINES of &amp;lt;itab2&amp;gt; FROM n1 TO n2 INTO TABLE &amp;lt;itab1&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Hakim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 May 2007 04:46:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2218335#M475915</guid>
      <dc:creator>abdul_hakim</dc:creator>
      <dc:date>2007-05-05T04:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2218336#M475916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Geetha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRY THIS CODE,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  ZSG_TWOINTTABLE                                             *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZSG_TWOINTTABLE                         .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES : MARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : ITAB LIKE MARA OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : JTAB LIKE MARA OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM MARA UP TO 10 ROWS INTO CORRESPONDING FIELDS OF TABLE ITAB&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM MARA UP TO 20 ROWS INTO CORRESPONDING FIELDS OF TABLE JTAB&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE : /'****&lt;STRONG&gt;LOOP AT ITAB&lt;/STRONG&gt;******'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE:/ ITAB-MATNR , ITAB-PSTAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SKIP 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE : /'****&lt;STRONG&gt;LOOP AT JTAB&lt;/STRONG&gt;******'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT JTAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE:/ JTAB-MATNR , JTAB-PSTAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INSERT LINES of JTAB FROM 11 TO 20 INTO TABLE ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SKIP 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE : /'****&lt;STRONG&gt;LOOP AT ITAB AFTER INSERT&lt;/STRONG&gt;******'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE:/ ITAB-MATNR , ITAB-PSTAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 05 May 2007 06:24:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2218336#M475916</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-05T06:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2218337#M475917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;let you ve two internal tables itab1 and itab2 . but both the internal table should be same fields.at those time you want to move the some part of records from iternal table 1 to internal table 2.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;the syntax as follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;append lines of itab from 5 to 10 to itab1.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;description.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab        " internal table 1&lt;/P&gt;&lt;P&gt;itab1      " internal table 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here in my itab ve 10 records. but i want to move from the fifth  record to tenth record.&lt;/P&gt;&lt;P&gt;the above syntax will works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2007 03:57:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2218337#M475917</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-07T03:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2218338#M475918</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;Before that you have to check both internal tables have same fields of same data type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab2 from 11 to 20.&lt;/P&gt;&lt;P&gt;append lines of itab2 to itab1.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if it is helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sangeetha.A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2007 07:14:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2218338#M475918</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-07T07:14:38Z</dc:date>
    </item>
  </channel>
</rss>

