cancel
Showing results for 
Search instead for 
Did you mean: 

how to create colored rows in an avl table?

Former Member
0 Kudos

I am looking for a possibility, how to color a row if the attribute "KEY" of my context has the value 'GOAL'.

I did following:

1. creating a attribute CELL_DESIGN type WDUI_TABLE_CELL_DESING in my context.

then i wrote following coding:

DATA lo_nd_table TYPE REF TO if_wd_context_node.

DATA lo_el_table TYPE REF TO if_wd_context_element.

DATA lt_table TYPE wd_this->elements_search_data.

DATA ls_table TYPE wd_this->element_search_data.

lo_nd_table = wd_context->get_child_node( name = wd_this->wdctx_search_data ).

*get element via lead selection

lo_el_table = lo_nd_table->get_element( ).

lo_nd_table->get_static_attributes_table(

IMPORTING

table = lt_table ).

loop at lt_table into ls_table.

if ls_table-NAME1 = 'GOAL2'.

lo_el_table->set_attribute(

name = `CELL_DESIGN`

value = 'negative' ).

elseif ls_table-name1 = 'GOAL'.

lo_el_table->set_attribute(

name = `CELL_DESIGN`

value = 'positive' ).

endif.

endloop.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

See this:

Regards.