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 OOALV database update

Former Member
0 Likes
701

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

6 REPLIES 6
Read only

Former Member
0 Likes
663

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

Read only

0 Likes
663

Hi,

But how get the data in final table i.e it_final.

How to capture the edited data .

Regards,

Sandeep

Read only

0 Likes
663

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

Read only

0 Likes
663

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

Read only

0 Likes
663

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

Read only

Former Member
0 Likes
663

thanks for help