<?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: Compare two internal tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/compare-two-internal-tables/m-p/3622315#M872634</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 [ ] = itab [ ].&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;loop at itab into wa.&lt;/P&gt;&lt;P&gt;loop at itab1 into wa1 where fld1 NE wa-fld1 AND fld2 NE wa-fld2.&lt;/P&gt;&lt;P&gt;wa-fld1 = wa1-fld1.&lt;/P&gt;&lt;P&gt;append wa to itab2.&lt;/P&gt;&lt;P&gt;endloop.&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;by this no duplicates will come into table itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ramesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Ramesh Jakkula on Mar 24, 2008 8:58 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Mar 2008 07:58:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-24T07:58:08Z</dc:date>
    <item>
      <title>Compare two internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/compare-two-internal-tables/m-p/3622310#M872629</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;Could please help me by comparing two internal tables i have to get data into one of the internal table which do not have the data of other internal table. How to do this? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example: itab has 2 records.&lt;/P&gt;&lt;P&gt;a b&lt;/P&gt;&lt;P&gt;c d&lt;/P&gt;&lt;P&gt;itab1 has 2 records&lt;/P&gt;&lt;P&gt;z n&lt;/P&gt;&lt;P&gt;s g&lt;/P&gt;&lt;P&gt;now my itab should have&lt;/P&gt;&lt;P&gt;a b&lt;/P&gt;&lt;P&gt;c d&lt;/P&gt;&lt;P&gt;z b&lt;/P&gt;&lt;P&gt;s b&lt;/P&gt;&lt;P&gt;z d&lt;/P&gt;&lt;P&gt;s d&lt;/P&gt;&lt;P&gt;how to write 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>Mon, 24 Mar 2008 07:02:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/compare-two-internal-tables/m-p/3622310#M872629</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-24T07:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/compare-two-internal-tables/m-p/3622311#M872630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srilatha,&lt;/P&gt;&lt;P&gt;Do like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND LINES OF itab1 TO itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2008 07:05:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/compare-two-internal-tables/m-p/3622311#M872630</guid>
      <dc:creator>vinod_vemuru2</dc:creator>
      <dc:date>2008-03-24T07:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/compare-two-internal-tables/m-p/3622312#M872631</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;pass data of one iternal table into another by &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab1 = itab2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks &amp;amp;regards,&lt;/P&gt;&lt;P&gt;pankaj vashista&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2008 07:10:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/compare-two-internal-tables/m-p/3622312#M872631</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-24T07:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/compare-two-internal-tables/m-p/3622313#M872632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Move the 2 internal table data to one internal table &amp;amp; delete the duplicate entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append lines of itab2 to itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort itab1 by field1 field2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from itab1 comparing field1 field2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2008 07:17:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/compare-two-internal-tables/m-p/3622313#M872632</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-24T07:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/compare-two-internal-tables/m-p/3622314#M872633</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 out..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
itab2[] = itab[].

loop at itab into wa.
loop at itab1 into wa1.

wa-fld1 = wa1-fld1.
append wa to itab2.
endloop.
endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now the itab2 will have the values like you require. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Itab2 ,and the workareas should have the type of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful.&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;Edited by: Akshay Raj on Mar 24, 2008 8:24 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2008 07:23:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/compare-two-internal-tables/m-p/3622314#M872633</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-24T07:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/compare-two-internal-tables/m-p/3622315#M872634</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 [ ] = itab [ ].&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;loop at itab into wa.&lt;/P&gt;&lt;P&gt;loop at itab1 into wa1 where fld1 NE wa-fld1 AND fld2 NE wa-fld2.&lt;/P&gt;&lt;P&gt;wa-fld1 = wa1-fld1.&lt;/P&gt;&lt;P&gt;append wa to itab2.&lt;/P&gt;&lt;P&gt;endloop.&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;by this no duplicates will come into table itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ramesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Ramesh Jakkula on Mar 24, 2008 8:58 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2008 07:58:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/compare-two-internal-tables/m-p/3622315#M872634</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-24T07:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/compare-two-internal-tables/m-p/3622316#M872635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I understand the following. you have internal tables &lt;STRONG&gt;itab itab1&lt;/STRONG&gt;. Also that they have &lt;STRONG&gt;two fields, lets call them x and y.&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;we will declare a work area &lt;STRONG&gt;wa_tab, wa_tab1&lt;/STRONG&gt; of the same type as the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;Your requirement:&lt;/P&gt;&lt;P&gt;&amp;gt;itab has 2 records.&lt;/P&gt;&lt;P&gt;&amp;gt;a b&lt;/P&gt;&lt;P&gt;&amp;gt;c d&lt;/P&gt;&lt;P&gt;&amp;gt;itab1 has 2 records&lt;/P&gt;&lt;P&gt;&amp;gt;z n&lt;/P&gt;&lt;P&gt;&amp;gt;s g&lt;/P&gt;&lt;P&gt;&amp;gt;now my itab should have&lt;/P&gt;&lt;P&gt;&amp;gt;a b&lt;/P&gt;&lt;P&gt;&amp;gt;c d&lt;/P&gt;&lt;P&gt;&amp;gt;z b&lt;/P&gt;&lt;P&gt;&amp;gt;s b&lt;/P&gt;&lt;P&gt;&amp;gt;z d&lt;/P&gt;&lt;P&gt;&amp;gt;s d&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Suggestion:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;loop at itab1 into wa_tab1.&lt;/P&gt;&lt;P&gt;	loop at itab into wa_tab.&lt;/P&gt;&lt;P&gt;		wa_tab-x = wa_tab1-x.&lt;/P&gt;&lt;P&gt;		append wa_tab to itab.&lt;/P&gt;&lt;P&gt;	endloop.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2008 08:25:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/compare-two-internal-tables/m-p/3622316#M872635</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-24T08:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/compare-two-internal-tables/m-p/3622317#M872636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srilatha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do like this .&lt;/P&gt;&lt;P&gt;itab2[] = itab[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab2 into wa2.&lt;/P&gt;&lt;P&gt;loop at itab1 into wa1.&lt;/P&gt;&lt;P&gt;wa2-field1 = wa1-field1&lt;/P&gt;&lt;P&gt;append wa2 to itab.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2008 08:26:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/compare-two-internal-tables/m-p/3622317#M872636</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-24T08:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/compare-two-internal-tables/m-p/3622318#M872637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srilatha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do like this .&lt;/P&gt;&lt;P&gt;take another internal table itab2.&lt;/P&gt;&lt;P&gt;itab2[ ] = itab[ ].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab2 into wa2.&lt;/P&gt;&lt;P&gt;loop at itab1 into wa1.&lt;/P&gt;&lt;P&gt;wa2-field1 = wa1-field1&lt;/P&gt;&lt;P&gt;append wa2 to itab.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2008 08:27:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/compare-two-internal-tables/m-p/3622318#M872637</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-24T08:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: Compare two internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/compare-two-internal-tables/m-p/3622319#M872638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using append itab into itab1 stetement we can populate the datas from one internal table to another.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to delete the duplicate entries please use this statement DELETE ADJACENT DUPLICATES FROM itab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2008 08:45:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/compare-two-internal-tables/m-p/3622319#M872638</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-24T08:45:18Z</dc:date>
    </item>
  </channel>
</rss>

