Application Development and Automation 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: 
Read only

Module Pool - Radiobuttons not getting disabled

Former Member
0 Likes
714

I have a checkbox on the screen with name G_S_DUPREC-DUPREC_DEL, I want to disable 3 radiobuttons 'RSODSZIEL-ODS3', 'RSODSZIEL-ODS2' and 'RSODSZIEL-ODS4' on the screen when user checks the checkbox and clicks on start button G_S_DUPREC-DUPREC_DEL on the screen. I have written the code below in the User Command module of the screen. I have debugged to see if the statements below get exectuted and they do, but the radiobuttons dont actually get disabled. I dont know why, please reply, I will award points for the helpful answer

MODULE USER_COMMAND_9000 INPUT.

case sy-ucomm.

when 'STRT'.

loop at screen.

if G_S_DUPREC-DUPREC_DEL = 'X'.

if screen-name = 'RSODSZIEL-ODS3'

or screen-name = 'RSODSZIEL-ODS2'

or screen-name = 'RSODSZIEL-ODS4'.

screen-input = 0.

endif.

endif.

modify screen.

endloop.

endcase.

ENDMODULE. " USER_COMMAND_9000 INPUT

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
674

like below

.
in your user command

IF g_s_duprec-duprec_del = 'X'.
  my_flag = 'X'.
ELSE.
  CLEAR my_flag.
ENDIF.

and then in you PBO

IF my_flag = 'X'.
*-- disable the radiobuttons
ELSE.
*-- enable them
ENDIF.

Your modification code is ok but it is in the wrong place.

I have a checkbox on the screen with name G_S_DUPREC-DUPREC_DEL, I want to disable 3 radiobuttons 'RSODSZIEL-ODS3', 'RSODSZIEL-ODS2' and 'RSODSZIEL-ODS4' on the screen when user checks the checkbox and clicks on start button G_S_DUPREC-DUPREC_DEL on the screen. I have written the code below in the User Command module of the screen. I have debugged to see if the statements below get exectuted and they do, but the radiobuttons dont actually get disabled. I dont know why, please reply, I will award points for the helpful answer

MODULE USER_COMMAND_9000 INPUT.

case sy-ucomm.

when 'STRT'.

loop at screen.

if G_S_DUPREC-DUPREC_DEL = 'X'.

if screen-name = 'RSODSZIEL-ODS3'

or screen-name = 'RSODSZIEL-ODS2'

or screen-name = 'RSODSZIEL-ODS4'.

screen-input = 0.

endif.

endif.

modify screen.

endloop.

endcase.

ENDMODULE. " USER_COMMAND_9000 INPUT

4 REPLIES 4
Read only

Former Member
0 Likes
674

You cannot modify the screen in PAI. Do it in PBO after setting some variable.

Read only

Former Member
0 Likes
675

like below

.
in your user command

IF g_s_duprec-duprec_del = 'X'.
  my_flag = 'X'.
ELSE.
  CLEAR my_flag.
ENDIF.

and then in you PBO

IF my_flag = 'X'.
*-- disable the radiobuttons
ELSE.
*-- enable them
ENDIF.

Your modification code is ok but it is in the wrong place.

Read only

Former Member
0 Likes
674

Also I just want to add to the above that if I put the code to disable the radiobuttons in the PBO module STATUS_9000, it works. So it seems that I m not placing the code in the correct module or something

Read only

0 Likes
674

Thanks Srinivas, I have awarded 10 points