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

Regarding Selection Screen

Former Member
0 Likes
890

Hi Experts,

i have two radibuttons on selection screen. I want if i select 2nd radibutton a field shud become visible for input. if i select 1st one it shud become disable for input.

how can i do that?

Its really urgent...

Thanks

Azad.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
870

Hi,

Define Modif id for that Two Radio Buttons.

Then Write codeings like this,

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-group1 = 'SC1'.

screen-input = '0'.

MODIFY SCREEN.

ELSEIF screen-group1 = 'SC2'.

screen-input = '1'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Regards,

Padmam.

8 REPLIES 8
Read only

Former Member
0 Likes
870

hi,

loop at screen.

screen-active = 0.

modify screen.

endloop.

U need to make active whatever the field u want.

Read only

Former Member
0 Likes
871

Hi,

Define Modif id for that Two Radio Buttons.

Then Write codeings like this,

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-group1 = 'SC1'.

screen-input = '0'.

MODIFY SCREEN.

ELSEIF screen-group1 = 'SC2'.

screen-input = '1'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Regards,

Padmam.

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
870

Hi,

Try this.

PARAMETERS: ONE RADIOBUTTON GROUP R1 default 'X' user-command rusr,

ALL RADIOBUTTON GROUP R1,

USER LIKE USR02-BNAME DEFAULT SY-UNAME modif id Z1.

AT SELECTION-SCREEN output.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'Z1'. "Name field

IF all = 'X'.

SCREEN-ACTIVE = 1.

ELSE.

SCREEN-ACTIVE = 0.

ENDIF.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Read only

Former Member
0 Likes
870

selection-screen begin of block b1 with frame.

PARAMETERS:

rad1 RADIOBUTTON GROUP rad USER-COMMAND radio.

SELECT-OPTIONS:

s_carrid FOR spfli-carrid MODIF ID sl1,

s_connid FOR spfli-connid MODIF ID sl1.

PARAMETERS:

rad2 RADIOBUTTON GROUP rad.

SELECT-OPTIONS:

s_fldate FOR sflight-fldate MODIF ID sl2.

selection-screen end of block b1.

at selection-screen output.

loop at screen.

IF rad1 = 'X'.

IF screen-group1 = 'SL2'.

screen-input = 0.

ENDIF.

ELSEIF rad2 = 'X'.

IF screen-group1 = 'SL1'.

screen-input = 0.

ENDIF.

ENDIF.

MODIFY SCREEN.

Read only

Former Member
0 Likes
870

THIS IS NOT WORKING.

my code is like this.

PARAMETERS: p_bukrs LIKE bsid-bukrs OBLIGATORY DEFAULT 'PCF'.

SELECT-OPTIONS: p_kunnr FOR bsid-kunnr OBLIGATORY.

SELECT-OPTIONS: s_date FOR bsid-budat OBLIGATORY NO-EXTENSION.

SELECTION-SCREEN END OF BLOCK blk1.

SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.

PARAMETERS: r_print RADIOBUTTON GROUP grp DEFAULT 'X'.

PARAMETERS: r_pdf RADIOBUTTON GROUP grp.

PARAMETERS: p_file TYPE localfile OBLIGATORY MODIF ID DSP.

SELECTION-SCREEN END OF BLOCK blk2.

you can see in second block i have p_file parameter. it shud be visible only when i select r_pdf radiobutton. by default it is hidden. because the control is on print.

please help me out.

Thanks

Azad.

Read only

0 Likes
870

Hi,

PARAMETERS: r_print RADIOBUTTON GROUP grp DEFAULT 'X' user-command rusr.

PARAMETERS: r_pdf RADIOBUTTON GROUP grp.

PARAMETERS: p_file TYPE localfile OBLIGATORY MODIF ID DSP.

AT SELECTION-SCREEN output.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'DSP'.

IF r_pdf = 'X'.

SCREEN-ACTIVE = 1.

ELSE.

SCREEN-ACTIVE = 0.

ENDIF.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Read only

Former Member
0 Likes
870

loop at screen

if screen-name = <Fieldname>

screen-active = 0.

modify screen.

endif

endloop

Hope this code helps

Read only

Former Member
0 Likes
870

Hi,

the parameter should be assigned to a modification group.

parameters p_text type c modif id aaa.

At selection-screen output.

if r1 = 'X'.

loop at screen.

if screen-group1 = 'AAA'.

screen-active = 0.

endif.

enloop.

else.

loop at screen.

if screen-group1 = 'AAA'.

screen-active = 1.

endif.

enloop.