Hi All.
I have requirement to make one field in table as read only based on value of another field in the table.
I am populating the table and during population, I am using below code, but this is not working.
lo_node = wd_context->get_child_node( name = wd_this->wdctx_price ).
lt_elements = lo_node->get_elements( ).
LOOP AT lt_elements INTO ls_elements .
ls_elements->get_static_attributes(
IMPORTING
static_attributes = ls_data ).
IF ls_data-konwa = '%'. “ Condition on which I have make another field PER_MEINS read only
ls_elements->set_attribute_property(
EXPORTING
attribute_name = 'PER_MEINS'
property = 3 "if_wd_context_element=>e_property-read_only
value = abap_true ).
ENDIF.
ENDLOOP.
Can anyone please suggest how to achieve this.
Thanks in advance.