Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Sandeep_Kumar
Advisor
Advisor
0 Kudos

Try the same in At selection screen.

JozsefSzikszai
Active Contributor
0 Kudos

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'.
...