<?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 Select-Options question in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-question/m-p/2875037#M674736</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alright, I have the following block of code and I want to make it so that s_budat, s_bwart, and s_werks are manditory.  However, I do not want to put OBLIGATORY in the code because that requires each to be filled before you can do a range or multiple selections.  I tried to fix the problem by adding the AT SELECTION-SCREEN block but that acts the same as adding OBLIGATORY for the three select-options.  Is there a way to do what I want?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;**----------------------------------------------------------------------
* S E L E C T I O N - S C R E E N
**----------------------------------------------------------------------

SELECTION-SCREEN BEGIN OF BLOCK required WITH FRAME TITLE text-001.
PARAMETERS: p_spras TYPE makt-spras DEFAULT 'EN' OBLIGATORY,
            p_k TYPE i DEFAULT 5 OBLIGATORY.          "Amount of days to look at

SELECT-OPTIONS: s_budat FOR mkpf-budat,    "Document Date
                s_bwart FOR mseg-bwart,    "Movement type
                s_werks FOR mseg-werks.    "Plant Number
SELECTION-SCREEN END OF BLOCK required.

SELECTION-SCREEN BEGIN OF BLOCK optional WITH FRAME TITLE text-002.
SELECT-OPTIONS: s_matnr FOR mseg-matnr,                "Material number
                s_matkl FOR mara-matkl.               "Material group
SELECTION-SCREEN END OF BLOCK optional.

at selection-screen on block required.

  if s_budat[] is initial.
    message 'Please enter values for the date range' type 'E'.
    call screen 1000.
  endif.
  if s_bwart[] is initial.
    message 'Please enter values for the movement type(s).' type 'E'.
    call screen 1000.
  endif.
  if s_werks[] is initial.
    message 'Please enter values for the plant number(s).' type 'E'.
    call screen 1000.
  endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Davis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Oct 2007 17:58:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-03T17:58:12Z</dc:date>
    <item>
      <title>Select-Options question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-question/m-p/2875037#M674736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alright, I have the following block of code and I want to make it so that s_budat, s_bwart, and s_werks are manditory.  However, I do not want to put OBLIGATORY in the code because that requires each to be filled before you can do a range or multiple selections.  I tried to fix the problem by adding the AT SELECTION-SCREEN block but that acts the same as adding OBLIGATORY for the three select-options.  Is there a way to do what I want?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;**----------------------------------------------------------------------
* S E L E C T I O N - S C R E E N
**----------------------------------------------------------------------

SELECTION-SCREEN BEGIN OF BLOCK required WITH FRAME TITLE text-001.
PARAMETERS: p_spras TYPE makt-spras DEFAULT 'EN' OBLIGATORY,
            p_k TYPE i DEFAULT 5 OBLIGATORY.          "Amount of days to look at

SELECT-OPTIONS: s_budat FOR mkpf-budat,    "Document Date
                s_bwart FOR mseg-bwart,    "Movement type
                s_werks FOR mseg-werks.    "Plant Number
SELECTION-SCREEN END OF BLOCK required.

SELECTION-SCREEN BEGIN OF BLOCK optional WITH FRAME TITLE text-002.
SELECT-OPTIONS: s_matnr FOR mseg-matnr,                "Material number
                s_matkl FOR mara-matkl.               "Material group
SELECTION-SCREEN END OF BLOCK optional.

at selection-screen on block required.

  if s_budat[] is initial.
    message 'Please enter values for the date range' type 'E'.
    call screen 1000.
  endif.
  if s_bwart[] is initial.
    message 'Please enter values for the movement type(s).' type 'E'.
    call screen 1000.
  endif.
  if s_werks[] is initial.
    message 'Please enter values for the plant number(s).' type 'E'.
    call screen 1000.
  endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Davis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2007 17:58:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-question/m-p/2875037#M674736</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-03T17:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Select-Options question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-question/m-p/2875038#M674737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of using event AT SELECTION SCREEN, do the validation in START OF SELECTION. If the values for select options are not entered, instead of error message, give a Success message and use STOP command, so that control will remain on Selection screen and user can reenter values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2007 18:02:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-question/m-p/2875038#M674737</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-03T18:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: Select-Options question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-question/m-p/2875039#M674738</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 think your codes are fine if you don't want to add obligatory options for select-options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check FM SELECT_OPTIONS_RESTRICT.&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;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2007 18:03:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-question/m-p/2875039#M674738</guid>
      <dc:creator>ferry_lianto</dc:creator>
      <dc:date>2007-10-03T18:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: Select-Options question</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-question/m-p/2875040#M674739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ashish, thanks so much, that did the trick!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Davis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2007 18:13:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-question/m-p/2875040#M674739</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-03T18:13:54Z</dc:date>
    </item>
  </channel>
</rss>

