<?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 Move from Internal table to Internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/move-from-internal-table-to-internal-table/m-p/6776306#M1463848</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two internal table,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First one with fields A, B, C, D, E&lt;/P&gt;&lt;P&gt;Second one with     A, E, D, C, B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to fill the second internal table from first internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont want to use loop and do it(I am aware of doing it)... I tried using move corresponding but it is not supported.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know Is there any efficiently.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Mar 2010 03:46:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-03-24T03:46:54Z</dc:date>
    <item>
      <title>Move from Internal table to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/move-from-internal-table-to-internal-table/m-p/6776306#M1463848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two internal table,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First one with fields A, B, C, D, E&lt;/P&gt;&lt;P&gt;Second one with     A, E, D, C, B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to fill the second internal table from first internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont want to use loop and do it(I am aware of doing it)... I tried using move corresponding but it is not supported.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know Is there any efficiently.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Mar 2010 03:46:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/move-from-internal-table-to-internal-table/m-p/6776306#M1463848</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-24T03:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: Move from Internal table to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/move-from-internal-table-to-internal-table/m-p/6776307#M1463849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;One approach would be to try filliing the 2nd table at teh same time ur filling the 1st table instead of doing it after 1st table is filled..&lt;/P&gt;&lt;P&gt;BTW is there any specific purpose to rearranging one column, say for display or download?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- Dedeepya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Mar 2010 03:53:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/move-from-internal-table-to-internal-table/m-p/6776307#M1463849</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-24T03:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Move from Internal table to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/move-from-internal-table-to-internal-table/m-p/6776308#M1463850</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;Move-corresponding will work in loop or else to pass data from structure to structure only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once, you use mov-corres data will pass from-table to to-table header line only.&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  ZTEST_100&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  ztest_100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: vbrk, vbrp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types : BEGIN OF tvarv,&lt;/P&gt;&lt;P&gt;         col_1,&lt;/P&gt;&lt;P&gt;         col_2,&lt;/P&gt;&lt;P&gt;         col_3,&lt;/P&gt;&lt;P&gt;         col_4,&lt;/P&gt;&lt;P&gt;       END OF tvarv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types : BEGIN OF tvarv_1,&lt;/P&gt;&lt;P&gt;         col_2,&lt;/P&gt;&lt;P&gt;         col_1,&lt;/P&gt;&lt;P&gt;         col_4,&lt;/P&gt;&lt;P&gt;         col_3,&lt;/P&gt;&lt;P&gt;       END OF tvarv_1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : tvarvc type tvarv occurs 0 with header line.&lt;/P&gt;&lt;P&gt;DATA : tvarvc_1 type tvarv_1 occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tvarvc-col_1  = 01.&lt;/P&gt;&lt;P&gt;tvarvc-col_2  = 02.&lt;/P&gt;&lt;P&gt;tvarvc-col_3 = 03.&lt;/P&gt;&lt;P&gt;tvarvc-col_4  = 04.&lt;/P&gt;&lt;P&gt;APPEND tvarvc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tvarvc-col_1  = 05.&lt;/P&gt;&lt;P&gt;tvarvc-col_2  = 06.&lt;/P&gt;&lt;P&gt;tvarvc-col_3 = 07.&lt;/P&gt;&lt;P&gt;tvarvc-col_4  = 08.&lt;/P&gt;&lt;P&gt;APPEND tvarvc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append lines of tvarvc to tvarvc_1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Write : 'kishore'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Mar 2010 04:27:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/move-from-internal-table-to-internal-table/m-p/6776308#M1463850</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-24T04:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: Move from Internal table to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/move-from-internal-table-to-internal-table/m-p/6776309#M1463851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ITAB1:- &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FIELD :- A  B C D E&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;VALUE:-  1  2 3 4 5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ITAB2:-A E D C B&lt;/P&gt;&lt;P&gt;FIELD:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF u use &lt;STRONG&gt;append lines of itab1 to itab2&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;then output is like&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ITAB2:-A E D C B&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FIELD: 1 2 3 4 5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u use &lt;STRONG&gt;MOVE-CORRESPONDING itab1 to itab2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;then output is&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ITAB2:-A E D C B&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FIELD: 1 5 4 3 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;becasue in &lt;STRONG&gt;itab1 E value is 5&lt;/STRONG&gt; so MOVE-CORRESPONDING is working fine&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TABLES: vbrk, vbrp.

types : BEGIN OF itab1,
a,
b,
c,
d,
e,
END OF itab1.

types : BEGIN OF itab2_1,
a,
e,
d,
c,
b,
END OF itab2_1.

DATA : itab11 type itab1 occurs 0 with header line.
DATA : itab22_1 type itab2_1 occurs 0 with header line.

itab11-a = 01.
itab11-b = 02.
itab11-c = 03.
itab11-d = 04.
itab11-e = 05.
APPEND itab11.

break developer.
loop at itab11.
MOVE-CORRESPONDING itab11 to itab22_1.
append itab22_1.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Mar 2010 05:39:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/move-from-internal-table-to-internal-table/m-p/6776309#M1463851</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-24T05:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: Move from Internal table to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/move-from-internal-table-to-internal-table/m-p/6776310#M1463852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not possible without using a loop if the field order is different in the two internal tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Mar 2010 05:42:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/move-from-internal-table-to-internal-table/m-p/6776310#M1463852</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-24T05:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: Move from Internal table to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/move-from-internal-table-to-internal-table/m-p/6776311#M1463853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree with  Vikranth.Reddy    that why i give example with loop and MOVE-CORRESPONDING without loop not possible&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Mar 2010 06:40:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/move-from-internal-table-to-internal-table/m-p/6776311#M1463853</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-24T06:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: Move from Internal table to Internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/move-from-internal-table-to-internal-table/m-p/6776312#M1463854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; First one with fields A, B, C, D, E&lt;/P&gt;&lt;P&gt;&amp;gt; Second one with     A, E, D, C, B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a special reason why the field sequence in you second table is set up like that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there isn't, make them the same and then you can use: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;itab2[] = itab1[]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Mar 2010 07:44:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/move-from-internal-table-to-internal-table/m-p/6776312#M1463854</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-24T07:44:25Z</dc:date>
    </item>
  </channel>
</rss>

