<?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: Splitting Select Options in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-select-options/m-p/7159152#M1515598</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are sure that there are only single values in the select-options (cf. [SELECT_OPTIONS_RESTRICT|http://wiki.sdn.sap.com/wiki/display/Snippets/Restrict&lt;EM&gt;Select&lt;/EM&gt;Options]) you can use a FOR ALL ENTRIES&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT (fields) INTO TABLE &amp;lt;itab&amp;gt; FROM &amp;lt;table&amp;gt;
  FOR ALL ENTRIES IN &amp;lt;select_options&amp;gt; 
  WHERE &amp;lt;keyfield&amp;gt; EQ &amp;lt;select_options&amp;gt;-low.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You don' need to build another internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NB: When you got a dump from SQL in ST22, call transaction SM21, the system log may contain a more comprehensive error text from the SQL database.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Aug 2010 05:56:00 GMT</pubDate>
    <dc:creator>RaymondGiuseppi</dc:creator>
    <dc:date>2010-08-26T05:56:00Z</dc:date>
    <item>
      <title>Splitting Select Options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-select-options/m-p/7159147#M1515593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am facing a problem in splitting the Select options for my screen. What I have to do is I am expecting the User to enter around 5000 records in the Select Options. I have to use 2000 records at a time for processing, which means three set of records of 2000, 2000 and 500.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please tell me how can this be achieved??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Aug 2010 11:06:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-select-options/m-p/7159147#M1515593</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-25T11:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting Select Options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-select-options/m-p/7159148#M1515594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you mean by split?  If you have to use 2000 records at a time, will the user enter those by copy and paste function in select-options additional screen?  Or, are you getting all rows that match a particular selection criteria from a db tabe?  If so, find the documentation (SAP HELP) and add &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;package size&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; to your SELECT statement.  This is simple and you can find MANY posts on this subject in the forums.  Although I'm not a moderator (others give generously of their time for that), I would advise you to read forum posting rules and STF &lt;STRONG&gt;(Search the forums)&lt;/STRONG&gt;, as well as make use of your F1 help on ABAP Keywords in your editor.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Aug 2010 11:13:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-select-options/m-p/7159148#M1515594</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-25T11:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting Select Options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-select-options/m-p/7159149#M1515595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you sure that even reducing the SELECT-OPTION to package of 2000 will be enough, in some database the system will raise an error related to a too large SQL statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Splitting an internal table (as SELECT-OPTIONS are) is very easy. (see bellow)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But be aware that some records may be exclusions, like :&lt;/P&gt;&lt;P&gt;- SIGN = 'E' and OPTION is one of the positive operator like EQ, BT or CP&lt;/P&gt;&lt;P&gt;- SIGN = 'I' and OPTION is one of the negative operator (every operator except the three previous)&lt;/P&gt;&lt;P&gt;Those records must be in every package of selection&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so loop at select-options&lt;/P&gt;&lt;P&gt;- put the exclusion in a first internal table&lt;/P&gt;&lt;P&gt;loop once again at select-options excluding the records of the previous loop&lt;/P&gt;&lt;P&gt;- append to a temporary internal table&lt;/P&gt;&lt;P&gt;- when number of record equal maximal number allowed for a SQL SELECT minus the number of record in the first internal table, execute the SELECT, clear the temporary internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To bypass this problem&lt;/P&gt;&lt;P&gt;- don't use those record to build the partial select-options but delete records after select from database &lt;/P&gt;&lt;P&gt;- You could(should) consider restricting select-options allowed options ([SELECT_OPTIONS_RESTRICT|http://wiki.sdn.sap.com/wiki/display/Snippets/Restrict&lt;EM&gt;Select&lt;/EM&gt;Options]) so you wont have to execute this and only have to split an internal table with statement like [APPEND|http://help.sap.com/abapdocu_70/en/ABAPAPPEND.htm] [LINES OF jtab [FROM idx1] [TO idx2] |http://help.sap.com/abapdocu_70/en/ABAPAPPEND_LINESPEC.htm#&amp;amp;ABAP_ALTERNATIVE_3@3@] &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Aug 2010 11:32:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-select-options/m-p/7159149#M1515595</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2010-08-25T11:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting Select Options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-select-options/m-p/7159150#M1515596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes I am expecting the user to paste a total of around 5000 records. See what is actually happening is when the user enters 2000 records for the select option, the program seems to be working fine. But when the number of records increases to around 5000, it starts giving a dump.&lt;/P&gt;&lt;P&gt;One reason for this may be that the size limit for the SELECT statement that I am using may have reached when the number was 2000. As the number increases the database is unable to handle the size. That is why I wanted to use 2000 records at a time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Aug 2010 11:51:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-select-options/m-p/7159150#M1515596</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-25T11:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting Select Options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-select-options/m-p/7159151#M1515597</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;    If all the values are pasted in low value of the select options , then loop at this select option and populate an &lt;/P&gt;&lt;P&gt;    internal table with these values.&lt;/P&gt;&lt;P&gt;    Now write the select on the table you want using for all entries on the above table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   say s_pernr is your select option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    loop at s_pernr.&lt;/P&gt;&lt;P&gt;      itab-pernr = s_pernr-low.&lt;/P&gt;&lt;P&gt;      append itab.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if not itab[] is initial.&lt;/P&gt;&lt;P&gt;      select f1 f2 .... from &amp;lt;table&amp;gt;  into &amp;lt;int_table&amp;gt;&lt;/P&gt;&lt;P&gt;                 for all entries in itab &lt;/P&gt;&lt;P&gt;                 where pernr = itab-pernr.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Srini.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Aug 2010 12:10:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-select-options/m-p/7159151#M1515597</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-25T12:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: Splitting Select Options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-select-options/m-p/7159152#M1515598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are sure that there are only single values in the select-options (cf. [SELECT_OPTIONS_RESTRICT|http://wiki.sdn.sap.com/wiki/display/Snippets/Restrict&lt;EM&gt;Select&lt;/EM&gt;Options]) you can use a FOR ALL ENTRIES&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT (fields) INTO TABLE &amp;lt;itab&amp;gt; FROM &amp;lt;table&amp;gt;
  FOR ALL ENTRIES IN &amp;lt;select_options&amp;gt; 
  WHERE &amp;lt;keyfield&amp;gt; EQ &amp;lt;select_options&amp;gt;-low.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You don' need to build another internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NB: When you got a dump from SQL in ST22, call transaction SM21, the system log may contain a more comprehensive error text from the SQL database.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Aug 2010 05:56:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-select-options/m-p/7159152#M1515598</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2010-08-26T05:56:00Z</dc:date>
    </item>
  </channel>
</rss>

