12-01-2011 9:20 AM
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?
12-01-2011 9:35 AM
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.
12-01-2011 9:31 AM
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
12-01-2011 9:35 AM
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.
12-01-2011 1:11 PM