<?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 entries from custom table.... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-entries-from-custom-table/m-p/3373494#M810017</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;Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: itab1 type standard table of z1,&lt;/P&gt;&lt;P&gt;BEGIN of itab2 OCCURS 0,&lt;/P&gt;&lt;P&gt;doc type opbel,&lt;/P&gt;&lt;P&gt;end of itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select docnum from ERDK&lt;/P&gt;&lt;P&gt;into table itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check itab2[] is not initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from Z1&lt;/P&gt;&lt;P&gt;into table itab1&lt;/P&gt;&lt;P&gt;for all entries in itab2&lt;/P&gt;&lt;P&gt;where doc_num NE itab2-doc. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc is initial.&lt;/P&gt;&lt;P&gt;DELETE z1 FROM TABLE itab1. &lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: I have coded only for Z1. You can repeat the same for Z2 and Z3 if you find it satisfactory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Jan 22, 2008 12:05 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Jan 2008 15:11:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-22T15:11:15Z</dc:date>
    <item>
      <title>delete entries from custom table....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-entries-from-custom-table/m-p/3373492#M810015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 3 Customized Ze tables Z1,Z2 and Z3.All the 3 tables has very large volume of data.In terms of Gb (~10^10 entries).&lt;/P&gt;&lt;P&gt;Z1,Z2 and Z3 tables has primary key as doc_num.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to compare doc_num from Z1 table with ERDK table opbel.If the entry is not present in ERDK then I need to delete from Z1,Z2 and Z3 tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest how to approach this.As the volume of the data in tables is extremely high I need to take care of performance also.Please suggest &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2008 14:53:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-entries-from-custom-table/m-p/3373492#M810015</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-22T14:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: delete entries from custom table....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-entries-from-custom-table/m-p/3373493#M810016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;select doc_num from Z1 into table itab.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;sort itab by doc_num.&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from itab comparing doc_num.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select opbel from ERDK into table itab2.&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;sort itab2 by opbel.&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from itab2 comparing opbel.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;read table itab2 with key opbel = itab-doc_num binary search.&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;itab3-doc_num = itab-doc_num.&lt;/P&gt;&lt;P&gt;append itab3.&lt;/P&gt;&lt;P&gt;clear itab3.&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 not itab3[] is initial.&lt;/P&gt;&lt;P&gt;loop at itab3.&lt;/P&gt;&lt;P&gt;delete Z1 where doc_num = itab3-doc_num.&lt;/P&gt;&lt;P&gt;delete Z2 where doc_num = itab3-doc_num.&lt;/P&gt;&lt;P&gt;delete Z3 where doc_num = itab3-doc_num.&lt;/P&gt;&lt;P&gt;endloop.&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;Regards&lt;/P&gt;&lt;P&gt;Vasu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2008 15:06:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-entries-from-custom-table/m-p/3373493#M810016</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-22T15:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: delete entries from custom table....</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-entries-from-custom-table/m-p/3373494#M810017</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;Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: itab1 type standard table of z1,&lt;/P&gt;&lt;P&gt;BEGIN of itab2 OCCURS 0,&lt;/P&gt;&lt;P&gt;doc type opbel,&lt;/P&gt;&lt;P&gt;end of itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select docnum from ERDK&lt;/P&gt;&lt;P&gt;into table itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check itab2[] is not initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from Z1&lt;/P&gt;&lt;P&gt;into table itab1&lt;/P&gt;&lt;P&gt;for all entries in itab2&lt;/P&gt;&lt;P&gt;where doc_num NE itab2-doc. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc is initial.&lt;/P&gt;&lt;P&gt;DELETE z1 FROM TABLE itab1. &lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: I have coded only for Z1. You can repeat the same for Z2 and Z3 if you find it satisfactory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Jan 22, 2008 12:05 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2008 15:11:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-entries-from-custom-table/m-p/3373494#M810017</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-22T15:11:15Z</dc:date>
    </item>
  </channel>
</rss>

