Application Development and Automation 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: 
Read only

Assisning function code

Former Member
0 Likes
684

Hi all,

We have requirement of assigning function code to radio button on screen.

It's urgent.

Thanks in anticpation.

Regards,

Rajashree

7 REPLIES 7
Read only

andreas_mann3
Active Contributor
0 Likes
657

Hi,

you can only assign fcode to pushbutton - for radiobutton you must

inquire if rb = 'X'.

A.

Read only

0 Likes
657

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

Read only

0 Likes
657

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>

Read only

Former Member
0 Likes
657

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

Read only

0 Likes
657

but the function code of the butoon is coming uneditable even when we go to se51 and open screen in change mode.

Read only

0 Likes
657

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.

Read only

Former Member
0 Likes
657

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