‎2010 Feb 16 5:12 AM
Hi Everyone ,
How the edited cell of ALV will updated in database table using standard FM or any other technique.
I searched the forum but not got satisfactary ans. please help.
I am using OOALV.
Regrads,
Sandeep
‎2010 Feb 16 6:08 AM
Use the code like below.
MODULE user_command_0100 INPUT.
WHEN 'SAVE'.
REFRESH it_fin_old.
it_fin_old[] = it_final[].
CALL METHOD grid1->check_changed_data.
CLEAR : wa_final,wa_fin_old .
Use like above and compare the old int table and the changed one and update the table.The method check_changed_data will return you the changed data.
Regards,
Sai Prasad
‎2010 Feb 16 6:41 AM
Hi,
But how get the data in final table i.e it_final.
How to capture the edited data .
Regards,
Sandeep
‎2010 Feb 16 7:00 AM
If you are displaying it_final on to the ALV then after calling the method check_changed_data ,it_final will have the changed data.
Now you compare the it_final and it_final_old using READ statement by looping at it_final.
Regards,
Sai Prasad
‎2010 Feb 16 7:15 AM
Hi,.
what i want is the chaged data .
data which is edited that i want .
how the data is populated it into it_final.
Below FM(check_changed_data) tell that data is changed only.
i want which field changed and whats is the changed value.
CALL METHOD w_obj_alv_grid->check_changed_data
* IMPORTING
* e_valid =
* CHANGING
* c_refresh = 'X'.
Regards,
Sandeep
‎2010 Feb 16 7:49 AM
If you are using it_final to display on to ALV,then after the calling method check_changed_data your it_final will get refreshed
with the changed values. To find the changed values you may have to compare the the editable field values with old int table and it _final.
Regards,
Sai Prasad
‎2010 Feb 16 12:05 PM