Skip to Content
avatar image
Former Member

How to gray out a selection field when data is entered in selection screen

Hi

On the event of entering a value in the field in my selection screen I want other fields to be grayed out.

I have implemented MODIF ID but my fields are grayed out immediately after execution of program, whereas I want the fields to be gray out only when user is entering data in other field.

I have used below code:

AT SELECTION-SCREEN OUTPUT.

loop at screen.

if screen-group1 = 123. " MIDIF ID for each selection-option is given as 123

screen-input = '0'.

modify screen.

endif.

Thank you in advance

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Dec 09, 2008 at 07:33 AM

    HI,

    Below was the senario i useed in one of our development.

    if i click on the checkbox one of the parameter gets grayedout and vice vesa.

    PARAMETERS: p_check TYPE pp0c-test USER-COMMAND mode.

    PARAMETERS: p_file TYPE rlgrap-filename. "Input file name

    PARAMETERS: p_afile TYPE rlgrap-filename. "Input file name

    AT SELECTION-SCREEN OUTPUT.

    IF p_check IS INITIAL.

    LOOP AT SCREEN.

    IF screen-name = 'P_AFILE'.

    screen-input = '0'.

    ELSEIF screen-name = 'P_FILE'.

    screen-input = '1'.

    ENDIF.

    MODIFY SCREEN.

    ENDLOOP.

    ELSE.

    LOOP AT SCREEN.

    IF screen-name = 'P_AFILE'.

    screen-input = '1'.

    ELSEIF screen-name = 'P_FILE'.

    screen-input = '0'.

    ENDIF.

    MODIFY SCREEN.

    ENDLOOP.

    ENDI

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 09, 2008 at 07:34 AM

    hi,

    check with the select-field before checking modif id. if the field to be initial then make the modifincation in the loop at screen.

    this will be working.

    byee

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 09, 2008 at 07:34 AM

    Try the same in At selection screen.

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 09, 2008 at 07:42 AM

    you have to add one more line:

    LOOP AT screen.
    CHECK field IS NOT INITIAL. "field has to be the field has to be filled by the user
    IF screen-group1 EQ '123'.
    ...

    Add comment
    10|10000 characters needed characters exceeded