Monday 4 May 2015

Steps to set color for List UIBB

Step 1

Add a additional field into the structure in get_defination with data element                             .             WDUI_TEXT_VIEW_DESIGN.

Example : you have 5 field in the list then add one more field with name 'DESIGN'.

Step 2 

Set field name for which you need to change the color.

Example: you have a field name 'FIELD_1' which you want to change the color, then use the below code.

  ls_field_def-name = 'FIELD_1'.
  ls_field_def-cell_design_ref = 'DESIGN'.
  APPEND ls_field_def TO CT_FIELD_DESCRIPTION.

Step 3

At run time update any value which is listed below in get_data method.

  00 emphasized
11 groupTitle
01 header1
02 header2
03 header3
04 header4
05 label
06 label_small
07 legend

Example : ct_data has below entries.
Field_1 Field_2 Field_3  Field_4 Field_5 Design 
Data Data Data Data Data 07
Data Data Data Data Data

update 07 for the first row and make  ct_data_changed = abap_true.


No comments:

Post a Comment