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: 

ALV sort refresh

Former Member
0 Kudos

Hi folks,

I'm just about to give up...

I have a OO-base ALV. I'm using the ALV sort ability for an editable collum. I need to refresh/sort the ALV right after the user has changed a value in that collum by pressing ENTER. As is the ALV will not be sorted unless I press the refresh button. That's exactly what I want to happen when the value is changed by pressing ENTER.

ANY suggestions???

Chears,

Robert

1 ACCEPTED SOLUTION

ricky_shaw
Contributor
0 Kudos

Hi Robert,

I had encountered this earlier i.e we cannot use grouping/ sort a field if any cell in the grid is editable and not sure we have a solution for this.

You need to manually sort the internal table(sort itab1 by fld1 ) before the final display in alv grid using set_table_for_first_display.

Thanks

4 REPLIES 4

ricky_shaw
Contributor
0 Kudos

Hi Robert,

I had encountered this earlier i.e we cannot use grouping/ sort a field if any cell in the grid is editable and not sure we have a solution for this.

You need to manually sort the internal table(sort itab1 by fld1 ) before the final display in alv grid using set_table_for_first_display.

Thanks

Former Member
0 Kudos

Hi,

Try to use the event DATA_CHANGED through a local event handler method.

In that, modify the internal table and sort.

Regards,

Rajesh

Kiran_Valluru
Active Contributor
0 Kudos

Hi,

in PAI,

if sy-ucomm = space. " For Enter Key.

o_grid->check_changed_data( ). " To captured modified values

now refresh the ALV table.

Check BCALV_EDIT_04 Standard Program.

hope this helps u.,

Thanks & Regards,

Kiran

Former Member
0 Kudos

While sorting the table in method handle_data_changed might be a solution I finally found out that the table (including all filters and sortcriteria) will be sorted after input when the method flush is called within method handle_data_changed_finished.