cancel
Showing results for 
Search instead for 
Did you mean: 

how to deselect a select table column?

Peter_Lintner
Participant
0 Kudos

Hi!

I've implemented a table with selectable columns.

This is working fine, but I'm not clear how to deselect the selected table column with code.

How to do so?

Thanks for any hints!

Peter

Accepted Solutions (0)

Answers (2)

Answers (2)

Peter_Lintner
Participant
0 Kudos

Hi!

Thanks for the code, but my problem is to deselect COLUMNS and not rows!

Kind regards

Peter

Former Member
0 Kudos

Hi Peter,

If you are using table UI element, then first you have to get the column reference of the desired column

Once you get the reference you can use the method SET_COL_SELECTION_STATE of class CL_WD_TABLE_COLUMN.

Value '02' refers to not selected.

Check this method in this class.

Regards

Manas Dua

Former Member
0 Kudos

Hi Peter,

Try this code



  DATA lo_el_element TYPE REF TO if_wd_context_element.

* Make row selected
lo_el_element->set_selected( abap_true ).

* Make row De-selected
lo_el_element->clear_selection( ).

Hope you get the hint.

Regards

Nawal Kishor Mittal