Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Create Radio button dynamically in Table column.

HI All

I have used following code to create radio button dynamically. but it's getting dump saying that Could not find attribute STATUS.

Here STATUS is the attribute of the node in View context. But why this dump is coming.

Please correct me if any thing worng.

DATA: lr_radio TYPE REF TO cl_wd_radiobutton.

DATA: lr_containr TYPE REF TO cl_wd_transparent_container.

DATA: lr_data TYPE REF TO cl_wd_flow_data.

IF first_time = abap_true.

lr_containr ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).

lr_radio = cl_wd_radiobutton=>new_radiobutton(

view = view

id = 'RADIO'

text = 'Enroll'

bind_selected_key = 'STATUS'

key_to_select = 'STATUS' ).

lr_data = cl_wd_flow_data=>new_flow_data( element = lr_radio ).

lr_radio->set_layout_data( lr_data ).

lr_containr->add_child( lr_radio ).


Thank you very much


Former Member
Former Member replied

The Problem might be...

1.Check the attribute STATUS of your view this individual attribute under CONTEXT or under any other node.

if it is under any other node like ..

FLIGHTS ->Node name

......STATUS ->Attribute

then you have to bind the STATUS in this way.

bind_key_to_select = 'FLIGHTS.STATUS'
bind_selected_key = 'FLIGHTS.STATUS'

2. Put the Break point here

lr_radio = cl_wd_radiobutton=>new_radiobutton( ).

and check lr_radio has any value or not.if it is then the problem is with this statement only.

Still you are not able to solve the problem.Please get back to me immediately.



0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question