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: 

Updating editbale ALV grid

Former Member
0 Kudos

I have a requirement that when a user changes a value in a column of the ALV that I then lookup a table to find a value that can be populated in another column in in my alv. So for example if the user choose a material I need to default the price in. But in the handle_data_change method I don't actually have visibility of my internal table. What i have is an empty table, I enter the material number but it is not recognised as a value in my internal table, so I can tehn add the price to the table. Any ideas?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

With in HANDLE_DATA_CHANGED event, your internal table will be visible and can be accessed. I have done a similar requirement.

In the Class definition, the event is as follows:

HANDLE_DATA_CHANGED FOR EVENT DATA_CHANGED

OF CL_GUI_ALV_GRID

IMPORTING ER_DATA_CHANGED.

In the Class Implementation, write a subroutine to handle your code.

Within your subroutine, you can use this ER_DATA_CHANGED. This actually refers to your alv.

Hope this helps.

Regards,

Sindhu.

3 REPLIES 3

kesavadas_thekkillath
Active Contributor
0 Kudos

But in the handle_data_change method I don't actually have visibility of my internal table. What i have is an empty table,

How have you designed you class ? Please paste the definition or the code what you have done.

Kesav

Former Member
0 Kudos

Hi,

With in HANDLE_DATA_CHANGED event, your internal table will be visible and can be accessed. I have done a similar requirement.

In the Class definition, the event is as follows:

HANDLE_DATA_CHANGED FOR EVENT DATA_CHANGED

OF CL_GUI_ALV_GRID

IMPORTING ER_DATA_CHANGED.

In the Class Implementation, write a subroutine to handle your code.

Within your subroutine, you can use this ER_DATA_CHANGED. This actually refers to your alv.

Hope this helps.

Regards,

Sindhu.

Former Member
0 Kudos

I found a good example in BCALV_EDIT_03