cancel
Showing results for 
Search instead for 
Did you mean: 

TABLE WEB DYNPRO

Former Member
0 Kudos

Dear all,

I put a table in a webdynpro, is it possible to set some cell on specific line with a color or highlighted....

Or only the column can be highligthed

thanks in advance!

Stephan

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

hi,

Cell coloring of Particular cell is possible. Follow these steps :

1. There is Cell Design Property of a Table Column. Bind this property with a context Attribute of type wdui_table_cell_design.

2. Now according to the value you want. Read the context attribute value of the particular column and if you condition satisfies,

change color of Cell design attribute. different colors are present - badvalue_light,goodvalue_light, negative etc. Just check the cell design property, you will get different names of color.

3. Set the color whichever you want and Set the attribute using Code wizard.

Thanx.

Saurav

Former Member
0 Kudos

Hi,

check THIS LINK.

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0625002-596c-2b10-46af-91cb31b7...

it might help you.

and also check a standard component WDR_TEST_UI_ELEMENTS .

Regards,

anand

Former Member
0 Kudos

hi

it is possible

refer to this link

ABAP Web Dynpro ALV - Change Cell Colour based on Content

https://www.sdn.sap.com/irj/scn/wiki?path=/display/wdabap/referencesandLinks

check out the below code change cell color based on content in the cell

DATA itab_node TYPE wd_this->elements_cn_node.

DATA wa_itab_node TYPE wd_this->element_cn_node.

DATA itab TYPE STANDARD TABLE OF sflight.

DATA wa_itab TYPE sflight.

SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE itab.

LOOP AT itab INTO wa_itab.

MOVE-CORRESPONDING wa_itab TO wa_itab_node.

IF wa_itab_node-connid > '454'.

DATA lo_el_context TYPE REF TO if_wd_context_element.

  • get element via lead selection

  • lo_el_context = wd_context->get_element( ).

  • set single attribute

lo_el_context->set_attribute(

name = `CA_COLOUR`

value = cl_wd_table_column=>e_cell_design-goodvalue_light ).

  • wa_itab_node-ca_colour = cl_wd_table_column=>e_cell_design-goodvalue_light.

  • ELSE.

  • wa_itab_node-ca_colour = cl_wd_table_column=>e_cell_design-badvalue_light.

ENDIF.

APPEND wa_itab_node TO itab_node.

ENDLOOP.

DATA lo_nd_cn_node TYPE REF TO if_wd_context_node.

  • navigate from <CONTEXT> to <CN_NODE> via lead selection

lo_nd_cn_node = wd_context->get_child_node( name = wd_this->wdctx_cn_node ).

lo_nd_cn_node->bind_table( itab_node ).