i have writen the following code to register the edit event before calling the method
set_table_for_first_display
register_edit_event( EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_modified ).
in the output screen we have two fields let us say field1 and field2 (which is editable)
when user enter the text in field2 and select the line without hitting enter it is deselects itself