cancel
Showing results for 
Search instead for 
Did you mean: 

table ui sort header

Former Member
0 Kudos

Hi All,

I have searched the forums and cant come up with a workable solution.

I have a WD table ui control. When sorted by a column the icon remains even after a subsequent event is fired. I thought there would be a clear sort method but to no avail and have tried below too.

lr_header = lr_payments_table->get_header( ).

lr_header->set_image_source('NULL').

Is it possible (in ABAP) to access the column header and default the sort icon back to "not sorted".

Thanks All

David

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I am not sure if i understand you correctly. If you need to make the sort icon to disappear then you have to set the sort state to none for that column.

See the code snippet here. Execute this code when you need to clear the sort column icon.

DATA:
    lo_table_method_hndl               TYPE REF TO if_wd_table_method_hndl,
    lt_column                          TYPE cl_wd_table_column=>tt_table_column,
    lo_column                          TYPE REF TO cl_wd_table_column.

  lo_table_method_hndl ?= io_table->_method_handler.
  lt_column = lo_table_method_hndl->get_all_columns( ).

  LOOP AT lt_column INTO lo_column.
    IF lo_column->get_sort_state( ) <> cl_wd_table_column=>e_sort_state-not_sortable.
      lo_column->set_sort_state( cl_wd_table_column=>e_sort_state-none ).
    ENDIF.
  ENDLOOP.

Former Member
0 Kudos

Hi Baskaran,

Thanks for the code, very interesting.

I don't want to hide the sort just "reset" it if this is possible.

Many Thanks, David

Former Member
0 Kudos

Issue Resolved.

Thanks Baskaran.

Former Member
0 Kudos

not equal sign was not visible in the code snippet using the code tag.

IF lo_column->get_sort_state( ) ne cl_wd_table_column=>e_sort_state-not_sortable.

Former Member
0 Kudos

hello, would you please show me how to fill a table header with data?

thank you

Answers (0)