‎2008 Jan 29 7:24 AM
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.
‎2008 Jan 29 7:32 AM
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
‎2008 Jan 29 7:27 AM
Hi Sangeetha,
Could you please specify the part of code where you are looping at the screen.
Regards,
Kiran
‎2008 Jan 29 7:32 AM
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
‎2008 Jan 29 7:47 AM
‎2008 Jan 29 7:34 AM
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.....
‎2008 Jan 29 7:41 AM
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
‎2008 Jan 29 8:05 AM
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