<?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 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/3105654#M737228</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;   iam having two internal tables itab1 and itab2.i have to copy contents of table itab1 to itab2 and delete the duplicate entries in itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please provide the code for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Nov 2007 14:24:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-21T14:24:26Z</dc:date>
    <item>
      <title>copying internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copying-internal-table/m-p/3105654#M737228</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;   iam having two internal tables itab1 and itab2.i have to copy contents of table itab1 to itab2 and delete the duplicate entries in itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please provide the code for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2007 14:24:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-internal-table/m-p/3105654#M737228</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-21T14:24:26Z</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/3105655#M737229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have defined your tales with the OCCURS 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: itab1 like mara occurs 0 with header line,
itab2 like mara occurs 0 with header line.
itab1[] = itab2[].
sort itab2.
delete adjacent duplicates from itab2.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have defined tables with the types than:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: itab1 type standard table of mara ,
itab2 type standard table of mara .
itab1 = itab2.
sort itab2.
delete adjacent duplicates from itab2.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2007 14:25:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-internal-table/m-p/3105655#M737229</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2007-11-21T14:25: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/3105656#M737230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Surya,&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&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;Note : Ensure that two internal tables must contains the same structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Delete duplicate values :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATES FROM ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Reward If Helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2007 14:28:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-internal-table/m-p/3105656#M737230</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-21T14:28:04Z</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/3105657#M737231</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 have the copy the values of itab1 to itab2 as below :&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&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append lines of itab1 to itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To delete the duplicate entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort itab --&amp;gt; Sort the itab with necessary fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from itab comparing &amp;lt;fieldnames&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sriram Ponna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2007 14:28:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-internal-table/m-p/3105657#M737231</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-21T14:28:14Z</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/3105658#M737232</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 itab1 &amp;amp; itab2 are of same structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab2[] = itab1[].&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bye,&lt;/P&gt;&lt;P&gt;kc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2007 14:37:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-internal-table/m-p/3105658#M737232</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-21T14:37:03Z</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/3105659#M737233</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;Do like this&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;sort itab2 by key field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from itab2 comparing keyfield.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2007 14:43:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copying-internal-table/m-p/3105659#M737233</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-21T14:43:17Z</dc:date>
    </item>
  </channel>
</rss>

