<?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: Comparing two internal tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-two-internal-tables/m-p/3263938#M779937</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SAP tech.. use this sample code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sort table itab2 by k1 k2 k3..&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;      read table itab2 with key k1 = itab1-k1&lt;/P&gt;&lt;P&gt;                                          k2 = itab1-k2 binary search.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt; delete itab2 index sy-index.&lt;/P&gt;&lt;P&gt;endif.&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;finally itab2 will have that sort of entries which are not in Itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Award points if helpful&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 20 Jan 2008 01:22:39 GMT</pubDate>
    <dc:creator>former_member156446</dc:creator>
    <dc:date>2008-01-20T01:22:39Z</dc:date>
    <item>
      <title>Comparing two internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-two-internal-tables/m-p/3263937#M779936</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;&lt;/P&gt;&lt;P&gt;    I have one internal table itab1 which has contents from legacy system. Now I have another internal table itab2 which has contents from a SAP standard table,i.e. AMPL. I have to compare the contents of these two tables i.e. itab1 and itab2 and add those entries to the AMPL table which are present in itab1 but not in itab2. I can explain it more if anyone helps me out here. Points assured.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jan 2008 23:49:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-two-internal-tables/m-p/3263937#M779936</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-19T23:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-two-internal-tables/m-p/3263938#M779937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SAP tech.. use this sample code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sort table itab2 by k1 k2 k3..&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;      read table itab2 with key k1 = itab1-k1&lt;/P&gt;&lt;P&gt;                                          k2 = itab1-k2 binary search.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt; delete itab2 index sy-index.&lt;/P&gt;&lt;P&gt;endif.&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;finally itab2 will have that sort of entries which are not in Itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Award points if helpful&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Jan 2008 01:22:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-two-internal-tables/m-p/3263938#M779937</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2008-01-20T01:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-two-internal-tables/m-p/3263939#M779938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;      For comparing 2 internal tables first we want to sort the two internal tables.&lt;/P&gt;&lt;P&gt;But in some cases we dont know whether the two tables contain the same number of values(records).So we want to compare a single value to another int table.&lt;/P&gt;&lt;P&gt;If there is any key value means we can check it with that by comparing tht particular value in loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table itab1 with key field values = itab-keyvalue. / We can also use loop at itab1 where keyvalue = itab-keyvalue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;if it matches we can do wht evr inside this block&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;reward if useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Jan 2008 03:31:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-two-internal-tables/m-p/3263939#M779938</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-20T03:31:03Z</dc:date>
    </item>
  </channel>
</rss>

