on 04-16-2008 2:20 PM
Hi all,
in my context ,i have a field like epi_type.i want to set entire row in red colour wherever epi_type = emergency.
How can i aceieve this?
Regards,
Ravi
I'm assuming that you are using this ALV for WD, else I don't think it is possible in 'normal' table view.
It seems not to be opening the thread I tried to provide when clicking so I will give the answer (copy from above mentioned thread):
U will be having one Node for that ALV Table Know.Add one Attribute for eg., CELL_DESIGN of type WDUI_TABLE_CELL_DESIGN.In the Properties of Table Column Properties there is one Field Called CellDesign.U Map the Attribute CELL_DESIGN for the Column which u want Color.If u want for a Row then map that attribute for each column.
U cant set ur own colors for the Cell.In the CellDesign Property u will be having a Dropdown in which a list of values will be present u can make use of that colors.
U can give the CellDesign Colors from the Documentation such as badvalue_dark,badvalue_light,etc.,
During the Runtime,based on the condition u can set the Values for that Attribute Using SET_ATTRIBUTE.
For Eg.,
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_table.
DATA ls_table TYPE wd_this->element_table.
lo_nd_table = wd_context->get_child_node( name = wd_this->wdctx_table ).
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-text = '1'.
lo_el_table->set_attribute(
name = `CELL_DESIGN`
value = 'negative' ).
elseif ls_table-text = '2'.
lo_el_table->set_attribute(
name = `CELL_DESIGN`
value = 'positive' ).
endif.
endloop.
Edited by: Micky Oestreich on Apr 16, 2008 10:56 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I think you have to download perticular themes i guess. Not sure boss.
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.