<?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_OPTIONS_RESTRICT in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-restrict/m-p/1265633#M149024</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suruchi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ZRESRTICT.

* Include type pool SSCR
TYPE-POOLS sscr.

TABLES :
  marc.

* defining the selection-screen
select-options :
  s_matnr for marc-matnr,
  s_werks for marc-werks.

* 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 MATNR 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_MATNR'.
  ass-sg_main = 'I'.
  ass-sg_addy = space.
  ass-op_main = 'OBJECTKEY1'.
  APPEND ass TO restrict-ass_tab.

* Restricting the WERKS 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_WERKS'.
  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;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Apr 2006 11:52:43 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-04-07T11:52:43Z</dc:date>
    <item>
      <title>SELECT_OPTIONS_RESTRICT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-restrict/m-p/1265629#M149020</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;I am trying to restrict the select options to only exclusive single values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following is the code that i have written..however it is not working.&lt;/P&gt;&lt;P&gt;Please suggest.&lt;/P&gt;&lt;P&gt;Suruchi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Apr 2006 11:43:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-restrict/m-p/1265629#M149020</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-07T11:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT_OPTIONS_RESTRICT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-restrict/m-p/1265630#M149021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CLEAR OPT_LIST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MOVE:     'ONLYEQ'    TO OPT_LIST-NAME,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            'X'         TO OPT_LIST-OPTIONS-EQ.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR ASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  MOVE:     'S'        TO ASS-KIND,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            'S_ZMVGR5' TO ASS-NAME,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            'E'        TO ASS-SG_MAIN,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            ' '        TO ASS-SG_ADDY,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            'ONLYEQ'   TO ASS-OP_MAIN,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            ' '   TO ASS-OP_ADDY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  APPEND ASS TO RESTRICT-ASS_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      restriction                  = RESTRICT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   EXCEPTIONS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     TOO_LATE                     = 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     REPEATED                     = 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     SELOPT_WITHOUT_OPTIONS       = 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     SELOPT_WITHOUT_SIGNS         = 4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     INVALID_SIGN                 = 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     EMPTY_OPTION_LIST            = 6&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     INVALID_KIND                 = 7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     REPEATED_KIND_A              = 8&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     OTHERS                       = 9&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Apr 2006 11:43:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-restrict/m-p/1265630#M149021</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-07T11:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT_OPTIONS_RESTRICT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-restrict/m-p/1265631#M149022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suruchi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS s_xxxx for table-fielname no extension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i hope it could help you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Apr 2006 11:46:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-restrict/m-p/1265631#M149022</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-07T11:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT_OPTIONS_RESTRICT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-restrict/m-p/1265632#M149023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;chk this sample code

REPORT TESTREP.

* Include type pool SSCR
TYPE-POOLS SSCR.

* Define the object to be passed to the RESTRICTION parameter
DATA RESTRICT TYPE SSCR_RESTRICT.

* Auxiliary objects for filling RESTRICT
DATA OPT_LIST TYPE SSCR_OPT_LIST.
DATA ASS      TYPE SSCR_ASS.

* Define the selection screen objects
* First block: 3 SELECT-OPTIONS
SELECTION-SCREEN BEGIN OF BLOCK BLOCK_0 WITH FRAME TITLE TEXT-BL0.
  SELECT-OPTIONS SEL_0_0 FOR SY-TVAR0.
  SELECT-OPTIONS SEL_0_1 FOR SY-TVAR1.
  SELECT-OPTIONS SEL_0_2 FOR SY-TVAR2.
  SELECT-OPTIONS SEL_0_3 FOR SY-TVAR3.
SELECTION-SCREEN END   OF BLOCK BLOCK_0.

* Second block: 2 SELECT-OPTIONS
SELECTION-SCREEN BEGIN OF BLOCK BLOCK_1 WITH FRAME TITLE TEXT-BL1.
  SELECT-OPTIONS SEL_1_0 FOR SY-SUBRC.
  SELECT-OPTIONS SEL_1_1 FOR SY-REPID.
SELECTION-SCREEN END   OF BLOCK BLOCK_1.

INITIALIZATION.

* Define the option list

* ALL: All options allowed
  MOVE 'ALL'        TO OPT_LIST-NAME.
  MOVE 'X' TO: OPT_LIST-OPTIONS-BT,
               OPT_LIST-OPTIONS-CP,
               OPT_LIST-OPTIONS-EQ,
               OPT_LIST-OPTIONS-GE,
               OPT_LIST-OPTIONS-GT,
               OPT_LIST-OPTIONS-LE,
               OPT_LIST-OPTIONS-LT,
               OPT_LIST-OPTIONS-NB,
               OPT_LIST-OPTIONS-NE,
               OPT_LIST-OPTIONS-NP.
  APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.

* NOPATTERN: CP and NP not allowed
  CLEAR OPT_LIST.
  MOVE 'NOPATTERN'  TO OPT_LIST-NAME.
  MOVE 'X' TO: OPT_LIST-OPTIONS-BT,
               OPT_LIST-OPTIONS-EQ,
               OPT_LIST-OPTIONS-GE,
               OPT_LIST-OPTIONS-GT,
               OPT_LIST-OPTIONS-LE,
               OPT_LIST-OPTIONS-LT,
               OPT_LIST-OPTIONS-NB,
               OPT_LIST-OPTIONS-NE.
  APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.

* NOINTERVLS: BT and NB not allowed
  CLEAR OPT_LIST.
  MOVE 'NOINTERVLS' TO OPT_LIST-NAME.
  MOVE 'X' TO: OPT_LIST-OPTIONS-CP,
               OPT_LIST-OPTIONS-EQ,
               OPT_LIST-OPTIONS-GE,
               OPT_LIST-OPTIONS-GT,
               OPT_LIST-OPTIONS-LE,
               OPT_LIST-OPTIONS-LT,
               OPT_LIST-OPTIONS-NE,
               OPT_LIST-OPTIONS-NP.
  APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.

* EQ_AND_CP: only EQ and CP allowed
  CLEAR OPT_LIST.
  MOVE 'EQ_AND_CP'  TO OPT_LIST-NAME.
  MOVE 'X' TO: OPT_LIST-OPTIONS-CP,
               OPT_LIST-OPTIONS-EQ.
  APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.

* JUST_EQ: Only EQ allowed
  CLEAR OPT_LIST.
  MOVE 'JUST_EQ' TO OPT_LIST-NAME.
  MOVE 'X' TO OPT_LIST-OPTIONS-EQ.
  APPEND OPT_LIST TO RESTRICT-OPT_LIST_TAB.

* Assign selection screen objects to option list and sign

* KIND = 'A': applies to all SELECT-OPTIONS
  MOVE: 'A'          TO ASS-KIND,
        '*'          TO ASS-SG_MAIN,
        'NOPATTERN'  TO ASS-OP_MAIN,
        'NOINTERVLS' TO ASS-OP_ADDY.
  APPEND ASS TO RESTRICT-ASS_TAB.

* KIND = 'B': applies to all SELECT-OPTIONS in block BLOCK_0,
*             that is, SEL_0_0, SEL_0_1, SEL_0_2
  CLEAR ASS.
  MOVE: 'B'          TO ASS-KIND,
        'BLOCK_0'    TO ASS-NAME,
        'I'          TO ASS-SG_MAIN,
        '*'          TO ASS-SG_ADDY,
        'NOINTERVLS' TO ASS-OP_MAIN.
  APPEND ASS TO RESTRICT-ASS_TAB.

* KIND = 'S': applies to SELECT-OPTION SEL-0-2
  CLEAR ASS.
  MOVE: 'S'          TO ASS-KIND,
        'SEL_0_2'    TO ASS-NAME,
        'I'          TO ASS-SG_MAIN,
        '*'          TO ASS-SG_ADDY,
        'EQ_AND_CP'  TO ASS-OP_MAIN,
        'ALL'        TO ASS-OP_ADDY.
  APPEND ASS TO RESTRICT-ASS_TAB.

* KIND = 'S': Applies to SELECT-OPTION SEL_0_3
  CLEAR ASS.
  MOVE: 'S'        TO ASS-KIND,
        'SEL_0_3'  TO ASS-NAME,
        'I'        TO ASS-SG_MAIN,
        'N'        TO ASS-SG_ADDY,
        'JUST_EQ'  TO ASS-OP_MAIN.
  APPEND ASS TO RESTRICT-ASS_TAB.

* Call function module
  CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
       EXPORTING
             RESTRICTION                = RESTRICT
*           DB                          = ' '
       EXCEPTIONS
             TOO_LATE                   = 1
             REPEATED                   = 2
             NOT_DURING_SUBMIT          = 3
            DB_CALL_AFTER_REPORT_CALL  = 4
            SELOPT_WITHOUT_OPTIONS     = 5
             SELOPT_WITHOUT_SIGNS       = 6
             INVALID_SIGN               = 7
            REPORT_CALL_AFTER_DB_ERROR = 8
              EMPTY_OPTION_LIST          = 9
             INVALID_KIND               = 10
             REPEATED_KIND_A            = 11
             OTHERS                     = 12.

* Exception handling
  IF SY-SUBRC NE 0.
     ...
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Apr 2006 11:47:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-restrict/m-p/1265632#M149023</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-07T11:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT_OPTIONS_RESTRICT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-restrict/m-p/1265633#M149024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suruchi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ZRESRTICT.

* Include type pool SSCR
TYPE-POOLS sscr.

TABLES :
  marc.

* defining the selection-screen
select-options :
  s_matnr for marc-matnr,
  s_werks for marc-werks.

* 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 MATNR 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_MATNR'.
  ass-sg_main = 'I'.
  ass-sg_addy = space.
  ass-op_main = 'OBJECTKEY1'.
  APPEND ass TO restrict-ass_tab.

* Restricting the WERKS 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_WERKS'.
  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;Regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Apr 2006 11:52:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-restrict/m-p/1265633#M149024</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-07T11:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT_OPTIONS_RESTRICT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-restrict/m-p/1265634#M149025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijay,&lt;/P&gt;&lt;P&gt;May be i did not make the requirement clear so let me rephrase it.&lt;/P&gt;&lt;P&gt;I am able to get the single values option which are in the inclusive criteria..however when i try to make them exclusive by writing&lt;/P&gt;&lt;P&gt; ass-sg_main = 'E'.&lt;/P&gt;&lt;P&gt;It starts giving me all the four tabs in select options that is inclusive exclusive single values as well as ranges.&lt;/P&gt;&lt;P&gt;Hope i made myself clearer this time.&lt;/P&gt;&lt;P&gt;Please suggest what to do.&lt;/P&gt;&lt;P&gt;Thanx in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Apr 2006 12:25:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-restrict/m-p/1265634#M149025</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-07T12:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT_OPTIONS_RESTRICT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-restrict/m-p/1265635#M149026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi suruchi,&lt;/P&gt;&lt;P&gt;  Hope this code may help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-- Define the object to be passed to the RESTRICTION parameter&lt;/P&gt;&lt;P&gt;DATA it_restrict TYPE sscr_restrict.&lt;/P&gt;&lt;P&gt;*-- Auxiliary objects for filling RESTRICT&lt;/P&gt;&lt;P&gt;DATA it_opt_list TYPE sscr_opt_list.&lt;/P&gt;&lt;P&gt;*-- One line of table associating selection screen object with opt. list&lt;/P&gt;&lt;P&gt;DATA it_scrass TYPE sscr_ass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  *-- Set an option for only EQ&lt;/P&gt;&lt;P&gt;  it_opt_list-name = 'NO INTERVALS'(r01).&lt;/P&gt;&lt;P&gt;  it_opt_list-options-eq = c_x.&lt;/P&gt;&lt;P&gt;  APPEND it_opt_list TO it_restrict-opt_list_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-- Match the option to the select option.&lt;/P&gt;&lt;P&gt;  it_scrass-kind = c_s. "'S'.&lt;/P&gt;&lt;P&gt;  it_scrass-name = 'S_EMAIL'(r02).&lt;/P&gt;&lt;P&gt;  it_scrass-sg_main = c_i. "'I'.&lt;/P&gt;&lt;P&gt;  it_scrass-sg_addy = space.&lt;/P&gt;&lt;P&gt;  it_scrass-op_main = 'NO INTERVALS'(r01).&lt;/P&gt;&lt;P&gt;  APPEND it_scrass TO it_restrict-ass_tab.&lt;/P&gt;&lt;P&gt;  CLEAR  it_scrass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      program                = sy-cprog&lt;/P&gt;&lt;P&gt;      restriction            = it_restrict&lt;/P&gt;&lt;P&gt;      db                     = space&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      too_late               = 1&lt;/P&gt;&lt;P&gt;      repeated               = 2&lt;/P&gt;&lt;P&gt;      selopt_without_options = 3&lt;/P&gt;&lt;P&gt;      selopt_without_signs   = 4&lt;/P&gt;&lt;P&gt;      invalid_sign           = 5&lt;/P&gt;&lt;P&gt;      empty_option_list      = 6&lt;/P&gt;&lt;P&gt;      invalid_kind           = 7&lt;/P&gt;&lt;P&gt;      repeated_kind_a        = 8&lt;/P&gt;&lt;P&gt;      OTHERS                 = 9.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE i000 WITH text-i01.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;Sampath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Apr 2006 13:15:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-restrict/m-p/1265635#M149026</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-07T13:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT_OPTIONS_RESTRICT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-restrict/m-p/1265636#M149027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZPTTEST13                               .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Include type pool SSCR&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TYPE-POOLS sscr.&lt;/P&gt;&lt;P&gt;TABLES :  marc.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;defining the selection-screen&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;select-options :  s_matnr for marc-matnr no intervals.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Define the object to be passed to the RESTRICTION parameter&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA restrict TYPE sscr_restrict.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Auxiliary objects for filling RESTRICT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA : optlist TYPE sscr_opt_list,&lt;/P&gt;&lt;P&gt;       ass type sscr_ass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INITIALIZATION.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Restricting the MATNR selection to only EQ and 'BT'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;optlist-name = 'OBJECTKEY1'.&lt;/P&gt;&lt;P&gt;optlist-options-eq = 'X'.&lt;/P&gt;&lt;P&gt;APPEND optlist TO restrict-opt_list_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ass-kind = 'S'.&lt;/P&gt;&lt;P&gt;ass-name = 'S_MATNR'.&lt;/P&gt;&lt;P&gt;ass-sg_main = '*'.&lt;/P&gt;&lt;P&gt;ass-sg_addy = space.&lt;/P&gt;&lt;P&gt;ass-op_main = 'OBJECTKEY1'.&lt;/P&gt;&lt;P&gt;APPEND ass TO restrict-ass_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;restriction                  = restrict&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;TOO_LATE                     = 1&lt;/P&gt;&lt;P&gt;REPEATED                     = 2&lt;/P&gt;&lt;P&gt;SELOPT_WITHOUT_OPTIONS       = 3&lt;/P&gt;&lt;P&gt;SELOPT_WITHOUT_SIGNS         = 4&lt;/P&gt;&lt;P&gt;INVALID_SIGN                 = 5&lt;/P&gt;&lt;P&gt;EMPTY_OPTION_LIST            = 6&lt;/P&gt;&lt;P&gt;INVALID_KIND                 = 7&lt;/P&gt;&lt;P&gt;REPEATED_KIND_A              = 8&lt;/P&gt;&lt;P&gt;OTHERS                       = 9&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Apr 2006 13:24:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-restrict/m-p/1265636#M149027</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-07T13:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT_OPTIONS_RESTRICT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-restrict/m-p/1265637#M149028</link>
      <description>&lt;P&gt;Clean and effective. Really helped!&lt;/P&gt;&lt;P&gt;Thanks &lt;SPAN class="mention-scrubbed"&gt;vijaybabu.dudla&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 30 May 2021 12:05:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-restrict/m-p/1265637#M149028</guid>
      <dc:creator>a_h_f</dc:creator>
      <dc:date>2021-05-30T12:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT_OPTIONS_RESTRICT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-restrict/m-p/1265638#M149029</link>
      <description>&lt;P&gt;Here is a simpler alternative approach:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA matnr_rng TYPE RANGE OF matnr.

IF s_matnr[] IS NOT INITIAL.
  SELECT 'I' AS sign,
         'EQ' AS option,
         matnr as low
         FROM mara
         WHERE matnr IN @s_matnr
         INTO CORRESPONDING FIELDS OF TABLE @matnr_rng.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;After that, use MATNR_RNG instead of S_MATNR for the rest of the program. &lt;/P&gt;</description>
      <pubDate>Mon, 31 May 2021 05:54:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-restrict/m-p/1265638#M149029</guid>
      <dc:creator>keremkoseoglu</dc:creator>
      <dc:date>2021-05-31T05:54:43Z</dc:date>
    </item>
  </channel>
</rss>

