06-04-2011 11:59 AM
Hi.,
I created an Editable ALV using set_table_for_first_display method. I have a button SAVE., When I change the contents in ALV and press SAVE, I want to display the changed contents.
But When I change the contents in ALV & click the SAVE button, my internal table has the old contens.!! Plese help me how to get the modified contents.
Thanks,
Regards,
Ram
06-04-2011 12:11 PM
Hi.,
take one more internal table itab_old ., before calling set_table_for_first_display method ,
itab_old[] = itab[].
now when you press save button,
In PAI.,
when 'SAVE'
CALL METHOD o_grid->check_changed_data. " here o_grid is reference to cl_gui_alv_grid
" after this method then internal contains the modified values
IF itab[] NE itab_old[].
* do your processing here.,
endif.
hope this helps u.,
Thanks & Regards,
Kiran
06-04-2011 12:11 PM
Hi.,
take one more internal table itab_old ., before calling set_table_for_first_display method ,
itab_old[] = itab[].
now when you press save button,
In PAI.,
when 'SAVE'
CALL METHOD o_grid->check_changed_data. " here o_grid is reference to cl_gui_alv_grid
" after this method then internal contains the modified values
IF itab[] NE itab_old[].
* do your processing here.,
endif.
hope this helps u.,
Thanks & Regards,
Kiran
06-04-2011 12:29 PM
Hi.,
Thanks. This solved my issue.. Thanks for your quick response.,
Thanks,
Regards,
Ram