Hi,
I have created a Editable alv grid .
My grid does not contain line selection cloumn so How can I get to know which row is to be changed.
I am using get_selected_rows method but not able to get which row is changed. please help on this.
Thanks in advance.
If you use class CL_GUI_ALV_GRID you can get information about the changed cells in the event "DATA_CHANGED".
Hi,
check this ..
it_ekko1[] = it_ekko[].
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_user_command = 'USER_COMMAND'
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
it_events = i_events
i_save = 'X'
tables
t_outtab = it_ekko
exceptions
program_error = 1
others = 2.
In user command you need to write logic to know which all records have changed.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN '&IC1'.
loop at it_ekko into wa_ekko.
read table it_ekko1 into wa_ekko1 index sy-tabix.
if wa_ekko <> wa_ekko1.
write your logic further
endif.
endloop.
endcase.
Regards,
Srini.
Add a comment