Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Editable ALV dumps when second save

pekka_pottonen
Participant
0 Likes
2,097

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

1 ACCEPTED SOLUTION
Read only

Sandra_Rossi
Active Contributor
0 Likes
1,915

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

6 REPLIES 6
Read only

Sandra_Rossi
Active Contributor
0 Likes
1,916

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

Read only

0 Likes
1,915

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.

Read only

0 Likes
1,915

Answer my questions first

Read only

0 Likes
1,915

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

Read only

0 Likes
1,915

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

Read only

0 Likes
1,915

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