<?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: select option in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/1415322#M199864</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 simple program,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES SFLIGHT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA ITAB LIKE SFLIGHT OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS FLDATE FOR SFLIGHT-FLDATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM SFLIGHT INTO TABLE ITAB WHERE FLDATE IN FLDATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;WRITE:/...&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best of luck,&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;kcc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 22 Jul 2006 07:58:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-07-22T07:58:40Z</dc:date>
    <item>
      <title>select option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/1415318#M199860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is the purpose of select option?&lt;/P&gt;&lt;P&gt;what are the addition for select option?&lt;/P&gt;&lt;P&gt;For a &amp;#145;Select-Option&amp;#146; variable, what can be done to prevent the user from giving multiple ranges as input?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Jul 2006 04:06:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/1415318#M199860</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-22T04:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: select option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/1415319#M199861</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;Select-options are just like internal tables. they are used to give user a multi selection option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-option have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOW : lower range limit&lt;/P&gt;&lt;P&gt;HIGH : high range limit&lt;/P&gt;&lt;P&gt;SIGN : operator used like =, &amp;lt;&amp;gt; , &amp;lt;= , &amp;gt;=.&lt;/P&gt;&lt;P&gt;OPTION : I = inclulde, E = exclude.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;following are the addition for it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;b&amp;gt;SELECT-OPTIONS sel FOR f. 

1. ... DEFAULT g 
2. ... DEFAULT g ... OPTION xx ... SIGN s 
3. ... DEFAULT g TO h 
4. ... DEFAULT g TO h ... OPTION op ... SIGN s 
5. ... MEMORY ID pid 
6. ... MATCHCODE OBJECT mobj 
7. MODIF ID key 
8. ... NO-DISPLAY 
9. ... LOWER CASE 
10. ... OBLIGATORY 
11. ... NO-EXTENSION 
12. ... NO INTERVALS 
13. ... NO DATABASE SELECTION 
14. ... VALUE-REQUEST 
15. ... VALUE-REQUEST FOR LOW/HIGH 
16. ... HELP-REQUEST 
17. ... HELP-REQUEST FOR LOW/HIGH 
18. ... VISIBLE LENGTH vlen&amp;lt;/b&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use NO-EXTENSION option to stop giving multple ranges.&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;Wasim Ahmed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Jul 2006 04:16:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/1415319#M199861</guid>
      <dc:creator>dani_mn</dc:creator>
      <dc:date>2006-07-22T04:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: select option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/1415320#M199862</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;U can use this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options: carrid for sflight-CARRID&lt;/P&gt;&lt;P&gt; no-extension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CHEERS,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SIMHA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward all the helpful answers..&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Jul 2006 04:22:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/1415320#M199862</guid>
      <dc:creator>Simha_</dc:creator>
      <dc:date>2006-07-22T04:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: select option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/1415321#M199863</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;&amp;lt;b&amp;gt;what is the purpose of select option?&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select option are mainly used in select query.&lt;/P&gt;&lt;P&gt;select * from abc&lt;/P&gt;&lt;P&gt;where field in &amp;lt;Select_option_name&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select option automatically creates logical condition for select query &lt;/P&gt;&lt;P&gt;since select option contains many option like &amp;gt;= , &amp;lt;= &lt;/P&gt;&lt;P&gt;interval etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This simple query is broken in proper select query for data base; based on the option selected in the select option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;eg  ( simple query in abap )&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;select * from abc&lt;/P&gt;&lt;P&gt;where field in &amp;lt;Select_option_name&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;\/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;Actual query may look like this&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;select * from abc&lt;/P&gt;&lt;P&gt;where field &amp;lt;= [Value in select option]  " for internal&lt;/P&gt;&lt;P&gt;  and field &amp;gt;= [Value in select option]  " for internal  &lt;/P&gt;&lt;P&gt;  and field in [value1 value2 value3 etc] " for single value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can alos use select-option in loop&lt;/P&gt;&lt;P&gt;than is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab where field in &amp;lt;Select option&amp;gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------" /&gt;&lt;P&gt;code&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;what are the addition for select option?&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. ... DEFAULT g &lt;/P&gt;&lt;P&gt;2. ... DEFAULT g ... OPTION xx ... SIGN s &lt;/P&gt;&lt;P&gt;3. ... DEFAULT g TO h &lt;/P&gt;&lt;P&gt;4. ... DEFAULT g TO h ... OPTION op ... SIGN s &lt;/P&gt;&lt;P&gt;5. ... MEMORY ID pid &lt;/P&gt;&lt;P&gt;6. ... MATCHCODE OBJECT mobj &lt;/P&gt;&lt;P&gt;7. MODIF ID key &lt;/P&gt;&lt;P&gt;8. ... NO-DISPLAY &lt;/P&gt;&lt;P&gt;9. ... LOWER CASE &lt;/P&gt;&lt;P&gt;10. ... OBLIGATORY &lt;/P&gt;&lt;P&gt;11. ... NO-EXTENSION &lt;/P&gt;&lt;P&gt;12. ... NO INTERVALS &lt;/P&gt;&lt;P&gt;13. ... NO DATABASE SELECTION &lt;/P&gt;&lt;P&gt;14. ... VALUE-REQUEST &lt;/P&gt;&lt;P&gt;15. ... VALUE-REQUEST FOR LOW/HIGH &lt;/P&gt;&lt;P&gt;16. ... HELP-REQUEST &lt;/P&gt;&lt;P&gt;17. ... HELP-REQUEST FOR LOW/HIGH &lt;/P&gt;&lt;P&gt;18. ... VISIBLE LENGTH vlen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;For a &amp;#145;Select-Option&amp;#146; variable, what can be done to prevent the user from giving multiple ranges as input?&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not possible. ( not directly )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but u loop the select option table and count the number of records &amp;lt;b&amp;gt;where SIGN = BT&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;and if the count greater than 1 ..give error&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Jul 2006 06:07:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/1415321#M199863</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-22T06:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: select option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/1415322#M199864</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 simple program,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES SFLIGHT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA ITAB LIKE SFLIGHT OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS FLDATE FOR SFLIGHT-FLDATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM SFLIGHT INTO TABLE ITAB WHERE FLDATE IN FLDATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;WRITE:/...&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best of luck,&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;kcc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Jul 2006 07:58:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/1415322#M199864</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-22T07:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: select option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/1415323#M199865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can also explore on SELECT&lt;STRONG&gt;OPTION&lt;/STRONG&gt;RESTRICT FM which will be used for restricting only multiple ranges.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mainly for controlling F4 of select-option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try with this example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;report sample.
tables: usr02.
type-pools: sscr.
select-options: usrbnam for usr02-bname no intervals,
                creator for usr02-aname no intervals.
data: restrict type sscr_restrict,
      opt_list type sscr_opt_list,
      ass      type sscr_ass.

initialization.
  clear: opt_list.
  opt_list-name = 'EQAL'.
  opt_list-options-eq = 'X'.
  append opt_list to restrict-opt_list_tab.

  clear: ass.
  ass-kind = 'S'.
  ass-name = 'USRBNAM'.
  ass-sg_main = 'I'.
  ass-sg_addy = ' '.
  ass-op_main = 'EQAL'.
  ass-op_addy = 'EQAL'.
  append ass to restrict-ass_tab.

  call function 'SELECT_OPTIONS_RESTRICT'
       exporting
            restriction            = restrict
       exceptions
            too_late               = 1
            repeated               = 2
            selopt_without_options = 3
            selopt_without_signs   = 4
            invalid_sign           = 5
            empty_option_list      = 6
            invalid_kind           = 7
            repeated_kind_a        = 8
            others                 = 9.
  if sy-subrc &amp;lt;&amp;gt; 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.

start-of-selection.
  select * from usr02 where bname in usrbnam
                        and aname in creator.
    write: / usr02-bname, usr02-aname.
  endselect.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds&lt;/P&gt;&lt;P&gt;Manohar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Manohar Reddy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Jul 2006 08:09:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/1415323#M199865</guid>
      <dc:creator>Manohar2u</dc:creator>
      <dc:date>2006-07-22T08:09:55Z</dc:date>
    </item>
  </channel>
</rss>

