cancel
Showing results for 
Search instead for 
Did you mean: 

To make selected Field in the table editable

Former Member
0 Kudos

Hi All,

I got a requirement to make the selected field of Web Dynpro editable. The steps should be:

1. Point a table field(Table UI Element, not ALV).

2. click Edit button.

3. The field should become editable now, and the changes made should be reflected in the table.

Thanks

Gaurav

Accepted Solutions (0)

Answers (1)

Answers (1)

saravanan_narayanan
Active Contributor
0 Kudos

Hello Gaurav,

Are you talking about editing a row or a particular field? If your requirement is to edit a particular row then do the following

1. Create an attribute (say READ_ONLY ) of type boolean in the context node that was bound to the Table UI Element.

2. While populating the data for the Table's context node, set the value of the READ_ONLY attribute to abap_true

3. bind this attribute to the readOnly property of the Table Cell Editors

4. In the Action event handled of the button EDIT, write the code to reset the READ_ONLY flag



data lo_nd_table type ref to if_wd_context_node.
data lo_el_table type ref to if_wd_context_element.

lo_nd_table = wd_context->get_child_node( <TABLE's CONTEXT NODE NAME> ).
lo_el_table = lo_nd_Table->get_element( ).

lo_el_table->set_atttribute( name = 'READ_ONLY' value = abap_false ).

BR, Saravanan