2007 Dec 28 1:44 PM
Dear All,
I have a selection screen with three fields
s_matnr
s_matkl
s_prdha
Now my requirement is if i entered any one of the above field then the remaining field should not allow inputs.
It means if entered some value in s_matnr then the other two fields will not allow me to enter data.
How can i do this?
regards
shoban
2007 Dec 28 2:44 PM
Hi Shoban,
In the Event
AT SELECTION-SCREEN OUTPUT.
IF NOT s_matnr IS INITIAL.
Loop at Screen.
CASE 'screen-name'.
WHEN 'S_MATKL-LOW'.
SCREEN-INPUT = 0.
WHEN 'S_MATKL-HIGH'.
SCREEN-INPUT = 0.
WHEN 'S_PRDHA-LOW'.
SCREEN-INPUT = 0.
WHEN 'S_PRDHA-HIGH'.
SCREEN-INPUT = 0.
ENDCASE.
modify Screen.
Endloop.
endif.
Copy the above code for S_MATKL and S_PRDHA not Initial.
and modify the other 2 select options.
It will work...
Cheers!!!
Lokesh
2007 Dec 28 1:50 PM
you can put radio buttons for each type and ask the user to select the radio button and accordingly you can give inputs..
that can be done by assingning modif id to s_matnr and other s_*
and LOOP AT SCREEN.
check screen-group1 = 'M'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDLOOP.
2007 Dec 28 2:04 PM
Hi,
The best way to do this is to put radiobuttons on the selection screen for the different parameters.
Give a modif id to the radiobuttons.
Also give modif id's to the different parameters on the selection screen.
Once this is done,depending upon the radiobutton chosen you can make the other parameters inactive.
IF p_radiobutton1 = gc_flag.
LOOP AT SCREEN.
IF screen-group1 EQ <modif id of 2nd parameter>.
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 EQ <modif id of 3rd parameter>.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
In the example shown above,the other 2 parameters will become inactive once you choose the 1st radiobutton.
Hope it is useful.
Thanks,
Sandeep.
2007 Dec 28 2:20 PM
Hi,
write a event AT SELECTION SCREEN OUTPUT
loop at screen if first two fields are not initail then for field 3 make
screen-input = 0.
modify screen.
Reward if helpful
vivekanand
2007 Dec 28 2:44 PM
Hi Shoban,
In the Event
AT SELECTION-SCREEN OUTPUT.
IF NOT s_matnr IS INITIAL.
Loop at Screen.
CASE 'screen-name'.
WHEN 'S_MATKL-LOW'.
SCREEN-INPUT = 0.
WHEN 'S_MATKL-HIGH'.
SCREEN-INPUT = 0.
WHEN 'S_PRDHA-LOW'.
SCREEN-INPUT = 0.
WHEN 'S_PRDHA-HIGH'.
SCREEN-INPUT = 0.
ENDCASE.
modify Screen.
Endloop.
endif.
Copy the above code for S_MATKL and S_PRDHA not Initial.
and modify the other 2 select options.
It will work...
Cheers!!!
Lokesh