<?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 Error check for multiple ranges input in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-check-for-multiple-ranges-input/m-p/5497836#M1257724</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 coded a report with the following select options:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS:&lt;/P&gt;&lt;P&gt;   S_PONUM FOR EKKO-EBELN NO INTERVALS,&lt;/P&gt;&lt;P&gt;   S_PODAT FOR EKKO-BEDAT NO-EXTENSION,&lt;/P&gt;&lt;P&gt;   S_LCNUM FOR EIKP-VORNU NO-EXTENSION NO INTERVALS,&lt;/P&gt;&lt;P&gt;   S_VENDR FOR EKKO-LIFNR NO-EXTENSION NO INTERVALS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want that a check should be applied at the selection screen level that at least one field should contain a value, i.e. report cannot be run with all blank selection fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;IF S_PONUM-LOW IS INITIAL AND&lt;/P&gt;&lt;P&gt;    S_PODAT-LOW IS INITIAL AND&lt;/P&gt;&lt;P&gt;    S_LCNUM-LOW IS INITIAL AND&lt;/P&gt;&lt;P&gt;    S_VENDR-LOW IS INITIAL.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;    MESSAGE I007(ZSH_MSGC) WITH 'All selection fields cannot be blank'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works fine, but the problem is that when entering multiple ranges for S_PONUM, when the button on the right of the field is clicked to input range values the message pops up. I want that the check should be applied on execute (F8). Any suggestions? Help is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Apr 2009 07:27:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-22T07:27:30Z</dc:date>
    <item>
      <title>Error check for multiple ranges input</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-check-for-multiple-ranges-input/m-p/5497836#M1257724</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 coded a report with the following select options:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS:&lt;/P&gt;&lt;P&gt;   S_PONUM FOR EKKO-EBELN NO INTERVALS,&lt;/P&gt;&lt;P&gt;   S_PODAT FOR EKKO-BEDAT NO-EXTENSION,&lt;/P&gt;&lt;P&gt;   S_LCNUM FOR EIKP-VORNU NO-EXTENSION NO INTERVALS,&lt;/P&gt;&lt;P&gt;   S_VENDR FOR EKKO-LIFNR NO-EXTENSION NO INTERVALS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want that a check should be applied at the selection screen level that at least one field should contain a value, i.e. report cannot be run with all blank selection fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;IF S_PONUM-LOW IS INITIAL AND&lt;/P&gt;&lt;P&gt;    S_PODAT-LOW IS INITIAL AND&lt;/P&gt;&lt;P&gt;    S_LCNUM-LOW IS INITIAL AND&lt;/P&gt;&lt;P&gt;    S_VENDR-LOW IS INITIAL.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;    MESSAGE I007(ZSH_MSGC) WITH 'All selection fields cannot be blank'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works fine, but the problem is that when entering multiple ranges for S_PONUM, when the button on the right of the field is clicked to input range values the message pops up. I want that the check should be applied on execute (F8). Any suggestions? Help is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 07:27:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-check-for-multiple-ranges-input/m-p/5497836#M1257724</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-22T07:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: Error check for multiple ranges input</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-check-for-multiple-ranges-input/m-p/5497837#M1257725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the following code under START_OF_SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF S_PONUM[] IS INITIAL AND&lt;/P&gt;&lt;P&gt;S_PODAT[] IS INITIAL AND&lt;/P&gt;&lt;P&gt;S_LCNUM[] IS INITIAL AND&lt;/P&gt;&lt;P&gt;S_VENDR[] IS INITIAL.&lt;/P&gt;&lt;P&gt;MESSAGE E007(ZSH_MSGC) WITH 'All selection fields cannot be blank'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 07:33:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-check-for-multiple-ranges-input/m-p/5497837#M1257725</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-22T07:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error check for multiple ranges input</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-check-for-multiple-ranges-input/m-p/5497838#M1257726</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;Put the code under start of selection event and check the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;mrunal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 07:37:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-check-for-multiple-ranges-input/m-p/5497838#M1257726</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-22T07:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: Error check for multiple ranges input</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-check-for-multiple-ranges-input/m-p/5497839#M1257727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check the sy-ucomm when the button on the right of the field is clicked keep the condition which i have kept it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;before the if statement keep this condition also&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS:&lt;/P&gt;&lt;P&gt;S_PONUM FOR EKKO-EBELN NO INTERVALS,&lt;/P&gt;&lt;P&gt;S_PODAT FOR EKKO-BEDAT NO-EXTENSION,&lt;/P&gt;&lt;P&gt;S_LCNUM FOR EIKP-VORNU NO-EXTENSION NO INTERVALS,&lt;/P&gt;&lt;P&gt;S_VENDR FOR EKKO-LIFNR NO-EXTENSION NO INTERVALS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-ucomm ne 'find the sy-ucomm'.&lt;/P&gt;&lt;P&gt;IF S_PONUM-LOW IS INITIAL AND&lt;/P&gt;&lt;P&gt;S_PODAT-LOW IS INITIAL AND&lt;/P&gt;&lt;P&gt;S_LCNUM-LOW IS INITIAL AND&lt;/P&gt;&lt;P&gt;S_VENDR-LOW IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MESSAGE  'All selection fields cannot be blank' type 'E'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Santosh Marupally on Apr 22, 2009 9:41 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 07:41:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-check-for-multiple-ranges-input/m-p/5497839#M1257727</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-22T07:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: Error check for multiple ranges input</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-check-for-multiple-ranges-input/m-p/5497840#M1257728</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;"AT SELECTION-SCREEN" event is triggered whenever you press any key on selection screen.&lt;/P&gt;&lt;P&gt;hence you get the popup when you click on the button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using following code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

SELECT-OPTIONS:
S_PONUM FOR EKKO-EBELN NO INTERVALS,
S_PODAT FOR EKKO-BEDAT NO-EXTENSION,
S_LCNUM FOR EIKP-VORNU NO-EXTENSION NO INTERVALS,
S_VENDR FOR EKKO-LIFNR NO-EXTENSION NO INTERVALS.


START-OF-SELECTION.                       &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;----Change the event 
IF S_PONUM-LOW IS INITIAL AND
S_PODAT-LOW IS INITIAL AND
S_LCNUM-LOW IS INITIAL AND
S_VENDR-LOW IS INITIAL.

MESSAGE I007(ZSH_MSGC) WITH 'All selection fields cannot be blank'.
submit &amp;lt;prog&amp;gt; VIA SELECTION-SCREEN.
ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps,&lt;/P&gt;&lt;P&gt;RJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 07:42:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-check-for-multiple-ranges-input/m-p/5497840#M1257728</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-22T07:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: Error check for multiple ranges input</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-check-for-multiple-ranges-input/m-p/5497841#M1257729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about using of SY-UCOMM?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 07:43:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-check-for-multiple-ranges-input/m-p/5497841#M1257729</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-22T07:43:06Z</dc:date>
    </item>
  </channel>
</rss>

