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

Screen Modification

Former Member
0 Likes
477

Hi Experts.

I need to change the screen layout in the following way:

if first radiobutton is selected ,parameter field is not mandatory

if second radiobutton is selected,parameter field is mandatory.

I have written piece of code for this but it does not works:

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-group1 = c_m1.

IF rd1 EQ c_check.

screen-active = 0.

ENDIF.

ELSEIF screen-group1 = c_m2.

IF rd2 EQ c_check.

screen-active = 0.

ENDIF.

ENDIF.

Please advice.

3 REPLIES 3
Read only

Former Member
0 Likes
458

Hi ,

Declare the radio button like :

parameters: rd1 radiobutton group g1 default 'X' modif id xyz.

just add default 'X' to ypur radiobutton declaration,

it will work,,

Regards,

Talwinder

Read only

Former Member
0 Likes
458

Check the below code. This code hides the p_param field (parameter) when rb_1 is selected.



PARAMETERS: rb_1 RADIOBUTTON GROUP g1 default 'X' user-command u1,
            rb_2 RADIOBUTTON GROUP g1.

PARAMETERS: p_param TYPE c MODIF ID m1.

AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
      IF screen-group1 = 'M1'.
        IF rb_1 = 'X'.
          screen-active = 0.
        ELSE.
          screen-active = 1.
        ENDIF.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.

Hope this helps.

Thanks,

Balaji

Read only

Former Member
0 Likes
458

thanks