cancel
Showing results for 
Search instead for 
Did you mean: 

Create Dynamic radio buttons/depends upon result of internal table/Dynpro?

koushikking
Explorer
0 Kudos

Hi,

New to Web dynpro. Am creating Radio buttons dynamically but the texts for all created radio buttons am getting same. Here s the code.

LOOP AT lt_desc INTO ls_desc.

       lv_cnt    = sy-tabix.

  

       lo_el_search->set_attribute(

       EXPORTING

         value = ls_desc-gstxt

         name  = 'GSTXT' ).

       lo_el_search->set_attribute(

       EXPORTING

         value = lv_cnt

         name  = 'DEFRAD' ).

       CALL METHOD cl_wd_radiobutton=>new_radiobutton

         EXPORTING

           bind_key_to_select = 'SEARCH.DEFRAD'

           bind_selected_key  = 'SEARCH.OPTION'

           bind_text                = 'SEARCH.GSTXT'

         RECEIVING

           control            = lv_radbut.

       lv_matdata = cl_wd_matrix_head_data=>new_matrix_head_data( lv_radbut ).

       lr_container->add_child( lv_radbut ).

     ENDLOOP.


Please find me an answer.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member197475
Active Contributor
0 Kudos

Hi Koushik,

What is 'SERACH.GSTXT'. Check this once in debugging and also make sure to clear it at the end of the loop. It should help you.

BR,

RAM.