‎2007 Jan 18 8:13 AM
Hi all,
We have requirement of assigning function code to radio button on screen.
It's urgent.
Thanks in anticpation.
Regards,
Rajashree
‎2007 Jan 18 8:21 AM
Hi,
you can only assign fcode to pushbutton - for radiobutton you must
inquire if rb = 'X'.
A.
‎2007 Jan 18 8:23 AM
we hav requirement of checking if a radio rb1 on screen is chekke dthen greying out other fields of screen.How can we acheive this.
Regards,
rajashree
‎2007 Jan 19 6:34 AM
Instead of using radio button, use checkbox..<br>
make it functionality as radio button.<br>
in the <b>PBO</b> of scren--<br>
check chk1 ='X'<br>
if sy-ucomm = 'Fcode assigned to chk1'<br>
loop at screen.<br>
grey out the require fields(inactive= 1 )<br>
modify screen.<br>
endloop.<br>
‎2007 Jan 18 8:23 AM
Hello Rajashree,
You can assign a function code to a radio button just like you do it for a button. Goto transaction SE51, open the screen in change mode and go to Field Attributes for the radio button, there you can enter the function code. You can handle the user command just like for the button.
Regards,
Manoj
‎2007 Jan 18 8:25 AM
but the function code of the butoon is coming uneditable even when we go to se51 and open screen in change mode.
‎2007 Jan 18 8:43 AM
1. In the screen painter, place two or more radio buttons on the screens and give them the names.
2. Select the Radio Buttons with your mouse and do a right-click. On the context menu, choose RadioButton Group-->Define.
3. Now just press F7. There will be a pop-up for the element list. Scroll a little to the left and give a function code to one of the radio-buttons. You will see that all the radio buttons which you have grouped together will get the same function code automatically.
‎2007 Jan 18 12:56 PM
Hi as per previous answer you select and make a group of radio button by right clicking then you will be able to give it FCODE.
But now your Radio Button will work like a push button clicking it will activate the PAI event. Now in pai you have to write a case statement to know which button is pressed.
Example: With three radio button named Radio1,2 and 3 with FCODE RAD and Group name RADIO_GRP.
DATA: radio1(1) TYPE c, radio2(1) TYPE c, radio3(1) TYPE c.
MODULE USER_COMMAND_0100 INPUT.
CASE 'X'.
when radio1.
,,,,,,
when radio2.
....
When radio3.
....
endcase.
ENDMODULE. " USER_COMMAND_0100 INPUT