Application Development 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: 

Radiobutton

Former Member
0 Kudos

Hi Experts,

I have a doubt on radiobutton display and activation.

I have two radiobutton groups.

PARAMETERS: p_file1 TYPE c RADIOBUTTON GROUP a,

p_date TYPE c RADIOBUTTON GROUP a.

PARAMETERS: p_pres TYPE c RADIOBUTTON GROUP b,

p_appl TYPE c RADIOBUTTON GROUP b.

I want.... if the user selects p_file1 then only radiobutton group b should get active/enabled.

If the user selects p_date radiobutton then the radiobutton group b should get disabled/inactive.

I was trying with loop at screen but its not working. May be I am missing out on something.

Please help.

Regards,

Sangeeta.

Points will be awarded generously for correct answer.

1 ACCEPTED SOLUTION

JozsefSzikszai
Active Contributor
0 Kudos

hi Sangeeta,

that's the way to do:

PARAMETERS: p_file1 TYPE c RADIOBUTTON GROUP a DEFAULT 'X'

USER-COMMAND uc01,

p_date TYPE c RADIOBUTTON GROUP a.

PARAMETERS: p_pres TYPE c RADIOBUTTON GROUP b MODIF ID 001,

p_appl TYPE c RADIOBUTTON GROUP b MODIF ID 001.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-group1 EQ '001'.

IF p_file1 EQ 'X'.

screen-active = '1'.

ELSE.

screen-active = '0'.

ENDIF.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

hope this helps

ec

6 REPLIES 6

Former Member
0 Kudos

Hi Sangeetha,

Could you please specify the part of code where you are looping at the screen.

Regards,

Kiran

JozsefSzikszai
Active Contributor
0 Kudos

hi Sangeeta,

that's the way to do:

PARAMETERS: p_file1 TYPE c RADIOBUTTON GROUP a DEFAULT 'X'

USER-COMMAND uc01,

p_date TYPE c RADIOBUTTON GROUP a.

PARAMETERS: p_pres TYPE c RADIOBUTTON GROUP b MODIF ID 001,

p_appl TYPE c RADIOBUTTON GROUP b MODIF ID 001.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-group1 EQ '001'.

IF p_file1 EQ 'X'.

screen-active = '1'.

ELSE.

screen-active = '0'.

ENDIF.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

hope this helps

ec

0 Kudos

Thanks Eric...you code helped me....

Regards,

Sangeeta.

Former Member
0 Kudos

sangeeta,

see the code.

PARAMETERS : p_file1 RADIOBUTTON GROUP

radi USER-COMMAND radio,

p_date RADIOBUTTON GROUP radi DEFAULT 'X'.

PARAMETERS: p_pres TYPE c RADIOBUTTON

GROUP b MODIF ID mod,

p_appl TYPE c RADIOBUTTON GROUP b

MODIF ID mod.

AT SELECTION-SCREEN OUTPUT.

IF p_file1 eq 'X'.

LOOP AT SCREEN.

IF screen-group1 EQ 'MOD'.

screen-active = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ELSE.

IF screen-group1 EQ 'MOD'.

screen-active = 0.

MODIFY SCREEN.

ENDIF.

ENDIF.

Now it will work.

Don't forget to reward if useful.....

Former Member
0 Kudos

PARAMETERS: p_file1 TYPE c RADIOBUTTON GROUP a DEFAULT 'X'

p_date TYPE c RADIOBUTTON GROUP a.

PARAMETERS: p_pres TYPE c RADIOBUTTON GROUP b MODIF ID id1,

p_appl TYPE c RADIOBUTTON GROUP b MODIF ID id1.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF screen-group1 EQ 'id1'.

IF p_file1 EQ 'X'.

screen-active = '1'.

ELSE.

screen-active = '0'.

ENDIF.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

modify screen command modify the screen at event selection-screen output according to the need

Former Member
0 Kudos

Hi Sangeeta,

u are missing USER-COMMAND OPTIONS IN RADIO BUTTONS.See the below syntax..

PARAMETERS: p_file1 TYPE c RADIOBUTTON GROUP a user-command c1,

p_date TYPE c RADIOBUTTON GROUP a.

PARAMETERS: p_pres TYPE c RADIOBUTTON GROUP b user-command c2,

p_appl TYPE c RADIOBUTTON GROUP b.

Try this logic ok..

if screen-name = 'P_FILE'.

loop at screen.

if screen-name = 'P_PRES'.

screen-input = 1.

endif.

if screen-name = 'P_APPL'.

screen-input = 0.

endif.

modify screen.

endif.

if screen-name = 'P_DATE'.

loop at screen.

if screen-name = 'P_PRES'.

screen-input = 0.

endif.

if screen-name = 'P_APPL'.

screen-input = 1.

endif.

modify screen.

endif.

Reward points if helpful

Kiran Kumar.G.A