<?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/3392320#M814550</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vasanth.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to assign this logic for particular field,where i need to declare my fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Feb 2008 10:59:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-18T10:59:24Z</dc:date>
    <item>
      <title>select-option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/3392316#M814546</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 don't want to give the user the possibility to select a range, select values "greater than", etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got sample code from but its not working perfectly.could you help me ,in this senario?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/840ad679-0601-0010-cd8e-9989fd650822#q-2" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/840ad679-0601-0010-cd8e-9989fd650822#q-2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code as follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT ZDANY_RESTRICT_SELECTION.
					
* Include type pool SSCR
    TYPE-POOLS sscr.
    TABLES : sflight.
					
* defining the selection-screen
    select-options :
        s_carrid for sflight-carrid,
        s_connid for sflight-connid.
					
* Define the object to be passed to the RESTRICTION parameter
    DATA restrict TYPE sscr_restrict.
					
* Auxiliary objects for filling RESTRICT
    DATA :     optlist TYPE sscr_opt_list,
                    ass type sscr_ass.
					
    INITIALIZATION.
* Restricting the carrid selection to only EQ and 'BT'.
    optlist-name = 'OBJECTKEY1'.
    optlist-options-eq = 'X'.
    optlist-options-bt = 'X'.
    APPEND optlist TO restrict-opt_list_tab.
					
    ass-kind = 'S'.
    ass-name = 'S_carrid'.
    ass-sg_main = 'I'.
    ass-sg_addy = space.
    ass-op_main = 'OBJECTKEY1'.
    APPEND ass TO restrict-ass_tab.
					
* Restricting the connid selection to CP, GE, LT, NE.
    optlist-name = 'OBJECTKEY2'.
    optlist-options-cp = 'X'.
    optlist-options-ge = 'X'.
    optlist-options-lt = 'X'.
    optlist-options-ne = 'X'.
    APPEND optlist TO restrict-opt_list_tab.
					
    ass-kind = 'S'.
    ass-name = 'S_connid'.
    ass-sg_main = 'I'.
    ass-sg_addy = space.
    ass-op_main = 'OBJECTKEY2'.
    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.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Feb 18, 2008 5:44 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 10:27:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/3392316#M814546</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T10:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: select-option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/3392317#M814547</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;   Use the addition NO INTERVALS &amp;amp; NO-EXTENSION for that particular select-options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Bujji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 10:30:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/3392317#M814547</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T10:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: select-option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/3392318#M814548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Jay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this sample:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
INITIALIZATION.
  PERFORM restrictions.
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  restrictions
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM restrictions.

  DATA: l_wa_opt_list TYPE sscr_opt_list,     "TYPE-POOLS: SSCR
        l_wa_ass      TYPE sscr_ass.

  DATA: l_it_restrict TYPE sscr_restrict.

* Für die Selektions-Optionen 'SO_DO_FL' und 'SO_DO_FH' nur
* Einzelwerte zulassen:
* Realisierung: SIGN = 'I' AND OPTION = 'EQ'.
  l_wa_opt_list-name = 'Schema_IEQ'.
  MOVE 'X' TO l_wa_opt_list-options-eq.     "nur OPTION 'EQ' erlaubt
  APPEND l_wa_opt_list TO l_it_restrict-opt_list_tab.

  MOVE: 'S'          TO l_wa_ass-kind,
        'SO_DO_FL'   TO l_wa_ass-name,
        '*'          TO l_wa_ass-sg_main,    "SIGN 'I' und 'E' erlaubt
        ' '          TO l_wa_ass-sg_addy,    "wie MAIN
        'Schema_IEQ' TO l_wa_ass-op_main,
        'Schema_IEQ' TO l_wa_ass-op_addy.
  APPEND l_wa_ass TO l_it_restrict-ass_tab.
  MOVE: 'SO_DO_FH'   TO l_wa_ass-name.
  APPEND l_wa_ass TO l_it_restrict-ass_tab.

  CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
       EXPORTING
*            program                =
            restriction            = l_it_restrict
*            db                     = ' '
       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.

  CHECK sy-subrc &amp;lt;&amp;gt; 0.
* Auch dieser Bursche schmeißt mit Exceptions ohne Meldungen um sich!
* Daher...
  MESSAGE e001(wod1) WITH sy-subrc 'SELECT_OPTIONS_RESTRICT'.
* Fehler &amp;gt;&amp;amp;1&amp;lt; beim Aufruf des Funktionsbausteines &amp;amp;2.

*  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
*          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDFORM.                    " restrictions

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 10:32:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/3392318#M814548</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T10:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: select-option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/3392319#M814549</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;use select-options x  fro  datatype   no-extension &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;Neetesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 10:47:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/3392319#M814549</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T10:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: select-option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/3392320#M814550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vasanth.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to assign this logic for particular field,where i need to declare my fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 10:59:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/3392320#M814550</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T10:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: select-option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/3392321#M814551</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;Write like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;STRONG&gt;tables: spfli.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&lt;STRONG&gt;select-options s_carrid for spfli-carrid  no intervals  no-extension..&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*In the exaple code *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT ZDANY_RESTRICT_SELECTION.

Include type pool SSCR
TYPE-POOLS sscr.
TABLES : sflight.

* defining the selection-screen
*select-options :*
*s_carrid for sflight-carrid no intervals  no-extension,*
*s_connid for sflight-connid no intervals  no-extension.*

Define the object to be passed to the RESTRICTION parameter
DATA restrict TYPE sscr_restrict.

Auxiliary objects for filling RESTRICT
DATA : optlist TYPE sscr_opt_list,
ass type sscr_ass.

INITIALIZATION.
Restricting the carrid selection to only EQ and 'BT'.
optlist-name = 'OBJECTKEY1'.
optlist-options-eq = 'X'.
optlist-options-bt = 'X'.
APPEND optlist TO restrict-opt_list_tab.

ass-kind = 'S'.
ass-name = 'S_carrid'.
ass-sg_main = 'I'.
ass-sg_addy = space.
ass-op_main = 'OBJECTKEY1'.
APPEND ass TO restrict-ass_tab.

Restricting the connid selection to CP, GE, LT, NE.
optlist-name = 'OBJECTKEY2'.
optlist-options-cp = 'X'.
optlist-options-ge = 'X'.
optlist-options-lt = 'X'.
optlist-options-ne = 'X'.
APPEND optlist TO restrict-opt_list_tab.

ass-kind = 'S'.
ass-name = 'S_connid'.
ass-sg_main = 'I'.
ass-sg_addy = space.
ass-op_main = 'OBJECTKEY2'.
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 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Mahi&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Feb 18, 2008 5:45 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 11:05:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/3392321#M814551</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T11:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: select-option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/3392322#M814552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pass the field name here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  move: 'S'       to ass-kind,
        'S_POSID' to ass-name,
        'I'       to ass-sg_main,
        ' '       to ass-sg_addy,
        'NO_INT'  to ass-op_main,
        'NO_INT'  to ass-op_addy.
  append ass to restrict-ass_tab.

  call function 'SELECT_OPTIONS_RESTRICT'
    exporting
*   PROGRAM                      =
      restriction                  = restrict
*   DB                           = ' '
   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
            .

" You need to declare the field in the SELECT-OPTIONS
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 11:06:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/3392322#M814552</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T11:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: select-option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/3392323#M814553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pass the field name here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  move: 'S'       to ass-kind,
        'S_POSID' to ass-name,
        'I'       to ass-sg_main,
        ' '       to ass-sg_addy,
        'NO_INT'  to ass-op_main,
        'NO_INT'  to ass-op_addy.
  append ass to restrict-ass_tab.

  call function 'SELECT_OPTIONS_RESTRICT'
    exporting
*   PROGRAM                      =
      restriction                  = restrict
*   DB                           = ' '
   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
            .

" You need to declare the field in the SELECT-OPTIONS
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2008 11:06:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/3392323#M814553</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-18T11:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: select-option</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/3392324#M814554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rest seem to be okay in the code apart from using convention. Check below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    ass-kind = 'S'.
    ass-name = 'S_carrid'.
    ass-sg_main = 'I'.
    ass-sg_addy = space.
    ass-op_main = 'OBJECTKEY1'.
    APPEND ass TO restrict-ass_tab.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now when you are specifying the &lt;STRONG&gt;NAME&lt;/STRONG&gt; it should be in bold letters, so &lt;STRONG&gt;S_CARRID&lt;/STRONG&gt; &amp;amp; &lt;STRONG&gt;S_CONNID&lt;/STRONG&gt; instead of S_carrid &amp;amp; S_connid. Above should be changed as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    ass-kind = 'S'.
    ass-name = 'S_CARRID'.
    ass-sg_main = 'I'.
    ass-sg_addy = space.
    ass-op_main = 'OBJECTKEY1'.
    APPEND ass TO restrict-ass_tab.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Eswae&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2008 00:41:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-option/m-p/3392324#M814554</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-19T00:41:46Z</dc:date>
    </item>
  </channel>
</rss>

