2023 May 23 8:34 AM
Hello experts, Im trying to lock a field when user klick on a radio button. the field is editable but when user klick on a radio button it should be locked. for example: there are 2 radio buttons one YES other is NO when its on yes nothing chang but when its NO the field should be uneditable. i tried somthing like this didnt work.
MODULE user_command_0103 INPUT.
LOOP AT SCREEN.
IF screen-name = 'ZWF_BOTTLE_DS-TECH_SPE'.
IF radio2 = 'X'.
screen-input = '0'.
"screen-active = '0'.
MODIFY SCREEN.
CLEAR screen.
ENDIF.
ENDIF.
ENDLOOP.
ENDMODULE.
2023 May 23 8:38 AM
And what is the result ?
Does the variable RADIO2 having the good value ?
Did you try to put the LOOP AT SCREEN in the PBO instead of PAI ?
2023 May 23 8:48 AM
oh i thought it should be in the PAI. now i understand bothe PBO and PAI thank u sir !
2023 May 23 10:18 AM
2023 May 23 10:37 AM
Did you define the radiobutton group? Did you set functionscode 'DUMMY' for the group?
2023 May 23 10:42 AM
jens_michaelsen does that way work out of the selection screen? We're talking dynpro here (I guess it from the MODULE usage).
You're right about the function code in radiobuttons when you are changing the selection screen, but I don't know if it works the same way in a dynpro.
Anyways, sounds easier to just put a LOOP AT SCREEN in the OUTPUT and hide elements for each available option.
2023 May 23 10:43 AM
frdric.girod I think you should create an answer like "put in your OUTPUT module a LOOP AT SCREEN doing...
2023 May 23 10:50 AM
@Vicenc Xavier Lozano It works also in dynpro. If you change the radiobuttons on dynpro nothing will happen unless you press enter to process PAI and PBO. If you set a functionscode for the group, PAI and PBO will be processed automatically after changing the radiobutton
2023 May 23 11:20 AM