<?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: moving data  from one internal table to another table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another-table/m-p/2082172#M432022</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;Once i move data from itab1 to itab2 and then i am performing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1 into w1.&lt;/P&gt;&lt;P&gt;move-corresponding w1 to w2.&lt;/P&gt;&lt;P&gt; write : / sytabix , w2-col , w2-str.&lt;/P&gt;&lt;P&gt;append w2 to itab2.&lt;/P&gt;&lt;P&gt;clear w2.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it shows error that STR and COL is not the component of itab2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Apr 2007 11:24:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-03T11:24:02Z</dc:date>
    <item>
      <title>moving data  from one internal table to another table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another-table/m-p/2082167#M432017</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 want to transfer data from one internal table to another.Both are having different structures.&lt;/P&gt;&lt;P&gt;eg&lt;/P&gt;&lt;P&gt;types : begin of st_stokes,&lt;/P&gt;&lt;P&gt;           include type stokes,&lt;/P&gt;&lt;P&gt;           count type i,&lt;/P&gt;&lt;P&gt;           end of st_stokes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : itab1 type table of stokes,&lt;/P&gt;&lt;P&gt;         itab2 type table of st_stokes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab1 is having the required data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2007 10:25:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another-table/m-p/2082167#M432017</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-03T10:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: moving data  from one internal table to another table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another-table/m-p/2082168#M432018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use move corresponding fields of itab1 into itab2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2007 10:26:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another-table/m-p/2082168#M432018</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-03T10:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: moving data  from one internal table to another table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another-table/m-p/2082169#M432019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab2[] = itab1[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it doesn't work, you have to do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt;move-corresponding itab1 to itab2.&lt;/P&gt;&lt;P&gt;append itab2.&lt;/P&gt;&lt;P&gt;clear itab2.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2007 10:27:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another-table/m-p/2082169#M432019</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-03T10:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: moving data  from one internal table to another table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another-table/m-p/2082170#M432020</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;check this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data : begin of itab1 occurs 0. "itab with work area.
key_field1 like ztable1-key_field1,
field1 like ztable1-field1,
field2 like ztable1-field2,
endof itab1. 

data : begin of itab2 occurs 0. "itab with work area.
key_field2 like ztable2-key_field2,
field3 like ztable2-field3,
field4 like ztable2-field4,
endof itab2. 

data : begin of itab_final occurs 0.
key_field1 like ztable1-key_field1,
field1 like ztable1-field1,
field2 like ztable1-field2,
field3 like ztable2-field3,
field4 like ztable2-field4,
endof itab_final. 


put the date final(merged) internal table
*****************************************
1. loop at itab1.
read table itab2 with key keyfield2 = itab1-keyfield1.
if sy-surc = 0.
itab_final-key_field1 = itab1-keyfield1
itab_final-field1 = itab1-field1.
itab_final-field2 = itab1-keyfield2.
itab_final-field3 = itab2-field2.
itab_final-field4 = itab2-keyfield2.
append itab_final.
clear itab_final.
endif.
endloop.


or


LOOP AT ITAB1.
MOVE-CORRESPONDING TO ITAB1 to ITAB_FINAL.
READ TABLE ITAB2 WITH KEY FILED1 = ITAB1-FIELD1.
if sy-subrc = 0.
MOVE-CORRESPONDING TO ITAB2 to ITAB_FINAL.
endif,
READ TABLE ITAB3 WITH KEY FILED1 = ITAB1-FIELD1.
if sy-subrc = 0.
MOVE-CORRESPONDING TO ITAB2 to ITAB_FINAL.
endif,
append itab_final.
clear itab_final.
endloop&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;Anversha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2007 10:27:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another-table/m-p/2082170#M432020</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2007-04-03T10:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: moving data  from one internal table to another table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another-table/m-p/2082171#M432021</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;assuming ur tables with header lines..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt;  move-corresponding itab1 to itab2.&lt;/P&gt;&lt;P&gt;  append itab2.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2007 10:28:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another-table/m-p/2082171#M432021</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-03T10:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: moving data  from one internal table to another table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another-table/m-p/2082172#M432022</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;Once i move data from itab1 to itab2 and then i am performing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1 into w1.&lt;/P&gt;&lt;P&gt;move-corresponding w1 to w2.&lt;/P&gt;&lt;P&gt; write : / sytabix , w2-col , w2-str.&lt;/P&gt;&lt;P&gt;append w2 to itab2.&lt;/P&gt;&lt;P&gt;clear w2.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it shows error that STR and COL is not the component of itab2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2007 11:24:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another-table/m-p/2082172#M432022</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-03T11:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: moving data  from one internal table to another table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another-table/m-p/2082173#M432023</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;What r u trying to write in the loop ???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i hope this meets ur requirement....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types : begin of st_stokes,&lt;/P&gt;&lt;P&gt;include type stokes,&lt;/P&gt;&lt;P&gt;count type i,&lt;/P&gt;&lt;P&gt;end of st_stokes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : itab1 type table of stokes,&lt;/P&gt;&lt;P&gt;itab2 type table of st_stokes,&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;wa1 type stokes,&lt;/P&gt;&lt;P&gt;wa2 type st_stokes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1 into wa1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move-corresponding wa1 to wa2.&lt;/P&gt;&lt;P&gt;wa2-count = sy-tabix.&lt;/P&gt;&lt;P&gt;append wa2 to itab2.&lt;/P&gt;&lt;P&gt;clear wa2.&lt;/P&gt;&lt;P&gt;endloop.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;sai ramesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2007 11:25:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another-table/m-p/2082173#M432023</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-03T11:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: moving data  from one internal table to another table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another-table/m-p/2082174#M432024</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;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt;move corrosponding itab1 into itab2.&lt;/P&gt;&lt;P&gt;append itab2.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2007 11:30:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another-table/m-p/2082174#M432024</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-03T11:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: moving data  from one internal table to another table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another-table/m-p/2082175#M432025</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;theirs some value in wa2-str and wa2-col ,which i have to print?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2007 11:34:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another-table/m-p/2082175#M432025</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-03T11:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: moving data  from one internal table to another table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another-table/m-p/2082176#M432026</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;pls chk these fields str and col are available in stokes structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;anversha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2007 11:39:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another-table/m-p/2082176#M432026</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2007-04-03T11:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: moving data  from one internal table to another table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another-table/m-p/2082177#M432027</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;while including a structure i mean INCLUDE &amp;lt;structure&amp;gt; the definition style will change..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;check its working here...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the definition of st_stokes should be like this ( when u are using INCLUDE structure )...&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;types  begin of st_stokes.&lt;/P&gt;&lt;P&gt;include type stokes.&lt;/P&gt;&lt;P&gt;types  count type i.&lt;/P&gt;&lt;P&gt;types end of st_stokes.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : itab1 type table of stokes,&lt;/P&gt;&lt;P&gt;itab2 type table of st_stokes,&lt;/P&gt;&lt;P&gt;wa1 type stokes,&lt;/P&gt;&lt;P&gt;wa2 type st_stokes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1 into wa1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move-corresponding wa1 to wa2.&lt;/P&gt;&lt;P&gt;wa2-count = sy-tabix.&lt;/P&gt;&lt;P&gt;write : wa2-str, wa2-col.&lt;/P&gt;&lt;P&gt;append wa2 to itab2.&lt;/P&gt;&lt;P&gt;clear wa2.&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;&lt;/P&gt;&lt;P&gt;plz do rememeber to close the thread, when ur problem is solved !! thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if helpful..&lt;/P&gt;&lt;P&gt;sai ramesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2007 11:42:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/moving-data-from-one-internal-table-to-another-table/m-p/2082177#M432027</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-03T11:42:53Z</dc:date>
    </item>
  </channel>
</rss>

