Skip to Content
0
Former Member
Mar 10, 2008 at 10:48 AM

Color a specific row in ALV GRID display when user clicks on that row

36 Views

hi

i have the entire code ready of how to check the line selected by the user and also to color that line but after settings those parameters

for to refresh the GRID so that the row apppears coloured .plz reply soon.... points will be awarded.....

wat i have done is

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = i_repid

i_callback_user_command = 'USER_COMMAND'

is_layout = it_layout

it_fieldcat = int_fieldcat

TABLES

t_outtab = int

EXCEPTIONS

program_error = 1

OTHERS = 2.

to display the GRID then when user clicks on any row this module gets called

FORM user_command USING r_ucomm TYPE sy-ucomm

rs_selfield TYPE slis_selfield.

READ TABLE int INDEX rs_selfield-tabindex.

int-rowcolor = 'C410'.

MODIFY int INDEX rs_selfield-tabindex TRANSPORTING rowcolor.

it_layout-info_fieldname = 'ROWCOLOR'.

  • then again i call 'REUSE_ALV_GRID_DISPLAY'

to display the GRID with the user selected line colored . the problem with this is when u go back from this screen u go to the previously displayed grid ....... whihc i dont want .....

ENDFORM. "user_command