‎2006 Aug 21 11:24 AM
hi all,
i want to use check boxes instaed of radio buttons and those check boxes shoulbe form as a group
SELECTION-SCREEN BEGIN OF LINE.
selection-screen position 1.
SELECTION-SCREEN COMMENT 1(30) TEXT-002 FOR FIELD p_pdm.
PARAMETERS:
p_pdm RADIOBUTTON GROUP grp1 USER-COMMAND pntf."PDM Notification
SELECTION-SCREEN POSITION 40.
SELECTION-SCREEN COMMENT 41(10) TEXT-003 FOR FIELD P_task.
PARAMETERS:
p_task RADIOBUTTON GROUP grp1. "Task Notification
SELECTION-SCREEN END OF LINE.
I want to use check boxes instead of radio buttons and those radio buttons should be divided into two groups
For ex
group 1: Pdm group2: task
Check boxes
A d
B e
C f
thanks
ram
‎2006 Aug 21 11:30 AM
use the command;
parameters: p_cb as check-box. "try with checkbox(without hyphen if it doesnt work).
There is no concept of grouping in checkboxes.
Regards,
ravi
‎2006 Aug 21 12:32 PM
hi ,
how u can decalre check boxes under radio button
radiobutton1:
1)cbox1
2)cbox2
---
tahnks
ram
‎2006 Aug 21 11:45 AM
‎2006 Aug 21 11:57 AM
hi,
We have to write few lines of code for making checkboxes to behave like radio buttons.
parameters : p_chk1 as checkbox user-command ABCD default 'X',
p_chk2 as checkbox user-command PQRS.
data: v_clk1 type c value 'X',
v_clk2 type c.
at selection-screen output.
if v_clk1 = 'X'.
p_chk1 = 'X'.
else.
p_chk1 = ' '.
endif.
if v_clk2 = 'X'.
p_chk2 = 'X'.
else.
p_chk2 = ' '.
endif.
at selection-screen.
case sy-ucomm.
when 'ABCD'.
if p_chk1 = 'X'.
v_clk1 = 'X'.
v_clk2 = ' '.
else.
v_clk1 = ' '.
v_clk2 = 'X'.
endif.
when 'PQRS'.
if p_chk2 = 'X'.
v_clk2 = 'X'.
v_clk1 = ' '.
else.
v_clk2 = ' '.
v_clk1 = 'X'.
endif.
Regards,
Sailaja.
‎2006 Aug 21 12:37 PM
Hi,
You can not declare checkboxes under radiobuttons.
You can get the similar functionality which you get for radiobuttons to the checkboxes also (making into a group) by few lines of code which i have given in my earlier post.
Regards,
Sailaja.
‎2006 Aug 21 11:58 PM
Hello Rams
Probably you can achieve that your checkboxes behave like radiobuttons using user-commands attached to the checkboxes.
Yet this makes absolutely no sense to me, because it is violating the SAP standards for creating user interfaces.
Exclusive options (XOR) are represented using radio-buttons, whereas alternative options (OR) are represented as checkboxes.
So do not waste your time to change things where the entire SAP community has become familiar with for decades (not to speak of all the Windows/Mac/Linux users around the world).
Regards
Uwe