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

dynamic change to selection screen

Former Member
0 Likes
776

hi all,

i have a selection screen on which there are

2 radio buttons and 4 checkboxes.

depending on the radio button chosen

all the check boxes should be enabled (should allow to

select) or disabled (should not allow to select)

how can it be done??

regards,

Tarang

1 ACCEPTED SOLUTION
Read only

naimesh_patel
Active Contributor
0 Likes
721

Yes,

paramters: p_pdm RADIOBUTTON GROUP grp1 USER-COMMAND pntf

p_pd2 radiobutton group grp1.

parameters: p_ch1 as checkbox,

p_ch2 as checkbox,

p_ch3 as checkbox modif id gp1,

p_ch4 as checkbox.

At selection-screen output.

loop at screen.

if screen-group1 = 'GP1'.

screen-input = 0.

modify screen.

endif.

endloop.

regards,

Naimesh

Hii Tarang,

chk this link..

Regards

Naresh

6 REPLIES 6
Read only

Former Member
0 Likes
721

Hi tarang,

follow this logic:

at selection screen output.

if p_rb1 = 'X'.

loop at screen.

if screen-name = <name of the check box>.

screen-input = 0.

modify screen.

endif.

endloop.

endif.

if p_rb2 = 'X'.

loop at screen.

if screen-name = <name of the check box>.

screen-input = 1.

modify screen.

endif.

endloop.

endif.

Regards,

ravi

Read only

Former Member
0 Likes
721

Here is a example

http://help.sap.com/saphelp_nw04/helpdata/en/79/34a23dd9b511d1950e0000e8353423/content.htm

Regards,

Ravi

note : Please mark the helpful answers

Read only

naimesh_patel
Active Contributor
0 Likes
722

Yes,

paramters: p_pdm RADIOBUTTON GROUP grp1 USER-COMMAND pntf

p_pd2 radiobutton group grp1.

parameters: p_ch1 as checkbox,

p_ch2 as checkbox,

p_ch3 as checkbox modif id gp1,

p_ch4 as checkbox.

At selection-screen output.

loop at screen.

if screen-group1 = 'GP1'.

screen-input = 0.

modify screen.

endif.

endloop.

regards,

Naimesh

Read only

Former Member
0 Likes
721

hi,

When second radiobutton is clicked, all the checkboxes are ready for input, when first radiobutton is clicked, the checkboxes are inactive.

parameters : p_rad1 radiobutton group g1 user-command ABCD default 'X',
             p_rad2 radiobutton group g1.

parameters : p_chk1 as checkbox modif id ABC,
             p_chk2 as checkbox modif id ABC,
             p_chk3 as checkbox modif id ABC,
             p_chk4 as checkbox modif id ABC.

data: v_flag value 'A'.
at selection-screen output.

  if v_flag = 'A'.
    loop at screen.
      if screen-group1 = 'ABC'.
        screen-input = 0.
        modify screen.
      endif.
    endloop.
  elseif v_flag = 'B'.
    loop at screen.
      if screen-group1 = 'ABC'.
        screen-input = 1.
        modify screen.
      endif.
    endloop.
  endif.

at selection-screen.

  case sy-ucomm.
    when 'ABCD'.
      if p_rad1 = 'X'.
        v_flag = 'A'.
      else.
        v_flag = 'B'.
      endif.
  endcase.

Regards,

Sailaja.

Read only

Former Member
0 Likes
721

Hii Tarang,

chk this link..

Regards

Naresh

Read only

Former Member
0 Likes
721

Hi all,

thank u for your replies

Regards,

Tarang