6 Replies Latest reply: Aug 3, 2011 6:15 AM by Saravanan Narayanan RSS

Facing Error in Radiobutton - Webdynpro ABAP

Ankesh Jindal
Currently Being Moderated

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

  • Re: Facing Error in Radiobutton - Webdynpro ABAP
    Trond Stroemme
    Currently Being Moderated

    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

  • Re: Facing Error in Radiobutton - Webdynpro ABAP
    Rakesh Bajaj
    Currently Being Moderated

    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.

Actions