<?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: append one internal table to another.. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-one-internal-table-to-another/m-p/3904852#M936623</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u can use in a LOOP the MOVE-CORRESPONDING FIELDS xx TO yy&lt;/P&gt;&lt;P&gt;the fields have the same name in both tables, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or assign directly, here the name dont's matter&lt;/P&gt;&lt;P&gt;LOOP AT XX.&lt;/P&gt;&lt;P&gt;  yy-code = xx-code.&lt;/P&gt;&lt;P&gt;  yy-sum = xx-tot.&lt;/P&gt;&lt;P&gt;  append yy.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 May 2008 17:13:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-29T17:13:27Z</dc:date>
    <item>
      <title>append one internal table to another..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-one-internal-table-to-another/m-p/3904848#M936619</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;i have an internal table 'XX' based on a structure "s1". This contains some data. I have another similar internal table "YY". Now I want all the records from YY to be added to XX (i.e. append at the end ). what is the best code ? can some one give a sample please.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 17:08:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-one-internal-table-to-another/m-p/3904848#M936619</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-29T17:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: append one internal table to another..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-one-internal-table-to-another/m-p/3904849#M936620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If internal tables XX and YY are of asme type S1 then you can use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;append lines of yy to XX&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The rows of an internal table jtab are appended according to the same rules that apply for appending a workarea, in the sequence in which they exist in jtab. If jtab is an index table, you can restrict the rows to be appended by specifying FROM idx1 and TO idx2. In this case, only the table rows starting at table index idx1 or ending at table index idx2 from jtab are appended. For idx1 and idx2, data objects of type i are expected. If the value idx1 or idx2 is less than 0, an untreatable exception occurs. If idx1 is greater than idx2 or greater than the number of table rows, no rows are appended. If idx2 is greater than the number of table rows, it is set to the number of table rows. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Appending square numbers to a sorted table with elementary row type. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: int  TYPE i, 
      itab LIKE SORTED TABLE OF int 
           WITH UNIQUE KEY table_line. 

DO 10 TIMES. 
  int = sy-index ** 2. 
  APPEND int TO itab. 
ENDDO.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Naren K Someneni on May 29, 2008 12:13 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 17:10:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-one-internal-table-to-another/m-p/3904849#M936620</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-29T17:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: append one internal table to another..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-one-internal-table-to-another/m-p/3904850#M936621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;append line of XX to YY.

or 
XX[ ] = YY[ ]
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 17:11:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-one-internal-table-to-another/m-p/3904850#M936621</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2008-05-29T17:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: append one internal table to another..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-one-internal-table-to-another/m-p/3904851#M936622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do this using simple statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if the structure of the two internal tables are same you can simply do like this&lt;/P&gt;&lt;P&gt;it_table1[  ] = it_table2[  ].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if the structures are not same use move corresponding statement like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move corresponding fields of it_table2 to it_table1&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;it_table1-field = it_table2-field.&lt;/P&gt;&lt;P&gt;append it_table1.&lt;/P&gt;&lt;P&gt;clear it_table1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it is useful. please reward me the points&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chinna&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Chinna on May 29, 2008 7:13 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Chinna on May 29, 2008 7:13 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 17:12:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-one-internal-table-to-another/m-p/3904851#M936622</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-29T17:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: append one internal table to another..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/append-one-internal-table-to-another/m-p/3904852#M936623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u can use in a LOOP the MOVE-CORRESPONDING FIELDS xx TO yy&lt;/P&gt;&lt;P&gt;the fields have the same name in both tables, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or assign directly, here the name dont's matter&lt;/P&gt;&lt;P&gt;LOOP AT XX.&lt;/P&gt;&lt;P&gt;  yy-code = xx-code.&lt;/P&gt;&lt;P&gt;  yy-sum = xx-tot.&lt;/P&gt;&lt;P&gt;  append yy.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 17:13:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/append-one-internal-table-to-another/m-p/3904852#M936623</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-29T17:13:27Z</dc:date>
    </item>
  </channel>
</rss>

