<?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: Get the Common from Two Internal Tables with same structure in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-the-common-from-two-internal-tables-with-same-structure/m-p/1573943#M259126</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;Say itab1 and itab2 has the common field f1.&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;loop at itab2 where f1 = itab1-f1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write : / itab2-f1.&lt;/P&gt;&lt;P&gt;&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>Tue, 17 Oct 2006 08:52:45 GMT</pubDate>
    <dc:creator>jayanthi_jayaraman</dc:creator>
    <dc:date>2006-10-17T08:52:45Z</dc:date>
    <item>
      <title>Get the Common from Two Internal Tables with same structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-the-common-from-two-internal-tables-with-same-structure/m-p/1573941#M259124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;I need to get the Common data from Two Internal Tables with same structure with using the looping method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For e.g. &lt;/P&gt;&lt;P&gt;I have two internal table say ITAB1 and ITAB2.&lt;/P&gt;&lt;P&gt;ITAB1 has values A,B,C,D,E,F&lt;/P&gt;&lt;P&gt;ITAB2 has values A,H,B,Y,O&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output at runtime should be : A,B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2006 08:50:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-the-common-from-two-internal-tables-with-same-structure/m-p/1573941#M259124</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-17T08:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: Get the Common from Two Internal Tables with same structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-the-common-from-two-internal-tables-with-same-structure/m-p/1573942#M259125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you mean, you want to know the common columns between these tables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2006 08:51:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-the-common-from-two-internal-tables-with-same-structure/m-p/1573942#M259125</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-17T08:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: Get the Common from Two Internal Tables with same structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-the-common-from-two-internal-tables-with-same-structure/m-p/1573943#M259126</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;Say itab1 and itab2 has the common field f1.&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;loop at itab2 where f1 = itab1-f1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write : / itab2-f1.&lt;/P&gt;&lt;P&gt;&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>Tue, 17 Oct 2006 08:52:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-the-common-from-two-internal-tables-with-same-structure/m-p/1573943#M259126</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2006-10-17T08:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: Get the Common from Two Internal Tables with same structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-the-common-from-two-internal-tables-with-same-structure/m-p/1573944#M259127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mohit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt;read table itab2 with key f1 = itab1-f1.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;write: f1.&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;If useful reward.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2006 08:52:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-the-common-from-two-internal-tables-with-same-structure/m-p/1573944#M259127</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-17T08:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Get the Common from Two Internal Tables with same structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-the-common-from-two-internal-tables-with-same-structure/m-p/1573945#M259128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi mohit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. If u want to compare all fields,&lt;/P&gt;&lt;P&gt;   for matching purpose,&lt;/P&gt;&lt;P&gt;   then we can do like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. &lt;/P&gt;&lt;P&gt;report abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : a like t001 occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data : b like t001 occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at a.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF A = B.&lt;/P&gt;&lt;P&gt;      WRITE &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; 'SAME'.&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;&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;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2006 08:53:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-the-common-from-two-internal-tables-with-same-structure/m-p/1573945#M259128</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-17T08:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Get the Common from Two Internal Tables with same structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-the-common-from-two-internal-tables-with-same-structure/m-p/1573946#M259129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mohit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  If you can use the looping then itz simple to extract the details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; loop at itab1.
       read table itab2 with key fld1 = itab-fld1.
       if sy-subrc ne 0.
          delete itab where fld1 = itab-fld1.
       endif.
  endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  By end of this loop you will have all the entries in itab1 which are common both in itab1 and itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2006 08:53:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-the-common-from-two-internal-tables-with-same-structure/m-p/1573946#M259129</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-17T08:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Get the Common from Two Internal Tables with same structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-the-common-from-two-internal-tables-with-same-structure/m-p/1573947#M259130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry my mistake i want it wiothout using the LOOPING Method. &lt;/P&gt;&lt;P&gt;Something like ITAB1 IN ITAB2 etc...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2006 08:58:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-the-common-from-two-internal-tables-with-same-structure/m-p/1573947#M259130</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-17T08:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: Get the Common from Two Internal Tables with same structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-the-common-from-two-internal-tables-with-same-structure/m-p/1573948#M259131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;no u cant do it with out atleast one loop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Oct 2006 09:02:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-the-common-from-two-internal-tables-with-same-structure/m-p/1573948#M259131</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-17T09:02:39Z</dc:date>
    </item>
  </channel>
</rss>

