<?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: Field ranges in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-ranges/m-p/5350426#M1232064</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aarav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this code for the issue you are facing in the selection screen,&lt;/P&gt;&lt;P&gt;U need to make these changes in your at selection screen event first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
AT SELECTION-SCREEN OUTPUT.
*-Screen grouping for DLS/NTS
  IF pa_dls = 'X'.
    LOOP AT SCREEN.
      IF screen-group1 = 'G1'.
       screen-active = 1.
      ELSEIF screen-group1 = 'G2'.
         screen-active = 0.
      ENDIF.
      MODIFY SCREEN.
    ENDLOOP.
  ELSE.
    LOOP AT SCREEN.
      IF screen-group1 = 'G1'.
       screen-active = 0.
      ELSEIF screen-group1 = 'G2'.
         screen-active = 1.
      ENDIF.
      MODIFY SCREEN.
    ENDLOOP.
  ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The validations on the parameters can be done in the START-OF-SELECTION as shown below.&lt;/P&gt;&lt;P&gt;or You can also use the code given by Siddarth for validating parameters  in AT-SELECTION EVENT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
START-OF-SELECTION.

* Check whether region entered is applicable for the survey system selected.
  IF pa_dls = 'X'.
    IF pa_regio NE 'AB' AND pa_regio NE 'MB'
    AND pa_regio NE 'SK' AND pa_regio NE 'BC'.
      MESSAGE e010(zsd).
    ENDIF.
    if pa_zlsd not between 00 and 16 .
      message e044(zsd) .

    elseif pa_zsec not between  00 and 36.
      message e045(zsd) .

    elseif pa_ztwp not between 000 and 126.
      message e046(zsd) .

    elseif pa_zrang  not between 00 and 34.
      message e047(zsd) .

    elseif pa_zmeri not between 00 and 06.
      message e048(zsd) .
    endif.
*endif.
*endif.

  ELSEif  pa_nts = 'X'.
    IF pa_regio NE 'BC'.
      MESSAGE e008(zsd).
    ENDIF.
     if pa_zqu not between 'A' and 'D'.
        message e049(zsd).

      elseif pa_zunit not between 0001 and 126.
        message e050(zsd).

      elseif pa_zbloc not between 'A' and 'L'.
        message e051(zsd).

      elseif pa_zshee not between 001 and 100.
        message e052(zsd).

      elseif pa_zmusu not between 'A' and 'P'.
        message e053(zsd).

      elseif pa_zmaps not between 01 and 16.
        message e054(zsd).
*endif.
*endif.
endif.
  ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code works fine. I have tested it.&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jose&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Jose Anthony Reddy on Mar 12, 2009 11:17 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Mar 2009 17:39:22 GMT</pubDate>
    <dc:creator>former_member313782</dc:creator>
    <dc:date>2009-03-12T17:39:22Z</dc:date>
    <item>
      <title>Field ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-ranges/m-p/5350420#M1232058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus!&lt;/P&gt;&lt;P&gt;In my program I ahve a selection screen which allows us to enter data and then&lt;/P&gt;&lt;P&gt;on executing the program it inserst or updates or shows data already exists .&lt;/P&gt;&lt;P&gt;There are 3 field sin the selection screen which allows a numberic value &lt;/P&gt;&lt;P&gt;which can be put there and insert that into the table which it uploads.&lt;/P&gt;&lt;P&gt;These there fields have a range of between 0-10, 00-99, and 00-zz, so&lt;/P&gt;&lt;P&gt; any values in between the range showuld only get inserted bewteen these range .&lt;/P&gt;&lt;P&gt;But when I put anything beyond this range its till inserts it into the table &lt;/P&gt;&lt;P&gt;which is wrong. Should I specify the range for all these fields in my selection &lt;/P&gt;&lt;P&gt;or initialize thos e field with the numbers or teher is something els &lt;/P&gt;&lt;P&gt;ethat I need to do.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;selection-screen  begin of block 3 with frame title text-003. " DLS.
parameters:
  pa_zlsd      type zsds_uwi-zlsd modif id g1,      " Location SubDivision.
  pa_zsec      type zsds_uwi-zsec modif id g1,      " Section.
  pa_ztwp      type zsds_uwi-ztwp modif id g1,      " Township.
  pa_zrang    type zsds_uwi-zrange modif id g1,     " Range.
  pa_zmeri     type zsds_uwi-zmeridian modif id g1. " Meridian.
selection-screen  end of block 3.

start-of-selection.

  if pa_dls = cl_abap_typedescr=&amp;gt;true.
    select single * from zwell_dls where
      bukrs     = pa_bukrs and
      land1     = pa_land1 and
      regio     = pa_regio and
      zss       = '1'      and
      zle       = pa_zle   and
      zlsd      = pa_zlsd  and
      zsec      = pa_zsec  and
      ztwp      = pa_ztwp  and
      zrange    = pa_zrang and
      zmeridian = pa_zmeri and
      zevent    = pa_zeven and
      ztype     = 'W'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aarav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2009 15:40:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-ranges/m-p/5350420#M1232058</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-12T15:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: Field ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-ranges/m-p/5350421#M1232059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Validate the Range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use:&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF FIELD1 NOT BETWEEN 0 AND 9.&lt;/P&gt;&lt;P&gt;Message 'Values not in range' type 'E' Display Like 'S'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF FIELD2 NOT BETWEEN 00 AND 99.&lt;/P&gt;&lt;P&gt;Message 'Values not in range' type 'E' Display Like 'S'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF FIELD2 NOT BETWEEN 00 AND 'ZZ'.&lt;/P&gt;&lt;P&gt;Message 'Values not in range' type 'E' Display Like 'S'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Control will only go to START-OF-SELECTION If the Range is validated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : It will also work in &lt;STRONG&gt;AT SELECTION_SCREEN ON FIELD.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this resolves your issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gurpreet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2009 16:13:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-ranges/m-p/5350421#M1232059</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-12T16:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: Field ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-ranges/m-p/5350422#M1232060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aarav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reply given above will also help you.&lt;/P&gt;&lt;P&gt;But, I suggest that you use 'AT SELECTION-SCREEN ON' event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see that you are making some changes to the selection screen using the MODIF-ID group.&lt;/P&gt;&lt;P&gt;You can put that code in the AT SELECTION-SCREEN event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The validation on the fields for ranges should be done in AT SELECTION-SCREEN ON event.&lt;/P&gt;&lt;P&gt;Making use of the REPORT EVENTS will enhance the performance of your program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code goes like this, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON field1. &lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt; IF FIELD1 NOT BETWEEN 0 AND 9.&lt;/P&gt;&lt;P&gt;       Message 'Values not in range' type 'E' Display Like 'S'.&lt;/P&gt;&lt;P&gt; ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON field2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF FIELD2 NOT BETWEEN 00 AND 99. &lt;/P&gt;&lt;P&gt;     Message 'Values not in range' type 'E' Display Like 'S'.&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;AT SELECTION-SCREEN ON field3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF FIELD2 NOT BETWEEN 00 AND 99.&lt;/P&gt;&lt;P&gt;       Message 'Values not in range' type 'E' Display Like 'S'.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after all selection screen validations are done, use the START-OF -SELECTION.event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jose&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2009 16:29:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-ranges/m-p/5350422#M1232060</guid>
      <dc:creator>former_member313782</dc:creator>
      <dc:date>2009-03-12T16:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: Field ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-ranges/m-p/5350423#M1232061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aarav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The answer given by Gurpreet will surely work for the situation you have mentioned but there are certain  flaws in it...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the messages which has to appear are error messages&lt;/P&gt;&lt;P&gt;instead of messages type 'E' display like 'S'.&lt;/P&gt;&lt;P&gt;just write &lt;/P&gt;&lt;P&gt;messages &amp;lt;message&amp;gt; type 'E'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and another one.&lt;/P&gt;&lt;P&gt;once you press F8 and the error message is issued the next time you validate and press enter logically it is not meant to proceed further in Enter, I think Gurpreet just forgot to put in one small thing to validate that...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the declaration use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tables :&lt;/P&gt;&lt;P&gt;   SSCRFIELDS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then in AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;just before the message is issued for every if condition &lt;/P&gt;&lt;P&gt;use the statement &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear sscrfields-ucomm.&lt;/P&gt;&lt;P&gt;remember this should come just before every message type 'E'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siddarth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2009 16:55:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-ranges/m-p/5350423#M1232061</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-12T16:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Field ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-ranges/m-p/5350424#M1232062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks it works but one thing has stopped , there are two radiobuttons which controil a third selection screen , when first is selected a particluar selection screen comes and when second another comes into play , unfortunatley the second one is  onmot popping out at all and gives me the error messhe for the second insted.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS:
  pa_bukrs TYPE bukrs DEFAULT '1000',
  pa_land1 TYPE kna1-land1 DEFAULT 'CA' OBLIGATORY,         " Land1.
  pa_regio TYPE kna1-regio DEFAULT 'AB' OBLIGATORY, " Region.
  pa_zle      TYPE zdt_zle DEFAULT '00' OBLIGATORY, " Location Exception Code.
  pa_zeven    TYPE zsds_uwi-zevent DEFAULT '00'.    " Event Sequence.
SELECTION-SCREEN  END OF BLOCK 1.

SELECTION-SCREEN  BEGIN OF BLOCK 2 WITH FRAME TITLE text-002. " Mode.
PARAMETERS:
  pa_dls TYPE c RADIOBUTTON GROUP g1
  DEFAULT 'X' USER-COMMAND shift,               " DLS
  pa_nts TYPE c RADIOBUTTON GROUP g1.           " NTS
SELECTION-SCREEN  END OF BLOCK 2.

SELECTION-SCREEN  BEGIN OF BLOCK 3 WITH FRAME TITLE text-003. " DLS.
PARAMETERS:
  pa_zlsd      TYPE zsds_uwi-zlsd MODIF ID g1,      " Location SubDivision.
  pa_zsec      TYPE zsds_uwi-zsec MODIF ID g1,      " Section.
  pa_ztwp      TYPE zsds_uwi-ztwp MODIF ID g1,      " Township.
  pa_zrang    TYPE zsds_uwi-zrange MODIF ID g1,     " Range.
  pa_zmeri     TYPE zsds_uwi-zmeridian MODIF ID g1. " Meridian.
SELECTION-SCREEN  END OF BLOCK 3.

SELECTION-SCREEN  BEGIN OF BLOCK 4 WITH FRAME TITLE text-004. " NTS.
PARAMETERS:
  pa_zqu       TYPE zsds_uwi-zqu   MODIF ID g2 ,   " Quarter Unit.
  pa_zunit     TYPE zsds_uwi-zunit MODIF ID g2 ,   " Unit.
  pa_zbloc    TYPE zsds_uwi-zblock MODIF ID g2,    " Block.
  pa_zshee    TYPE zsds_uwi-zsheet MODIF ID g2,    " Sheet.
  pa_zmusu    TYPE zsds_uwi-zmusub MODIF ID g2,    " Map Unit Subdivision.
  pa_zmaps     TYPE zsds_uwi-zmapsheet MODIF ID g2.
SELECTION-SCREEN  END OF BLOCK 4.

AT SELECTION-SCREEN OUTPUT.
*-Screen grouping for DLS/NTS
  IF pa_dls = 'X'.
    LOOP AT SCREEN.
      CHECK screen-group1 = 'G2'.
      screen-active = 0.
      MODIFY SCREEN.
    ENDLOOP.
  ELSE.
    LOOP AT SCREEN.
      CHECK screen-group2 = 'G1'.
      screen-active = 0.
      MODIFY SCREEN.
    ENDLOOP.
  ENDIF.

AT SELECTION-SCREEN.
* Check whether region entered is applicable for the survey system selected.
  IF pa_dls = 'X'.
    IF pa_regio NE 'AB' AND pa_regio NE 'MB'
    AND pa_regio NE 'SK' AND pa_regio NE 'BC'.
      MESSAGE e010(zsd).
    ENDIF.
    if pa_zlsd not between 00 and 16 .
      message e044(zsd) .

    elseif pa_zsec not between  00 and 36.
      message e045(zsd) .

    elseif pa_ztwp not between 000 and 126.
      message e046(zsd) .

    elseif pa_zrang  not between 00 and 34.
      message e047(zsd) .

    elseif pa_zmeri not between 00 and 06.
      message e048(zsd) .
    endif.
*endif.
*endif.

  ELSE.
    IF pa_regio NE 'BC'.
      MESSAGE e008(zsd).
    ENDIF.
     if pa_zqu not between 'A' and 'D'.
        message e049(zsd).

      elseif pa_zunit not between 0001 and 126.
        message e050(zsd).

      elseif pa_zbloc not between 'A' and 'L'.
        message e051(zsd).

      elseif pa_zshee not between 001 and 100.
        message e052(zsd).

      elseif pa_zmusu not between 'A' and 'P'.
        message e053(zsd).

      elseif pa_zmaps not between 01 and 16.
        message e054(zsd).
*endif.
*endif.
endif.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2009 16:58:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-ranges/m-p/5350424#M1232062</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-12T16:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: Field ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-ranges/m-p/5350425#M1232063</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;just a small change and the code will run absolutely fine&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES :
SSCRFIELDS.

AT SELECTION-SCREEN.
* Check whether region entered is applicable for the survey system selected.
if sscrfieds-ucomm = 'ONLI'.                 " This means that only when you press F8 then only the 
" validations should be done
  IF pa_dls = 'X'.
    IF pa_regio NE 'AB' AND pa_regio NE 'MB'
    AND pa_regio NE 'SK' AND pa_regio NE 'BC'.
      MESSAGE e010(zsd).
    ENDIF.
    if pa_zlsd not between 00 and 16 .
      message e044(zsd) .
 
    elseif pa_zsec not between  00 and 36.
      message e045(zsd) .
 
    elseif pa_ztwp not between 000 and 126.
      message e046(zsd) .
 
    elseif pa_zrang  not between 00 and 34.
      message e047(zsd) .
 
    elseif pa_zmeri not between 00 and 06.
      message e048(zsd) .
    endif.
*endif.
*endif.
 
  ELSE.
    IF pa_regio NE 'BC'.
      MESSAGE e008(zsd).
    ENDIF.
     if pa_zqu not between 'A' and 'D'.
        message e049(zsd).
 
      elseif pa_zunit not between 0001 and 126.
        message e050(zsd).
 
      elseif pa_zbloc not between 'A' and 'L'.
        message e051(zsd).
 
      elseif pa_zshee not between 001 and 100.
        message e052(zsd).
 
      elseif pa_zmusu not between 'A' and 'P'.
        message e053(zsd).
 
      elseif pa_zmaps not between 01 and 16.
        message e054(zsd).
*endif.
*endif.
endif.
endif.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siddarth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2009 17:38:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-ranges/m-p/5350425#M1232063</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-12T17:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: Field ranges</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/field-ranges/m-p/5350426#M1232064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aarav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this code for the issue you are facing in the selection screen,&lt;/P&gt;&lt;P&gt;U need to make these changes in your at selection screen event first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
AT SELECTION-SCREEN OUTPUT.
*-Screen grouping for DLS/NTS
  IF pa_dls = 'X'.
    LOOP AT SCREEN.
      IF screen-group1 = 'G1'.
       screen-active = 1.
      ELSEIF screen-group1 = 'G2'.
         screen-active = 0.
      ENDIF.
      MODIFY SCREEN.
    ENDLOOP.
  ELSE.
    LOOP AT SCREEN.
      IF screen-group1 = 'G1'.
       screen-active = 0.
      ELSEIF screen-group1 = 'G2'.
         screen-active = 1.
      ENDIF.
      MODIFY SCREEN.
    ENDLOOP.
  ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The validations on the parameters can be done in the START-OF-SELECTION as shown below.&lt;/P&gt;&lt;P&gt;or You can also use the code given by Siddarth for validating parameters  in AT-SELECTION EVENT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
START-OF-SELECTION.

* Check whether region entered is applicable for the survey system selected.
  IF pa_dls = 'X'.
    IF pa_regio NE 'AB' AND pa_regio NE 'MB'
    AND pa_regio NE 'SK' AND pa_regio NE 'BC'.
      MESSAGE e010(zsd).
    ENDIF.
    if pa_zlsd not between 00 and 16 .
      message e044(zsd) .

    elseif pa_zsec not between  00 and 36.
      message e045(zsd) .

    elseif pa_ztwp not between 000 and 126.
      message e046(zsd) .

    elseif pa_zrang  not between 00 and 34.
      message e047(zsd) .

    elseif pa_zmeri not between 00 and 06.
      message e048(zsd) .
    endif.
*endif.
*endif.

  ELSEif  pa_nts = 'X'.
    IF pa_regio NE 'BC'.
      MESSAGE e008(zsd).
    ENDIF.
     if pa_zqu not between 'A' and 'D'.
        message e049(zsd).

      elseif pa_zunit not between 0001 and 126.
        message e050(zsd).

      elseif pa_zbloc not between 'A' and 'L'.
        message e051(zsd).

      elseif pa_zshee not between 001 and 100.
        message e052(zsd).

      elseif pa_zmusu not between 'A' and 'P'.
        message e053(zsd).

      elseif pa_zmaps not between 01 and 16.
        message e054(zsd).
*endif.
*endif.
endif.
  ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code works fine. I have tested it.&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jose&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Jose Anthony Reddy on Mar 12, 2009 11:17 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2009 17:39:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/field-ranges/m-p/5350426#M1232064</guid>
      <dc:creator>former_member313782</dc:creator>
      <dc:date>2009-03-12T17:39:22Z</dc:date>
    </item>
  </channel>
</rss>

