Skip to Content

Table UI with Check box - Toggle option

Hi Team,

We have Table ui element with 6 columns, out of these 1 column has Check-boxes.

Whenever the user clicks on the check box in that line line then one particular cell alone should become read-only.

We tried, with Toggle action in the check-box and below is the code written, but unfortunately the read only property is never sets. Please let me know your thoughts on this.

we used the same approach which has been discussed in the SDN document. but for us it is not working.

DATA lo_node TYPE REF TO if_wd_context_node.

DATA lt_elements TYPE wdr_context_element_set.

DATA ls_elements LIKE LINE OF lt_elements.

DATA lt_attr_names TYPE string_table.

DATA lv_attr_name LIKE LINE OF lt_attr_names.

DATA ls_data TYPE wd_this->element_mother_coil.

FIELD-SYMBOLS: <fs_value> TYPE any.

lo_node = wd_context->get_child_node( name = wd_this->wdctx_mother_coil ).

lt_elements = lo_node->get_elements( ).

lt_attr_names = lo_node->get_node_info( )->get_attribute_names( ).

LOOP AT lt_elements INTO ls_elements.

ls_elements->get_static_attributes( IMPORTING static_attributes = ls_data ).

IF ls_data-complete_consuption IS NOT INITIAL.

LOOP AT lt_attr_names INTO lv_attr_name WHERE table_line = 'CONSUPTION_QUANTITY'.



attribute_name = 'CONSUPTION_QUANTITY'

property = ls_elements->e_property-read_only

value = abap_true ).




Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Apr 18, 2017 at 11:57 AM

    Hello Bala,

    Check the Binding properties of Checkbox.

    I hope you assigned appropriate binding attribute to READ-ONLY field.

    The data element for read only field is WDY_BOOLEAN with values

    X -True

    space- False

    So u can directly read that line item set value as 'X' to it

    node-attrb-field = 'X'.

    Thanks ,


    Add comment
    10|10000 characters needed characters exceeded

  • Apr 20, 2017 at 12:52 AM

    Thanks Deepak,

    Yes the binding was missing, now it is working as expected

    Add comment
    10|10000 characters needed characters exceeded