12-12-2008 1:01 PM
Hi All,
I have created two radiobuttons with screen painter and grouped them and given function- code for the group. In the program i want to check which radio button is clicked. I am not able to set Fcodes for each button differently. Can anyone help me how to do this.
Thanks and regards,
Kranthi.
12-12-2008 1:13 PM
Hi,
I tried with that code but it is giving the following error.
Field "STD" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement . . . . . . . . . .
Here 'STD' is the radio button name.
Thanks and regards,
Kranthi.
12-12-2008 1:02 PM
12-12-2008 1:03 PM
quite simple:
CASE 'X'.
WHEN rb1.
==> first radiobutton is clicked
WHEN rb2.
==> second radiobutton is clicked
ENDCASE.
12-12-2008 1:05 PM
The function code must be the same, so check the value when processing the code.
(...)
PARAMETERS p1 RADIOBUTTON GROUP grp USER-COMMAND opt.
PARAMETERS p2 RADIOBUTTON GROUP grp.
(...)
AT SELECTION-SCREEN.
CASE sscrfields-ucomm.
WHEN 'OPT'.
IF p1 EQ 'X'.
" process p1
ELSEIF p2 EQ 'X'.
" process p2
ENDIF.
ENDCASE.
(...)
Adapt the logic in PBO with dynpro. (If OK_CODE is the FC of the group, then check individual values of the radiobuttion of the group)
Regards
12-12-2008 1:09 PM
Hi,
You must have given the name to each Radio button say Radio1 and Radio2. Use that name.
IF radio1 = 'X'.
....your code.
ELSEIF radio2 = 'X'.
....your code.
ENDIF.
Regards,
Nadim
12-12-2008 1:13 PM
Hi,
I tried with that code but it is giving the following error.
Field "STD" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement . . . . . . . . . .
Here 'STD' is the radio button name.
Thanks and regards,
Kranthi.
12-12-2008 1:30 PM
actually it is not clear, to whom do you answer, but the radiobuttons have to exist as global variables in the program:
DATA : rb1 TYPE c...
(with same name like on the screen!)
12-12-2008 1:40 PM
Hi,
In the Attributes of your radio button DO NOT check the checkbox 'From Dict'. Define it as CHAR type only. It should work fine then.
Regards,
Nadim
12-12-2008 1:49 PM
Hi Eric,
You solved my problem. After defining radiobuttons as character it is working.
Thanks a lot.
Kranthi.