cancel
Showing results for 
Search instead for 
Did you mean: 

table column color issue

former_member206760
Active Contributor
0 Kudos

Hi,

I have bound a attribute COLOR ( type WDUI_TABLE_CELL_DESIGN ) to the cell design property of the table column ...and written the following code

lo_nd_flights = wd_context->get_child_node( name = wd_this->wdctx_flights ).

lo_nd_flights->get_static_attributes_table( IMPORTING table = lt_flights ).

LOOP AT lt_flights INTO ls_flights.

lv_ratio = 100 * ls_flights-seatsocc / ls_flights-seatsmax.

IF lv_ratio > 95.

ls_flights-color =

cl_wd_table_column=>e_cell_design-badvalue_medium.

ELSEIF lv_ratio > 50.

ls_flights-color =

cl_wd_table_column=>e_cell_design-criticalvalue_medium.

ELSE.

ls_flights-color =

cl_wd_table_column=>e_cell_design-goodvalue_medium.

ENDIF.

MODIFY lt_flights FROM ls_flights.

ENDLOOP.

lo_nd_flights->bind_table( lt_flights ).

in debugging the code is getting called and the new itab is getting bound also...but the column is not showing any colors...

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Your code seems to be okay. I normally use Field-Symbols so that in-memory data change can happen. I have not used modify.

Have you checked after the bind_table statement all the records have color attribute set according to the logic ?

You can also try SET_INITIAL_ELEMENTS to abap_false.

former_member206760
Active Contributor
0 Kudos

i checked the table lt_flights before and after the bind_table ..it is having the the column COLOR with the required value.

how do i set the SET_INITIAL_ELEMENTS and where

Former Member
0 Kudos

Hi Tara,

In bind_table method you can set this...

for ex :

lo_nd_flights->bind_table( new_items = lt_flights 
                                          SET_INITIAL_ELEMENTS = abap_false ). // you can set TRUE OR FALSE

Cheers,

Kris.

former_member206760
Active Contributor
0 Kudos

even if i select the color directly in the cell design paramter ( without binding the context node ) ...color does not appear...

i think there should be some other basic setting for color..

gill367
Active Contributor
0 Kudos

when you are changing it directly, is it now getting changed in designer also.

or only in browser it is not getting displayed with the changed color.

also have you applied any custom theme.

is you application running in the portal with some theme.

thanks

sarbjeet singh

former_member206760
Active Contributor
0 Kudos

hi,

color doesnot show up netiher in the layout nor in the browser....it is a simple applciation and not running on a portal

Answers (1)

Answers (1)

Former Member
0 Kudos
former_member206760
Active Contributor
0 Kudos

hi kisnass

If u see my code it is same as the doc you have specified but still i am facing the problem

What could be the issue