Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

OO ALV - How to highlight cell after value change

Hi All,

I have an OO ALV with an input enable column and would like to highlight a cell in a different color when the user changes it's value.

I am using pr_data_changed->get_cell_value to check the cells value has changed and pr_data_changed->modify_cell to update the cell with the new value.

The output table has a field called CELLCOLOR of type LVC_T_SCOL which I am using to highlight the cell in red:

lw_cellcolor-fname = 'THISFIELD' .

lw_cellcolor-color-col = '7'.

The ALV layout is also correclty set using: layout-ctab_fname = 'CELLCOLOR'

All the above is working fine and the changed cell is highlighted HOWEVER it only works if I call METHOD g_grid->refresh_table_display

Is there anyway to highlight the cell without calling method refresh_table_display??????

I do not like to call method refresh_table_display in an ALV event. The main reason is if a user changes a cells value and at the same time selects the row for update then the method refresh_table_display wipes out the row selection marker.

So Is there anyway to highlight the cell without calling method refresh_table_display??????

All your help appreciated

Che

Not what you were looking for? View more on this topic or Ask a question