<?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: Multiple select options validation at selection screen in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-select-options-validation-at-selection-screen/m-p/8174069#M1623546</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Raymond, your code solved my problem,  but with START-OF-SELECTION command after AT SELECTION-SCREEN. &lt;/P&gt;&lt;P&gt;Tnx a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Aug 2011 13:47:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-08-25T13:47:59Z</dc:date>
    <item>
      <title>Multiple select options validation at selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-select-options-validation-at-selection-screen/m-p/8174064#M1623541</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 have the requirement to create a selection screen with 3 select options. Two of them are cross-dependent. It is mandatory to fill one of them and it is not allowed to fill both. The third one is optional. I tried the validation at selection-screen on block... and I have a problem that search help buttons for select options react like execution buttons, when I press any of them I am getting one of errors instead of search help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help on this issue would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
      so_rbkp TYPE rbkp,
      so_mseg TYPE mseg.

SELECTION-SCREEN BEGIN OF BLOCK blok WITH FRAME.
  SELECT-OPTIONS:
        s_fakt   FOR so_rbkp-belnr,
        s_matdok FOR so_mseg-mblnr,
        s_god FOR so_mseg-gjahr.
SELECTION-SCREEN END OF BLOCK blok.

INITIALIZATION.
SET TITLEBAR '0100'.
START-OF-SELECTION.

  AT SELECTION-SCREEN on block blok.
      if s_fakt &amp;lt;&amp;gt; space and s_matdok &amp;lt;&amp;gt; space.
        MESSAGE 'Message1' TYPE 'E'.
      elseif s_fakt = space and s_matdok = space.
        MESSAGE 'Message2' TYPE 'E'.
      endif.
    ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2011 12:51:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-select-options-validation-at-selection-screen/m-p/8174064#M1623541</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-25T12:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple select options validation at selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-select-options-validation-at-selection-screen/m-p/8174065#M1623542</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 the below code. This will not get triggered until you wont execution button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      if s_fakt = space and s_matdok = space.&lt;/P&gt;&lt;P&gt;        MESSAGE 'Message1' TYPE 'E'.&lt;/P&gt;&lt;P&gt;      elseif s_fakt &amp;lt;&amp;gt; space and s_matdok &amp;lt;&amp;gt; space.&lt;/P&gt;&lt;P&gt;        MESSAGE 'Message2' TYPE 'E'.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shiva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2011 13:02:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-select-options-validation-at-selection-screen/m-p/8174065#M1623542</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-25T13:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple select options validation at selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-select-options-validation-at-selection-screen/m-p/8174066#M1623543</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 have placed your screen validation "AT SELECTION SCREEN on BLOCK"  after "START-OF-SELECTION". And because of this whenver you press F8, your check is get executed and so you are getting the error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please place your screen validation before "START-OFSELECTION" as below and then try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __jive_macro_name="DATA"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will be helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;S.Meganadhan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2011 13:14:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-select-options-validation-at-selection-screen/m-p/8174066#M1623543</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-25T13:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple select options validation at selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-select-options-validation-at-selection-screen/m-p/8174067#M1623544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Only perform the check when user wants to execute or submit the program, not when pressing F4 or even Enter, but in a selection-screen event, before START-OF-SELECTION which were program would terminate in error :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES: SSCRFIELDS.
* ...
 AT SELECTION-SCREEN OB BLOCK b01.
    IF sscrfields-ucomm EQ 'ONLI' 
    OR sscrfields-ucomm EQ 'PRIN' 
    OR sscrfields-ucomm EQ 'SJOB'.
      IF s_fakt[] IS NOT INITIAL AND s_matdok IS NOT INITIAL.
        MESSAGE 'Message1' TYPE 'E'.
      ELSEIF s_fakt[] IS INITIAL and s_matdok[] IS INITIAL.
        MESSAGE 'Message2' TYPE 'E'.
      ENDIF.
    ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;(You could also always send the message, but using type 'E' for those function code and 'S' status for any other value.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2011 13:18:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-select-options-validation-at-selection-screen/m-p/8174067#M1623544</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2011-08-25T13:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple select options validation at selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-select-options-validation-at-selection-screen/m-p/8174068#M1623545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried your code, but if it happens the situation which produces an error, I jump out of program and I should stay at selection screen to make necessary changes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2011 13:20:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-select-options-validation-at-selection-screen/m-p/8174068#M1623545</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-25T13:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple select options validation at selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-select-options-validation-at-selection-screen/m-p/8174069#M1623546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Raymond, your code solved my problem,  but with START-OF-SELECTION command after AT SELECTION-SCREEN. &lt;/P&gt;&lt;P&gt;Tnx a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2011 13:47:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/multiple-select-options-validation-at-selection-screen/m-p/8174069#M1623546</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-08-25T13:47:59Z</dc:date>
    </item>
  </channel>
</rss>

