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

Retrieve data from editable ALV without OO

Former Member
0 Likes
501

Hi. I am using REUSE_ALV_GRID_DISPLAY and setting the EDIT flag so that the user can change data in the ALV.

How can I get the users data out of the ALV without using OO?

I don't just need the changed data, I know you need OO for that, I want to get all the data in every field and row.

I thought the internal table I passed into the function module would be updated with the users data and I could get to it from user command but the data is the original data, not the edited data.

There must be a way, if there is not, why does the ALV have an edit flag? If you can not get the data out there is no point in making it editable.

Any help would be very much appreciated.

Regards,

Dave.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
464

Hi David,

In the call back user command write the following and it works for REUSE_ALV_GRID_DISPLAY

data : ref1 type ref to cl_gui_alv_grid.

call function 'GET_GLOBALS_FROM_SLVC_FULLSCR'

importing

e_grid = ref1.

call method ref1->check_changed_data.

eg:

case sy-ucomm.

When 'UPDATE'.

data : ref1 type ref to cl_gui_alv_grid.

call function 'GET_GLOBALS_FROM_SLVC_FULLSCR'

importing

e_grid = ref1.

call method ref1->check_changed_data.

*---> check the internal table here..it will have the changed data

Hope it helps

Regards

Byju

2 REPLIES 2
Read only

Former Member
0 Likes
465

Hi David,

In the call back user command write the following and it works for REUSE_ALV_GRID_DISPLAY

data : ref1 type ref to cl_gui_alv_grid.

call function 'GET_GLOBALS_FROM_SLVC_FULLSCR'

importing

e_grid = ref1.

call method ref1->check_changed_data.

eg:

case sy-ucomm.

When 'UPDATE'.

data : ref1 type ref to cl_gui_alv_grid.

call function 'GET_GLOBALS_FROM_SLVC_FULLSCR'

importing

e_grid = ref1.

call method ref1->check_changed_data.

*---> check the internal table here..it will have the changed data

Hope it helps

Regards

Byju

Read only

0 Likes
464

That worked great, thanks a lot.