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

module pool

Former Member
0 Likes
2,258

After creating a new radio button group, how to assign function code and function type to radio button group

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,232

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...

21 REPLIES 21
Read only

Former Member
0 Likes
2,232

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.

Read only

0 Likes
2,232

Please elaborate how to see this in the layout editor

Read only

Former Member
0 Likes
2,233

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...

Read only

0 Likes
2,232

when i double click function code and function group are showing up as greyed out

Read only

0 Likes
2,232

check is it in change mode?

Read only

0 Likes
2,232

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

Read only

0 Likes
2,232

let me check that

Read only

0 Likes
2,232

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.

Read only

0 Likes
2,232

There is no right click define

Read only

0 Likes
2,232

Right Click

Radio Button group->define

Read only

0 Likes
2,232

hi,

i fu hav two radio buttons select them together and right click->radio button group->define.

Read only

0 Likes
2,232

hi,

first select all radio button and then right click-> radio button group> define...

Read only

0 Likes
2,232

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

Read only

0 Likes
2,232

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

Read only

Former Member
0 Likes
2,232

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....

Read only

Former Member
0 Likes
2,232

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

Read only

Former Member
0 Likes
2,232

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

Read only

0 Likes
2,232

still does not work, radio button is always checked and message 'Please choose a valid function comes'

Read only

0 Likes
2,232

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

Read only

0 Likes
2,232

Now there are two radio buttons in a group, when I select one, the system toggles to the other one automatically.

Read only

0 Likes
2,232

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?