<?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: Copying internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-internal-table/m-p/2055203#M424159</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;if the character data type fields are of enough length to hold the value in the other internal table .. then it is very easy to copy...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab2 is the table of fields of character type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;loop at itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab2-field1 = itab1-field1.&lt;/P&gt;&lt;P&gt;itab2-field2 = itab1-field2.&lt;/P&gt;&lt;P&gt;itab2-field3 = itab1-field3.&lt;/P&gt;&lt;P&gt;itab2-field4 = itab1-field4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append itab2.&lt;/P&gt;&lt;P&gt;&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;reward if it helps u...&lt;/P&gt;&lt;P&gt;sai ramesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Mar 2007 08:45:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-26T08:45:29Z</dc:date>
    <item>
      <title>Copying internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-internal-table/m-p/2055202#M424158</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;          How can i copy a internal table whose fields are of specific data type into another internal table all whose fields are of character data type.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2007 08:43:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-internal-table/m-p/2055202#M424158</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-26T08:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Copying internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-internal-table/m-p/2055203#M424159</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;if the character data type fields are of enough length to hold the value in the other internal table .. then it is very easy to copy...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab2 is the table of fields of character type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;loop at itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab2-field1 = itab1-field1.&lt;/P&gt;&lt;P&gt;itab2-field2 = itab1-field2.&lt;/P&gt;&lt;P&gt;itab2-field3 = itab1-field3.&lt;/P&gt;&lt;P&gt;itab2-field4 = itab1-field4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append itab2.&lt;/P&gt;&lt;P&gt;&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;reward if it helps u...&lt;/P&gt;&lt;P&gt;sai ramesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2007 08:45:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-internal-table/m-p/2055203#M424159</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-26T08:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: Copying internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-internal-table/m-p/2055204#M424160</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 directly assign them using move  keyword if their lengths are same and The line types are convertible, but not compatible. you can also you "write to" keyword to copy an internal  table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;veeresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2007 08:45:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-internal-table/m-p/2055204#M424160</guid>
      <dc:creator>former_member673464</dc:creator>
      <dc:date>2007-03-26T08:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: Copying internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-internal-table/m-p/2055205#M424161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If Both the tables are of same structure...&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;else use move-corresponging to....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2007 08:48:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-internal-table/m-p/2055205#M424161</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-26T08:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: Copying internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-internal-table/m-p/2055206#M424162</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; Make sure that the lenghts of target fields are same as the lengths of source field.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at itab.
move-corresponding fields of itab to itab2.
append itab2.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2007 08:48:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-internal-table/m-p/2055206#M424162</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-26T08:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: Copying internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-internal-table/m-p/2055207#M424163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this is also one of the method &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN SPFLI_WA TO &amp;lt;WA&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT  *&lt;/P&gt;&lt;P&gt;       FROM SPFLI&lt;/P&gt;&lt;P&gt;       INTO SPFLI_WA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA COUNT.&lt;/P&gt;&lt;P&gt;  WHILE SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;    ASSIGN COMPONENT SY-INDEX OF STRUCTURE &amp;lt;WA&amp;gt; TO &amp;lt;COMP&amp;gt;.&lt;/P&gt;&lt;P&gt;    IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;      WRITE &amp;lt;COMP&amp;gt; TO FS1.&lt;/P&gt;&lt;P&gt;      CONDENSE FS1 NO-GAPS.&lt;/P&gt;&lt;P&gt;      CONCATENATE   CHAR FS1 INTO CHAR IN CHARACTER MODE SEPARATED BY&lt;/P&gt;&lt;P&gt;  ' '.&lt;/P&gt;&lt;P&gt;      IF COUNT = 0.&lt;/P&gt;&lt;P&gt;        MOVE FS1 TO CHAR.&lt;/P&gt;&lt;P&gt;        COUNT = 1.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDWHILE.&lt;/P&gt;&lt;P&gt;*CONDENSE CHAR NO-GAPS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  APPEND CHAR TO T_CHAR.&lt;/P&gt;&lt;P&gt;  CLEAR: CHAR,COUNT.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2007 08:57:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-internal-table/m-p/2055207#M424163</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-26T08:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: Copying internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-internal-table/m-p/2055208#M424164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi prashanth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If they are exactly the same structure.&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;or if the structures are diff the,...&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;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="173998"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;al the best!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aparna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2007 09:20:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-internal-table/m-p/2055208#M424164</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-26T09:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: Copying internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-internal-table/m-p/2055209#M424165</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 use move-corresponding fields from itab1 to itab2.  This statement copy the data from one internal table to another internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2007 10:00:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-internal-table/m-p/2055209#M424165</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-26T10:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Copying internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-internal-table/m-p/2055210#M424166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab2-field1 = itab1-field1.&lt;/P&gt;&lt;P&gt;itab2-field2 = itab1-field2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append itab2.&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;Or:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;move-corresponding syntax&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append itab2.&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;hope this will help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2007 10:49:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-internal-table/m-p/2055210#M424166</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-26T10:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: Copying internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-internal-table/m-p/2055211#M424167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;looping will effect the performance of your program. Just write one single line like below:&lt;/P&gt;&lt;P&gt;append lines of itab1 to itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ensure both table are of same structure.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Mar 2007 10:54:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-internal-table/m-p/2055211#M424167</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-26T10:54:19Z</dc:date>
    </item>
  </channel>
</rss>

