11-27-2009 12:25 PM
hi all,
i have a problem that will have an editable alv, the requirement is that after editing the user can put a new value, and has to save that value in internal table , how to achive this save functionality in editable alv .
Thnx in advance
11-27-2009 12:44 PM
<copy&paste_removed_by_moderator>
Edited by: Julius Bussche on Nov 27, 2009 2:06 PM
11-27-2009 12:53 PM
another copy/paste job, this time from http://www.sapalv.net/2009/08/sap-alv-tutorial-8-handling-data-change/
11-27-2009 7:45 PM
11-27-2009 9:39 PM
YOU CAN USE
IF SY-CUCOMM EQ 'SAVE'.
CALL METHOD G_GRID->CHECK_CHANGED_DATA
IMPORTING
E_VALID = L_VALID.
IF L_VALID EQ 'X'.
LOOP AT PT_OUTTAB INTO ET_TABLASALIDA.
UPDATE TABEL FROM ET_TABLASALIDA.
ENDLOOP.
ENDIF.
ENDIF.
Edited by: gib8107 on Nov 27, 2009 2:39 PM
11-28-2009 4:58 AM
11-28-2009 5:20 PM
Hi rajdeep,
For reflecting changes from alv to internal table...
just register edit event for your alv object as follows:
Obj->register_edit_event
and pass parameter
event_id = cl_gui_alv_grid=>mc_evt_enter.
So as soon you make changes in the the editable fields of alv and press enter,
the values are updated back to the internal table.
Regards,
Abhishak