The MDG Framework Provides the fpm_list_uibb for having list values in MDG 6.1 Custom Objects. This document describes of how you can have different colours for every cell in the list.
Let us assume that we have a column column2 in which I will have some numeric values which will be the representation of the colours in column1. The MDG framework uses the standard feeder class cl_usmd_entity_value2_proxy. Open the method IF_FPM_GUIBB_LIST~GET_DEFINITION and place the cursor at the last line and create an enhancement point. Provide the following code over there.
*** check whether your desired UI config, Entity and Entity_cont is called
data: wa_field_description like line of et_field_description,
wa_dt_ffix like line of dt_ffix.
read table dt_ffix into wa_dt_ffix with key fieldname = ‘CONFIG_ID’.
if wa_dt_ffix–value = <your UI config>.
read table dt_ffix into wa_dt_ffix with key fieldname = ‘USMD_ENTITY’.
if wa_dt_ffix–value = <your entity>.
read table dt_ffix into wa_dt_ffix with key fieldname =‘USMD_ENTITY_CONT’.
if wa_dt_ffix–value = <your entity_cont>.
read table et_field_description into wa_field_description with key name = <field for which colour has to be filled>.
if sy–subrc eq 0.
wa_field_description–cell_design_ref = ‘<field in which the value of the colour is stored>’.
modify et_field_description from wa_field_description index sy–tabix.