<?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 data from 1st table based on the 2nd table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-data-from-1st-table-based-on-the-2nd-table/m-p/6473509#M1417671</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;The above code will not work properly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your check for subrc is ok But if it is true, then it deletes the entries which is common to both the tables which is not the requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PLease clarify&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Jerry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Mar 2010 17:49:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-03-03T17:49:17Z</dc:date>
    <item>
      <title>Delete data from 1st table based on the 2nd table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-data-from-1st-table-based-on-the-2nd-table/m-p/6473507#M1417669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement in which I need to delete the data of 1st table based on the data from the 2nd table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st internal table has the following entries:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;GT_T001W&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MTES&lt;/P&gt;&lt;P&gt;Z001&lt;/P&gt;&lt;P&gt;Z002&lt;/P&gt;&lt;P&gt;Z003&lt;/P&gt;&lt;P&gt;Z004&lt;/P&gt;&lt;P&gt;Z005&lt;/P&gt;&lt;P&gt;ZREF&lt;/P&gt;&lt;P&gt;ZTST&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2nd internal table has the following entries:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Gt_mard&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;14	M004	000000000000276001	1000	9987.990&lt;/P&gt;&lt;P&gt;15	M002	000000000000276003	1000	6.000&lt;/P&gt;&lt;P&gt;16	M004	000000000000276003	1000	3.600&lt;/P&gt;&lt;P&gt;17	Z003	000000009800000635	1001	100.000-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want that in GT_MARD, all the entries except the common one (Z003) should be deleted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ajay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Dec 2009 14:12:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-data-from-1st-table-based-on-the-2nd-table/m-p/6473507#M1417669</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-21T14:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: Delete data from 1st table based on the 2nd table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-data-from-1st-table-based-on-the-2nd-table/m-p/6473508#M1417670</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;Loop at GT_T001W .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read table Gt_mard with key MTES = gt_t001w-mtes.&lt;/P&gt;&lt;P&gt;If sy-subrc = 0.&lt;/P&gt;&lt;P&gt;   delete gt_mard index sy-tabix.&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;Try this .. this will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raghu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Dec 2009 14:16:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-data-from-1st-table-based-on-the-2nd-table/m-p/6473508#M1417670</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-21T14:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: Delete data from 1st table based on the 2nd table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-data-from-1st-table-based-on-the-2nd-table/m-p/6473509#M1417671</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;The above code will not work properly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your check for subrc is ok But if it is true, then it deletes the entries which is common to both the tables which is not the requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PLease clarify&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Jerry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Mar 2010 17:49:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-data-from-1st-table-based-on-the-2nd-table/m-p/6473509#M1417671</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-03T17:49:17Z</dc:date>
    </item>
  </channel>
</rss>

