<?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 Getting the data from select-options in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-the-data-from-select-options/m-p/940887#M63145</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;  I have a select-options field say,&lt;/P&gt;&lt;P&gt;  data:  ABC for f.&lt;/P&gt;&lt;P&gt;  where ABC is an internal table.&lt;/P&gt;&lt;P&gt;  let us say i have entered some set of 10 numbers and i want to move all these 10 numbers into another internal table. How can i move them into anther internal table.&lt;/P&gt;&lt;P&gt;  If i enter some range of numbers like 1 to 50 then how should i retrieve all those numbers from 1 to 50 into another internal table.&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, 19 Jul 2005 21:48:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-07-19T21:48:46Z</dc:date>
    <item>
      <title>Getting the data from select-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-the-data-from-select-options/m-p/940887#M63145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;  I have a select-options field say,&lt;/P&gt;&lt;P&gt;  data:  ABC for f.&lt;/P&gt;&lt;P&gt;  where ABC is an internal table.&lt;/P&gt;&lt;P&gt;  let us say i have entered some set of 10 numbers and i want to move all these 10 numbers into another internal table. How can i move them into anther internal table.&lt;/P&gt;&lt;P&gt;  If i enter some range of numbers like 1 to 50 then how should i retrieve all those numbers from 1 to 50 into another internal table.&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, 19 Jul 2005 21:48:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-the-data-from-select-options/m-p/940887#M63145</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-19T21:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the data from select-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-the-data-from-select-options/m-p/940888#M63146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ranges: new for f.&lt;/P&gt;&lt;P&gt;new[] = abc[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2005 21:59:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-the-data-from-select-options/m-p/940888#M63146</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-19T21:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the data from select-options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-the-data-from-select-options/m-p/940889#M63147</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;You have not mentioned why you want to do that. It is helpful to know the reason becuase to meet your requirement we may not have to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as I know, there's no function module which does this directly. You will have to write the logic for this yourself. For example, let us say that you have the select-options for &amp;lt;b&amp;gt;kunnr&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can code something like this - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select-options s_kunnr for kna1-kunnr.

data it_kunnr type kunnr occurs 0 with header line.

do 10000 times. 
  add 1 to it_kunnr.
  check it_kunnr in s_kunnr.
  append it_kunnr.
enddo.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above method has certain limitations - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. It works only when the field is to contain only the numeric values. Since kunnr is a character field, in some cases it can also contain character values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. There's an upper limit that has been placed for the loop termination. for example, here it is 10000. Otherwise the program will run for ever.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The best approach is to do a select from the database table directly - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT KUNNR 
  FROM KNA1 
  INTO TABLE IT_KUNNR 
 WHERE KUNNR IN S_KUNNR.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2005 03:17:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-the-data-from-select-options/m-p/940889#M63147</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-20T03:17:26Z</dc:date>
    </item>
  </channel>
</rss>

