cancel
Showing results for 
Search instead for 
Did you mean: 

Facing Error in Radiobutton - Webdynpro ABAP

Former Member
0 Kudos

Hi,

I am using Radiobutton UI Element.

I have requirement of taking 5 Radiobutton in which user can only select 1 value.

So I have created 5 Radiobutton . I have binded KeytoSelect property to different value

Say

For

RD1 its LA

RD2 its LB

RD3 its LC

RD4 its LD

RD5 its LE

So i have bound all these radiobutton to one attribute of node whose cardanality is 1 : 1 and type char2.

So when i execute it , on any event on screen it is giving me error

'The value entered is not in the list of allowed values.'

So i could not found the reason why it is coming. I have also tried to make one data element and domain and try to put

the values like LA to LC in its fixed value but again it is giving the same error.

Please suggest

Thanks

Ankesh

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Have you used RADIO_BUTTON_GROUP_BY_IDX or RADIO_BUTTON_GROUP_BY_KEY? And check the fixed values that you have used. You should use LA rathen than 'LA'.

You need to do some coding for radio button ui element and attach an event for eg. ON_SELECT to it.

Eg. I have 4 radio buttons and bound it to attribute with domain having fixed values 1,2,3 and 4.

Then do the coding in method ONACTIONON_SELECT that is attached to UI Element radio button.

Here RADIO_BUTTON_GROUP_BY_KEY is used.

data : str type string.

str = wdevent->get_string('KEY').

if str = '1'.

CALL METHOD wd_context->set_attribute

EXPORTING

  • index = USE_LEAD_SELECTION

value = ' radio button 1 selected'

name = 'DISPLAY'

.

  • where DISPLAY is attribute of type string.

ELSEIF str = '2'.

CALL METHOD wd_context->set_attribute

EXPORTING

  • index = USE_LEAD_SELECTION

value = ' radio button 2 selected'

name = 'DISPLAY'.

ELSEIF str = '3'.

CALL METHOD wd_context->set_attribute

EXPORTING

  • index = USE_LEAD_SELECTION

value = ' radio button 3 selected'

name = 'DISPLAY'

.

ELSEIF str = '4'.

CALL METHOD wd_context->set_attribute

EXPORTING

  • index = USE_LEAD_SELECTION

value = ' radio button 4 selected'

name = 'DISPLAY'.

endif.

Former Member
0 Kudos

I m using only Radiobutton .

I could not even go to action as it is displaying error before that

stating 'The Entered Value Is Not on the List of Valid Values'

Former Member
0 Kudos

But you have to implement some action when you select one of the radio buttons.

So, use RADIOBUTTON_GROUP_BY KEY rather than RADIO BUTTON UI Element and you can use the code mentioned before.

saravanan_narayanan
Active Contributor
0 Kudos

Hello Ankesh,

Your radio button configuration looks perfect. I dont see any problem with it. Just for clarificaton. Due to any other fields in the UI like DropDownByIndex / DropDownBy Key / Input field with Suggest values enabled?

If so then I suspect the problem might be with the other fields. Normally this error occurs, if you enter some values in the input enabled field and if this value is not list of allowed values. Check it out.

BR, Saravanan

Former Member
0 Kudos

Hi,

did you enter the keyToSelect values inside quotes ('LA' instead of LA) to define them as character strings? If not, this might be the problem...

Regards,

Trond

Former Member
0 Kudos

Yes i have changed it to 'LA' but is still giving the same error, i stucked very badly into it

Pls suggest

Ankesh