<?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 Runtime error using range table in select query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-using-range-table-in-select-query/m-p/5440713#M1247784</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have to select tcodes from table tstc, based on the entries in ust12, &lt;/P&gt;&lt;P&gt;the entries in ust12-von and ust12-bis, these contains wild charcters also,  and i have to selct all the tcodes  from von to bis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so ia m preparing a range table for the entries in ust12, and querying table tstc, then i am getting a runtime error with following description.&lt;/P&gt;&lt;P&gt;'If the problem occurred because an excessively large table was used&lt;/P&gt;&lt;P&gt;in an IN itab construct, you can use FOR ALL ENTRIES instead.'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but how can i use FOR ALL ENTRIES here, because if von = A* and bis = AB*,then i ahve to read all the entries from AAAA till ABZZ (may be something like this),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there any way to write this query, with out runtime error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there are total 15000 entries in ust12, i am preparing range table for 3000 entries each and querying tstc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Amarender Reddy B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Mar 2009 05:04:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-31T05:04:03Z</dc:date>
    <item>
      <title>Runtime error using range table in select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-using-range-table-in-select-query/m-p/5440713#M1247784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have to select tcodes from table tstc, based on the entries in ust12, &lt;/P&gt;&lt;P&gt;the entries in ust12-von and ust12-bis, these contains wild charcters also,  and i have to selct all the tcodes  from von to bis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so ia m preparing a range table for the entries in ust12, and querying table tstc, then i am getting a runtime error with following description.&lt;/P&gt;&lt;P&gt;'If the problem occurred because an excessively large table was used&lt;/P&gt;&lt;P&gt;in an IN itab construct, you can use FOR ALL ENTRIES instead.'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but how can i use FOR ALL ENTRIES here, because if von = A* and bis = AB*,then i ahve to read all the entries from AAAA till ABZZ (may be something like this),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there any way to write this query, with out runtime error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there are total 15000 entries in ust12, i am preparing range table for 3000 entries each and querying tstc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Amarender Reddy B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2009 05:04:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-using-range-table-in-select-query/m-p/5440713#M1247784</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-31T05:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error using range table in select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-using-range-table-in-select-query/m-p/5440714#M1247785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes, you can.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use ranges in the same way as FOR ALL ENTRIES do it. Split the internal table into&lt;/P&gt;&lt;P&gt;smaller blocks before you use the ranges, Try something like the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 
DESCRIBE TABLE rnage_tab LINES no_lines.

IF ( NO_LINES &amp;lt; 500 )
  .... normal select

ELSE.
   steps = no_lines / 500 + 0.5.

count = 0.
DO steps times.
   count = count + 1.
   idx_low  = 500 * ( count - 1 ).
   idx_high = 500 * ( count - 1 ).
   APPEND LINES OF range_tab FROM idx_low TO idx_high TO range_block.
   ... your select with range_block ...
* don't forget :   
   REFRESH range_bllock.
ENDDO.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Depending on your statement you should reduce the blocksize a bit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siegfried&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2009 07:43:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-using-range-table-in-select-query/m-p/5440714#M1247785</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-31T07:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error using range table in select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-using-range-table-in-select-query/m-p/5440715#M1247786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Due to the nature of the UST12 entries, there will be a lot of duplicate VON / BIS ranges, so you should get rid of these first. This might reduce the range table significantly.&lt;/P&gt;&lt;P&gt;Also, I think there will be a problem with your example "von = A&lt;STRONG&gt;, bis = AB&lt;/STRONG&gt;", since you cannot simply put this in a range as "low = A&lt;STRONG&gt;, high = AB&lt;/STRONG&gt;", as this does not work with option CP, it will not give the desired result. So like you suspected, you must translate this yourself first into a range that gives the desired result.&lt;/P&gt;&lt;P&gt;Take a look at how program RSUSR010 does it, or function module SUSR_GET_TCODES_WITH_AUTH_LIST.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2009 07:59:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-using-range-table-in-select-query/m-p/5440715#M1247786</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2009-03-31T07:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error using range table in select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-using-range-table-in-select-query/m-p/5440716#M1247787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ranges table have a limit when used in a query. It depends on your database. It is usually around 800 - 1600 records. So either give the range as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 
r_table-sign = 'I'.
r_table-option = 'BT'.
r_table-low = lower_limit.
r_table-high = higher limit. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;well there is no exact figure as to how many records there can be in the ranges table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2009 08:28:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-using-range-table-in-select-query/m-p/5440716#M1247787</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-31T08:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error using range table in select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-using-range-table-in-select-query/m-p/5440717#M1247788</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;Instead of using equal use Like statment in you query. Like = ''. But for performance would not be as good as with '='.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the sample code from SAP help document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS srch_str TYPE c LENGTH 20. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA text_tab TYPE TABLE OF doktl. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE '%' srch_str '%' INTO srch_str. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * &lt;/P&gt;&lt;P&gt;       FROM doktl &lt;/P&gt;&lt;P&gt;       INTO TABLE text_tab &lt;/P&gt;&lt;P&gt;       WHERE doktext LIKE srch_str. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Run your report in background.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prashant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Prashant Kumar Upadhyay on Apr 1, 2009 10:55 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2009 08:54:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-using-range-table-in-select-query/m-p/5440717#M1247788</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-01T08:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime error using range table in select query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-using-range-table-in-select-query/m-p/5440718#M1247789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Thomas, The issue is solved&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2009 09:00:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/runtime-error-using-range-table-in-select-query/m-p/5440718#M1247789</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-01T09:00:37Z</dc:date>
    </item>
  </channel>
</rss>

