2009 Mar 04 5:58 AM
Hi,
my requirement is i have displayed a fieldcat in change mode and when i change the data and click on save it has to be updated the database table..
this has to be done using alv oops...
2009 Mar 04 6:00 AM
Hi,
This code will reflect all the changes into the internal table that is being displayed.
* to reflect the data changed into internal table
DATA : ref_grid TYPE REF TO cl_gui_alv_grid. "new
IF ref_grid IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ref_grid.
ENDIF.
IF NOT ref_grid IS INITIAL.
CALL METHOD ref_grid->check_changed_data.
ENDIF.
Now after this code is executed the internal table is modified as per the changes done in alv output.
Now you can use this internal table to update the database table.
Hope this helps you.
Regards,
Tarun
2009 Mar 04 6:00 AM
Hi,
This code will reflect all the changes into the internal table that is being displayed.
* to reflect the data changed into internal table
DATA : ref_grid TYPE REF TO cl_gui_alv_grid. "new
IF ref_grid IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ref_grid.
ENDIF.
IF NOT ref_grid IS INITIAL.
CALL METHOD ref_grid->check_changed_data.
ENDIF.
Now after this code is executed the internal table is modified as per the changes done in alv output.
Now you can use this internal table to update the database table.
Hope this helps you.
Regards,
Tarun
2009 Mar 04 6:22 AM