<?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: restrict the values in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/restrict-the-values/m-p/4721625#M1108613</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this sample code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPE-POOLS: sscr.
TABLES: t156.
SELECT-OPTIONS: s_bwart FOR t156-bwart.

DATA: rest TYPE sscr_restrict,
      optl TYPE sscr_opt_list,
      sass TYPE sscr_ass.

INITIALIZATION.

  CLEAR: rest.
  optl-name = 'MVT_TYPE'.
  optl-options-nb = 'X'.
  APPEND optl TO rest-opt_list_tab.

  sass-kind = 'S'.
  sass-name = 'S_BWART'.
  sass-sg_main = 'I'.
  sass-sg_addy = space.
  sass-op_main = 'MVT_TYPE'.
  sass-op_addy = 'MVT_TYPE'.
  APPEND sass TO rest-ass_tab.

  CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
    EXPORTING
     program                      = sy-repid
      restriction                  = rest
*   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.
  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;Now whatever values entered in selection screen for select-options &lt;STRONG&gt;S_BWART&lt;/STRONG&gt; are considered as range to exclude.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Nov 2008 10:11:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-06T10:11:40Z</dc:date>
    <item>
      <title>restrict the values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/restrict-the-values/m-p/4721622#M1108610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guru's,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have the field in selection screen bwart i.e movement type as a select-options. i want to display except what i enter in the selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example :&lt;/P&gt;&lt;P&gt;select-options :  bwart  300 to 321.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have to display bellow 300 and above 321 only not in between 300 to 321.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Best Regards,&lt;/P&gt;&lt;P&gt;Rakhi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Nov 2008 09:30:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/restrict-the-values/m-p/4721622#M1108610</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-06T09:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: restrict the values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/restrict-the-values/m-p/4721623#M1108611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;      You may use 'Exclude' - E option, in the initialization.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Ex:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options:  VNO for LFA1-LIFNR.&lt;/P&gt;&lt;P&gt;initialization.&lt;/P&gt;&lt;P&gt;vno-low = ' 300 '.&lt;/P&gt;&lt;P&gt;vno-high= ' 321'.&lt;/P&gt;&lt;P&gt;&lt;U&gt;vno-sign = 'E'.&lt;/U&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Nov 2008 09:54:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/restrict-the-values/m-p/4721623#M1108611</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-06T09:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: restrict the values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/restrict-the-values/m-p/4721624#M1108612</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 must have defined select options. Now on runtime just on the right hand side of the second box there will be a small button upon clicking of which would open a dialog box. Select the tab which states Exclude range (two red dots) and enter 300 to 321.&lt;/P&gt;&lt;P&gt;Upon executing this would exclude values from 300 to 321.&lt;/P&gt;&lt;P&gt;You can also set this programmatically as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options bwart for &amp;lt;tablename&amp;gt;-bwart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Initialization.&lt;/P&gt;&lt;P&gt;bwart-sign = 'E'.&lt;/P&gt;&lt;P&gt;bwart-option = 'BT'.&lt;/P&gt;&lt;P&gt;bwart-low = 300.&lt;/P&gt;&lt;P&gt;bwart-high = 321.&lt;/P&gt;&lt;P&gt;append bwart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and execute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reagrds&lt;/P&gt;&lt;P&gt;Sachin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Nov 2008 09:58:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/restrict-the-values/m-p/4721624#M1108612</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-06T09:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: restrict the values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/restrict-the-values/m-p/4721625#M1108613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this sample code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPE-POOLS: sscr.
TABLES: t156.
SELECT-OPTIONS: s_bwart FOR t156-bwart.

DATA: rest TYPE sscr_restrict,
      optl TYPE sscr_opt_list,
      sass TYPE sscr_ass.

INITIALIZATION.

  CLEAR: rest.
  optl-name = 'MVT_TYPE'.
  optl-options-nb = 'X'.
  APPEND optl TO rest-opt_list_tab.

  sass-kind = 'S'.
  sass-name = 'S_BWART'.
  sass-sg_main = 'I'.
  sass-sg_addy = space.
  sass-op_main = 'MVT_TYPE'.
  sass-op_addy = 'MVT_TYPE'.
  APPEND sass TO rest-ass_tab.

  CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
    EXPORTING
     program                      = sy-repid
      restriction                  = rest
*   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.
  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;Now whatever values entered in selection screen for select-options &lt;STRONG&gt;S_BWART&lt;/STRONG&gt; are considered as range to exclude.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Nov 2008 10:11:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/restrict-the-values/m-p/4721625#M1108613</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-06T10:11:40Z</dc:date>
    </item>
  </channel>
</rss>

