<?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: Delete records from internal table using another internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-records-from-internal-table-using-another-internal-table/m-p/3453896#M829816</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Soumya,&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;Before deleting the records from itab2  move those records to one more internal table itab3.&lt;/P&gt;&lt;P&gt;Now you have deleted records  of itab2  in itab3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT ITAB3,ITAB1 by your main key field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab3.&lt;/P&gt;&lt;P&gt;  READ TABLE ITAB1 WITH KEY key field = itab3-&lt;/P&gt;&lt;P&gt;  keyfield.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt; DELETE itab1 where keyfield eq itab3-keyfield.&lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Feb 2008 05:56:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-18T05:56:53Z</dc:date>
    <item>
      <title>Delete records from internal table using another internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-records-from-internal-table-using-another-internal-table/m-p/3453891#M829811</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;I have two internal tables itab1 and itab2 which have same records initially.Later some records of itab2 are deleted .Then i want to delete those records from itab1 also ie,those records not found in itab2 .Is there any method other than looping.&lt;/P&gt;&lt;P&gt;So that itab1 again becomes equal to itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Sowmya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 05:47:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-records-from-internal-table-using-another-internal-table/m-p/3453891#M829811</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T05:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: Delete records from internal table using another internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-records-from-internal-table-using-another-internal-table/m-p/3453892#M829812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab1  = itab2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 05:50:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-records-from-internal-table-using-another-internal-table/m-p/3453892#M829812</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T05:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: Delete records from internal table using another internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-records-from-internal-table-using-another-internal-table/m-p/3453893#M829813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sowmya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The two way outs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) if you have make itab1 = itab2 then you can simply move itab2 to itab1 this will overwrite the records in itab1 with the records of itab2..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) whereever you are deleting the record ffrom itab2 there delete the same record from itab1 also so that no extra loop ia requied to make these tables equal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if useful...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 05:53:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-records-from-internal-table-using-another-internal-table/m-p/3453893#M829813</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T05:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: Delete records from internal table using another internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-records-from-internal-table-using-another-internal-table/m-p/3453894#M829814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sowmya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The two way outs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) if you have make itab1 = itab2 then you can simply move itab2 to itab1 this will overwrite the records in itab1 with the records of itab2..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) whereever you are deleting the record ffrom itab2 there delete the same record from itab1 also so that no extra loop ia requied to make these tables equal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if useful...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 05:55:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-records-from-internal-table-using-another-internal-table/m-p/3453894#M829814</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T05:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: Delete records from internal table using another internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-records-from-internal-table-using-another-internal-table/m-p/3453895#M829815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;YOU HAVE TO USE - DELETE TABLE itab [FROM wa]. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you need to loop at in your itab2 into your work area , and then delete the corresponding entry from your itab1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Varun Mathur&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Varun Mathur on Feb 18, 2008 6:55 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 05:55:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-records-from-internal-table-using-another-internal-table/m-p/3453895#M829815</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T05:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: Delete records from internal table using another internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-records-from-internal-table-using-another-internal-table/m-p/3453896#M829816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Soumya,&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;Before deleting the records from itab2  move those records to one more internal table itab3.&lt;/P&gt;&lt;P&gt;Now you have deleted records  of itab2  in itab3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT ITAB3,ITAB1 by your main key field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab3.&lt;/P&gt;&lt;P&gt;  READ TABLE ITAB1 WITH KEY key field = itab3-&lt;/P&gt;&lt;P&gt;  keyfield.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt; DELETE itab1 where keyfield eq itab3-keyfield.&lt;/P&gt;&lt;P&gt;ENDIF. &lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 05:56:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-records-from-internal-table-using-another-internal-table/m-p/3453896#M829816</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T05:56:53Z</dc:date>
    </item>
  </channel>
</rss>

