Skip to Content

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

Check-box --- Read only property in Table UI Element of Webdynpro

Hi Experts,

We have standard SRM webdynpro component where in we have a Table UI element about 26 columns,

Here one of the Column is a check-box. Based on the Login user this check box column should be in read only mode.

for instance if any users log-in he should have the previlage to check or uncheck the check box, But whenever an approvers sees the same page the check-box column should be in a dis-abled mode. i tried the below code... but unfortunately it is not behaving as expected.

"Get table reference
    lo_table ?= view->get_element('ITEMS_TABLE').

    "Get Columns of table

    lt_cols = lo_table->get_columns( ).

    "Check if no columns found
    IF lt_cols[] IS INITIAL.

      "get grouped columns list
      lt_grp_cols = lo_table->get_grouped_columns( ).

      "collect into columns table
      LOOP AT lt_grp_cols INTO ls_grp_cols.
        ls_cols ?= ls_grp_cols.
        APPEND ls_cols TO lt_cols.

    "For each column and its editor, set the read only property
    LOOP AT lt_cols INTO ls_cols.

      " get the cell editor,
      lo_inp ?= ls_cols->get_table_cell_editor( ).

IF ls_cols->id = 'ITEMS_TABLE_ACPT_IND'.

      IF lo_inp IS BOUND.
        lv_path =  lo_inp->bound__primary_property( ).

        CONCATENATE lv_path 'READ_ONLY' INTO lv_path SEPARATED BY ':'.


      "bind the read_only property to the attributes property

        lo_inp->bind_read_only( path = lv_path ).




Hi Balajisha,

If you are trying to get the sub node, then you use the method PATH_GET_NODE(  ) and pass the path like 'COMP_CONTEXT.1.ITEMS'

Please refer the below link for more info.

Reference Path to Deeper Context Nodes - Web Dynpro for ABAP - SAP Library



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