Skip to Content
avatar image
Former Member

How to make the obligate field in selection screen

Hi ,

In my report two radio buttons and two bloc selection screens are there.When we select the first radio button first screen will be editable second screen will be non-editable vice-versa.

but the problem is in each selection screen one mandatory field is required suppose if i give the one field obligatory in first block screen it is not allowing the second readout please help me regarding this how i will make the mandatory field in both screens.

Thanks,

Harinath

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Aug 20, 2007 at 01:21 PM

    hi

    could u please send the code written in

    at selection-screen output.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      HI

      u can do like this..

      give default values to those fields which are obligatory....

      then it will work fine.

      if u want to change the value on selection screen u can change .....

      u can chk this...

      parameters : rb1 radiobutton group grp1 user-command RB1 default 'X',

      rb2 radiobutton group grp1.

      selection-screen begin of block b1 WITH FRAME.

      parameters : p_name(20) obligatory DEFAULT 'ABC' MODIF ID ID1.

      selection-screen end of block b1.

      selection-screen begin of block b2 WITH FRAME.

      parameters : p_name1(20) obligatory DEFAULT 'XYZ' MODIF ID ID2.

      selection-screen end of block b2.

      AT SELECTION-SCREEN OUTPUT.

      IF RB1 = 'X'.

      LOOP AT SCREEN.

      IF SCREEN-GROUP1 = 'ID1'.

      SCREEN-INPUT = ' '.

      MODIFY SCREEN.

      ENDIF.

      ENDLOOP.

      ELSE.

      LOOP AT SCREEN.

      IF SCREEN-GROUP1 = 'ID2'.

      SCREEN-INPUT = ' '.

      MODIFY SCREEN.

      ENDIF.

      ENDLOOP.

      ENDIF.

      Message was edited by:

      Premalatha G

  • avatar image
    Former Member
    Aug 20, 2007 at 01:34 PM

    Do not make any fields obligatory - instead code a check in the "AT SELECTION-SCREEN" event using IF tests to validate that right fields have been completed, and issue error message if not.

    Andrew

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Hari,

      Here IF u give the defauale values for the obligatory fields then u will get the error message in the same screen.If u are validating the selection screen inputs in the 'At Selection Screen event' this will display erros in the next screen.

      So give the defaulat values for obligatory fields if u wanna display the error messge in the same screen.

      Thanks,CSR.

      ****Please Reward if helpful.

  • avatar image
    Former Member
    Aug 20, 2007 at 01:36 PM

    Hi,

    Please give default values for mandatory fields.

    Then u will not face any problem.

    Thanks,CSR.

    Add comment
    10|10000 characters needed characters exceeded