<?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 2 internal tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/compare-2-internal-tables/m-p/1373505#M183432</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="1629977"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at table1.
 
read table table2 where pmkey = pmkey2.
      
IF SY-SUBRC = 0.
 
delete table1.
 
ENDIF.
 
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above code removes the data from new table...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 May 2006 11:51:12 GMT</pubDate>
    <dc:creator>rahulkavuri</dc:creator>
    <dc:date>2006-05-16T11:51:12Z</dc:date>
    <item>
      <title>Compare 2 internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/compare-2-internal-tables/m-p/1373502#M183429</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 2 internal tables containing records from 2 different database tables.&lt;/P&gt;&lt;P&gt;How can i compare the 2 internal tables and produce result that the record exists in one table&lt;/P&gt;&lt;P&gt;but not in the second table.&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;&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reddy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2006 11:44:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/compare-2-internal-tables/m-p/1373502#M183429</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-16T11:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/compare-2-internal-tables/m-p/1373503#M183430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;same..&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="1486374"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2006 11:47:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/compare-2-internal-tables/m-p/1373503#M183430</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-16T11:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/compare-2-internal-tables/m-p/1373504#M183431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Prabhakar,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  do this way,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;sort it_mseg2.&lt;/P&gt;&lt;P&gt;LOOP AT it_ekpo.&lt;/P&gt;&lt;P&gt;READ TABLE it_mseg2 binary search WITH KEY ebeln = it_ekpo-ebeln.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;it_ekpo1 = it_ekpo.&lt;/P&gt;&lt;P&gt;append it_ekpo1.&lt;/P&gt;&lt;P&gt;clear it_ekpo1.&lt;/P&gt;&lt;P&gt;ENDIF.&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;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2006 11:49:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/compare-2-internal-tables/m-p/1373504#M183431</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-16T11:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/compare-2-internal-tables/m-p/1373505#M183432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="1629977"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at table1.
 
read table table2 where pmkey = pmkey2.
      
IF SY-SUBRC = 0.
 
delete table1.
 
ENDIF.
 
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above code removes the data from new table...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2006 11:51:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/compare-2-internal-tables/m-p/1373505#M183432</guid>
      <dc:creator>rahulkavuri</dc:creator>
      <dc:date>2006-05-16T11:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/compare-2-internal-tables/m-p/1373506#M183433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Loop at one internal table1 .&lt;/P&gt;&lt;P&gt;Read theinternal table2 with some ctiteria to compare(Decide the deletion criteria based on some fields).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then delete the rwo from internal table 2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2006 11:51:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/compare-2-internal-tables/m-p/1373506#M183433</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-16T11:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/compare-2-internal-tables/m-p/1373507#M183434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;loop at table1 .&lt;/P&gt;&lt;P&gt;read table table2 with key ....&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0 .&lt;/P&gt;&lt;P&gt;*record is there&lt;/P&gt;&lt;P&gt;else .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;move the record to result tab .&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endif .&lt;/P&gt;&lt;P&gt;endloop .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at table2 .&lt;/P&gt;&lt;P&gt;read table table1 with key ....&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0 .&lt;/P&gt;&lt;P&gt;*record is there&lt;/P&gt;&lt;P&gt;else .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;move the record to result tab .&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;Regards&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2006 11:54:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/compare-2-internal-tables/m-p/1373507#M183434</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2006-05-16T11:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/compare-2-internal-tables/m-p/1373508#M183435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;if there are comman fields in the 2 internal tables , 
add one more flag to itab2 of length 1

loop at itab1.

   read table itab2 with key keyfield1 = itab1-keyfield1 ....
       if sy-subrc = 0.
          itab2-flag = 'X'.
        modify itab2 transporting flag.
         endif.
endloop.

now depending on flag value u can distinguish them
         &lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 May 2006 11:54:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/compare-2-internal-tables/m-p/1373508#M183435</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-16T11:54:30Z</dc:date>
    </item>
  </channel>
</rss>

