‎2008 Jan 18 10:22 AM
After creating a new radio button group, how to assign function code and function type to radio button group
‎2008 Jan 18 10:33 AM
hi,
have u created radio buttons on screen?
then go to its attribute(by double clicking on it)........
You can assign Function code and function type there....
reward if usefull...
‎2008 Jan 18 10:24 AM
Hi,
parameters:
p_app RADIOBUTTON GROUP g1 USER-COMMAND app ,
" To approve timesheet
p_disp RADIOBUTTON GROUP g1. " To display timesheet
Plzz reward points if it helps.
‎2008 Jan 18 10:26 AM
‎2008 Jan 18 10:33 AM
hi,
have u created radio buttons on screen?
then go to its attribute(by double clicking on it)........
You can assign Function code and function type there....
reward if usefull...
‎2008 Jan 18 10:37 AM
when i double click function code and function group are showing up as greyed out
‎2008 Jan 18 10:40 AM
‎2008 Jan 18 10:43 AM
I dragged and dropped radio button in layout.
then I gave it a name and I cannot see function code and function type, greyed out
‎2008 Jan 18 10:45 AM
‎2008 Jan 18 10:53 AM
ya i found...
select all the radio button
right click on them and radio button --> define...
now function code will be enable.
reward if usefull.
‎2008 Jan 18 11:00 AM
‎2008 Jan 18 11:05 AM
‎2008 Jan 18 11:06 AM
hi,
i fu hav two radio buttons select them together and right click->radio button group->define.
‎2008 Jan 18 11:10 AM
hi,
first select all radio button and then right click-> radio button group> define...
‎2008 Jan 18 11:11 AM
Create two tadio buttons R1 and R2 on u r screen
select the 2 radio button then
edit -> grouping -> radiobutton group -> define
Now u double click R1 and enter u r function code
similarly R2
‎2008 Jan 18 11:36 AM
Hi,
I am using function code and function type for radio button
*****PAI Module
MODULE user_command INPUT.
DATA : ok_code TYPE sy-ucomm.
If ok_code = 'ZRAD1'.
CALL SCREEN 9002.
endif.
I have defined function code as ZRAD1 and function type S, however on clicking radio button (both are checked already), screen 9002 is not called.
Edited by: S V on Jan 18, 2008 12:37 PM
‎2008 Jan 18 10:34 AM
Hi
You can define checkboxes and radio buttons with function codes, you can do the same with checkboxes and radio buttons on selection screens. You do this using the USER-COMMAND addition when you declare the relevant parameters:
PARAMETERS ... AS CHECKBOX | RADIOBUTTON GROUP ... USER-COMMAND <ucom>.
You can assign a function code <ucom> to an individual checkbox. However, a radio button group must have one shared function code, since it is only possible to make the assignment for the first button in the group.
When you select a checkbox or radio button in a group, the runtime analysis triggers the AT SELECTION-SCREEN event and places the function code <ucom> into component UCOMM of the interface work area SSCRFIELDS. You must use the TABLES statement to declare the SSCRFIELDS structure.
After the AT SELECTION-SCREEN event has been processed, the system displays the selection screen again. The only way to exit the selection screen and carry on processing the program is to choose Execute (F8). Consequently, checkboxes and radio buttons with function codes are more suitable for controlling dynamic modifications on a selection screen than for controlling the program flow.
REPORT demo_sel_screen_user_command.
TABLES sscrfields.
PARAMETERS: rad1 RADIOBUTTON GROUP rad USER-COMMAND radio,
rad2 RADIOBUTTON GROUP rad,
rad3 RADIOBUTTON GROUP rad.
PARAMETERS check AS CHECKBOX USER-COMMAND check.
AT SELECTION-SCREEN.
MESSAGE i888(sabapdocu) WITH text-001 sscrfields-ucomm.
START-OF-SELECTION.
WRITE text-002.
This program assigns function codes to a radio button group and a checkbox.
plzz reward if it is useful....
‎2008 Jan 18 10:57 AM
give a function code to your radiobuttons grouped as R.
in you top include..
data : r1 type c,
r2 type c,
text(100) type c,
ok_code type sy-ucomm.
give the same name to text filed in screen.
&----
*& Module STATUS_9000 OUTPUT
&----
text
-
module STATUS_9000 output.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
cleaR OK_CODE.
endmodule. " STATUS_9000 OUTPUT
&----
*& Module USER_COMMAND_9000 INPUT
&----
text
-
module USER_COMMAND_9000 input.
if ok_code = 'R'.
IF R1 = 'X'.
TEXT = 'YOU SELECTED ONE'.
ELSEIF R2 = 'X'.
TEXT = 'YOU SELCTED TWO'.
ELSE.
TEXT = ' '.
ENDIF.
ENDIF.
clear ok_code.
endmodule. " USER_COMMAND_9000 INPUT
‎2008 Jan 18 11:46 AM
right click on the Radio-button then click 'define'.
then assign a Fcode to the group.
Do it it will work
reward points if useful,
kushagra
‎2008 Jan 18 11:53 AM
still does not work, radio button is always checked and message 'Please choose a valid function comes'
‎2008 Jan 18 12:06 PM
hi,
no need to assign S as function type just leave it blank..
then it will work
MODULE user_command_1000 INPUT.
ok_code = sy-ucomm.
CASE ok_code.
WHEN 'BACK' OR 'UP' OR 'CANC'.
LEAVE PROGRAM.
WHEN 'F1'.
CALL TRANSACTION 'MM03'.
ENDCASE.
ENDMODULE. " USER_COMMAND_1000 INPUT
its working fine in my case
Edited by: Dhwani shah on Jan 18, 2008 1:06 PM
‎2008 Jan 18 12:24 PM
Now there are two radio buttons in a group, when I select one, the system toggles to the other one automatically.
‎2008 Jan 18 12:27 PM
ok,
tell me ur requirement...
u need to call different screen on clicking different radio button?
and also tellme what u exactly did in radio buttons?