‎2010 Mar 12 12:01 PM
Hi,
I have a editable ALV and possibility to save changed rows (atleast one changed cell content). First save goes ok, but second fails in following code,
*... Read the original rowID from frontend table
read table mt_roid_front into ls_row_no
with key row_id = ls_good_cells-row_id.
if sy-subrc ne 0.
-> message x000(0k).
endif.
this in in method SAVE_DATA of class CL_GUI_ALV_GRID.
It seems that on second loop it cannot find the original rowid.
Regs,
Pekka
‎2010 Mar 12 10:55 PM
Do you change (or sort, or empty, etc.) the internal table or display structure by program between the 2 saves? If yes, it must be done in a special way, there is a kind of refresh method like refresh_table_display...
Moreover, have a look at Note 453255 - ALV-edit: Consulting note on the test process
Edited by: Sandra Rossi on Mar 12, 2010 11:56 PM
‎2010 Mar 12 10:55 PM
Do you change (or sort, or empty, etc.) the internal table or display structure by program between the 2 saves? If yes, it must be done in a special way, there is a kind of refresh method like refresh_table_display...
Moreover, have a look at Note 453255 - ALV-edit: Consulting note on the test process
Edited by: Sandra Rossi on Mar 12, 2010 11:56 PM
‎2010 Mar 17 11:12 AM
Hi,
I implemented event data_changed_finished, code below, and I got no dump anymore. Another problem is that I lost some lines from ALV, mainly non-edited. I have not done these class-event things that many, so can you please guide me what to do?
Regards,
Pekka
METHOD handle_data_changed_finished.
IF NOT obj_alvgrid IS INITIAL.
DATA: lwa_lvc_s_stbl TYPE lvc_s_stbl.
lwa_lvc_s_stbl-col = 'X'.
lwa_lvc_s_stbl-row = 'X'.
obj_alvgrid->refresh_table_display( is_stable = lwa_lvc_s_stbl ).
cl_gui_cfw=>flush( ).
ENDIF.
‎2010 Mar 17 12:12 PM
‎2010 Mar 17 12:15 PM
Sorry, missed that part in all this haste.
No, I do not sort or modify layout in any way, just modify data in single cells.
Regs,
Pekka
‎2010 Mar 17 12:51 PM
No, about the internal table. You must not change it, as the ALV doesn't duplicate it. If you lose lines, it means that you delete some lines.
Edited by: Sandra Rossi on Mar 17, 2010 1:52 PM
‎2010 Mar 17 2:34 PM
Hi,
Now, when I got the peacefull minute to set my undivided attention to this, I realized what you ment. Indeed I did modify the itab. I had a logick that I save only modified lines of alv and that messed up the itab.
Little correction and it works fine.
Thanks Sandra, points awarded.
Regs,
Pekka