Application Development 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: 

BCALV when is the table updated?

Former Member
0 Kudos

Hi All,

I'm writing an ALV report to do table maintenance of a Z table.

I've used bits of BCALV03 & 04. I can add new lines & remove new lines and I can edit fields in the report screen but cannot saved the edited data.

I'm using

handle_data_changed

for event data_changed of cl_gui_alv_grid

importing er_data_changed.

I've tried all sorts of things including capturing the changed fields

call method pr_data_changed->get_cell_value

EXPORTING

i_row_id = ls_good-row_id

i_fieldname = ls_good-fieldname

IMPORTING

e_value = l_lotnum.

and writing them directly to the Z table but they still do not appear in the table when the program is exited & restarted.

So, can I call something specifically to save the data from LVC_S_MODI into my Z table or am I missing something that should already be handling this for me?

BTW is there a way to look at LVC_S_DATA?

Thanks,

Wilson Logan.

1 REPLY 1

naimesh_patel
Active Contributor
0 Kudos

Hello,

In this method you will have a changed data in the table er_data_changed->mt_good_cells with index, fields and values.

method handle_data_changed.

data: ls_good type lvc_s_modi.

loop at er_data_changed->mt_good_cells into ls_good.

endloop.

endmethod. "handle_data_changed

Fill you internal table accordingly based on the index (data exists already or not) and update your ztable.

Regards

Naimesh