on 05-29-2011 10:21 AM
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...
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tara,
Please check this...
also check ths..
Cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.