<?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 internal table entries using range table w.multiple ranges in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-internal-table-entries-using-range-table-w-multiple-ranges/m-p/1609573#M273440</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the response. Yes, both the main internal table and the range table are defined with "occurs n". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, the reason why I need to delete the entries in the internal table is because it gives me a runtime error when I do the select usign the range table directly. &amp;lt;u&amp;gt;The range table has more than 2K ranges.&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I saw some discussion in this forum mentioning about the overflow of the SQL access but cannot find a solution to it so I decide to widen the range of the select statment and delete the entries after the selection is done. But it still does not work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Oct 2006 23:00:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-05T23:00:25Z</dc:date>
    <item>
      <title>Delete internal table entries using range table w.multiple ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-internal-table-entries-using-range-table-w-multiple-ranges/m-p/1609570#M273437</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 am trying to delete the entries in an internal table using a range table which has multiple (a lot) ranges but the delete statement will not take it.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;delete int_tab where f1 not in range_tab&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;lt;b&amp;gt;int_tab&amp;lt;/b&amp;gt; is the main internal table. &amp;lt;b&amp;gt;Range_tab&amp;lt;/b&amp;gt; is a range table which only has sign, option, low and high as the fields but multiple rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It gives me a syntax error of &amp;lt;%_L003&amp;gt; is not an internal table - the "occurs n" specificiation is missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anybody have any suggestion on how I can delete the entries in the internal table where the value of f1 is not within the range of the range table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Oct 2006 22:43:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-internal-table-entries-using-range-table-w-multiple-ranges/m-p/1609570#M273437</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-05T22:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: Delete internal table entries using range table w.multiple ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-internal-table-entries-using-range-table-w-multiple-ranges/m-p/1609571#M273438</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;Just check if the occurs addition is there in internal table defination or not. if it is not there then it will behave as work area hence the error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you are declaring internal table with refrence to database table or structure then it should be like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data int_tab like vbak occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you are declaring the fields and declaring internal table then &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data : begin of int_tab occurs 0,&lt;/P&gt;&lt;P&gt;        fi like  ....,&lt;/P&gt;&lt;P&gt;        f2 like  ....,&lt;/P&gt;&lt;P&gt;       end of int_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also change your delete statement as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;delete int_tab where not f1 in range_tab.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Oct 2006 22:50:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-internal-table-entries-using-range-table-w-multiple-ranges/m-p/1609571#M273438</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-05T22:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Delete internal table entries using range table w.multiple ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-internal-table-entries-using-range-table-w-multiple-ranges/m-p/1609572#M273439</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;Does your range_tab is defined like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt; BEGIN OF sel_record,&lt;/P&gt;&lt;P&gt;    sign(1),&lt;/P&gt;&lt;P&gt;    option(2),&lt;/P&gt;&lt;P&gt;    low  LIKE [dictionary-type] ,&lt;/P&gt;&lt;P&gt;    high LIKE [dictionary-type],&lt;/P&gt;&lt;P&gt;  END OF sel_record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;   range_tab TYPE STANDARD TABLE OF sel_record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error message you're getting is that probably your range_tab is not defined as an internal table as it should be so the &amp;lt;b&amp;gt;not in&amp;lt;/b&amp;gt; works as it should.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gilberto Li&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Oct 2006 22:55:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-internal-table-entries-using-range-table-w-multiple-ranges/m-p/1609572#M273439</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-05T22:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: Delete internal table entries using range table w.multiple ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-internal-table-entries-using-range-table-w-multiple-ranges/m-p/1609573#M273440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the response. Yes, both the main internal table and the range table are defined with "occurs n". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, the reason why I need to delete the entries in the internal table is because it gives me a runtime error when I do the select usign the range table directly. &amp;lt;u&amp;gt;The range table has more than 2K ranges.&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I saw some discussion in this forum mentioning about the overflow of the SQL access but cannot find a solution to it so I decide to widen the range of the select statment and delete the entries after the selection is done. But it still does not work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Oct 2006 23:00:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-internal-table-entries-using-range-table-w-multiple-ranges/m-p/1609573#M273440</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-05T23:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: Delete internal table entries using range table w.multiple ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-internal-table-entries-using-range-table-w-multiple-ranges/m-p/1609574#M273441</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;  How did you declare the ranges..See example..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  RANGES: R_MATNR FOR MARA-MATNR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DELETE INT_TAB WHERE MATNR NOT IN R_MATNR.&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;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Oct 2006 23:04:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-internal-table-entries-using-range-table-w-multiple-ranges/m-p/1609574#M273441</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-05T23:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: Delete internal table entries using range table w.multiple ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-internal-table-entries-using-range-table-w-multiple-ranges/m-p/1609575#M273442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The ranges table need to be defined with for option , it should not have occurs addition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ranges s_vbeln for vbak-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes there is limitation to use more number of values in where condition , if it exceeds some limit then it will give dump. Also it the data in the internal table exceeds the predefined size in RZ10 then also it dumps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Pl mark points to all helpful answers and close the thread if problem is solved.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Imtiaz Ahmed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Oct 2006 23:04:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-internal-table-entries-using-range-table-w-multiple-ranges/m-p/1609575#M273442</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-05T23:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: Delete internal table entries using range table w.multiple ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-internal-table-entries-using-range-table-w-multiple-ranges/m-p/1609576#M273443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you range table has 2k ranges, you should change your delete statement or logic. I have faced similar issues to dumps because of large amount of records in a range internal table being used in a statement such as select, or delete. There is a limitation when the range itab has too many records, don't really know what's the limit, but you could try changing your delete logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gilberto Li&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Oct 2006 23:06:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-internal-table-entries-using-range-table-w-multiple-ranges/m-p/1609576#M273443</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-05T23:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: Delete internal table entries using range table w.multiple ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/delete-internal-table-entries-using-range-table-w-multiple-ranges/m-p/1609577#M273444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Minami,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why dont you change your delete statement to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
delete int_tab where f1 in range_tab
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course then you'll have to change all your signs to E (exclude)&lt;/P&gt;&lt;P&gt;ie &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;range_tab-sign = 'E'&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The point is now you can divide your range tab into four (500 entries per range tab is ok)&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
append lines of range_tab from 1 to 500 to range_tab1
append lines of range_tab from 501 to 1000 to range_tab2
... etc ... 
delete int_tab where f1 in range_tab1
delete int_tab where f1 in range_tab2
delete int_tab where f1 in range_tab3
delete int_tab where f1 in range_tab4

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Phil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Oct 2006 23:58:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/delete-internal-table-entries-using-range-table-w-multiple-ranges/m-p/1609577#M273444</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-05T23:58:51Z</dc:date>
    </item>
  </channel>
</rss>

