04-08-2009 2:06 PM
Hi,
i am using a ALV with "data_changed" and "toolbar"(custom Function SAVE) event.
To handle the custom "SAVE" Function, i used the "user_command" event of ALV Grid, too.
event_handler class:
class lcl_eventhandler definition.
public section.
methods:
handle_user_command
for event user_command of cl_gui_alv_grid
importing
e_ucomm
sender,
handle_data_changed
for event data_changed of cl_gui_alv_grid
importing
er_data_changed,
handle_toolbar
for event toolbar of cl_gui_alv_grid
importing
e_object
e_interactive
sender.
registering:
create object g_verifier. "type ref to lcl_eventhandler
set handler g_verifier->handle_data_changed for go_grid.
set handler g_verifier->handle_user_command for go_grid.
After changing something in the ALV Grid and pushing the custom "SAVE" Function, the "data_changed" event get´s triggered first.
But i need to trigger the "user_command" event, first.
Any ideas to trigger the event´s in the correct order ?
Thx,
Gordon
04-09-2009 7:18 AM
I don't think this is possible, when somethinge gets changed in your "Model" always the data_changed and data_changed_finished methods/events come up, but why is this a problem for you?
And anyway you can raise your user_command manually...
Edited by: Mathias Maerker on Apr 9, 2009 8:21 AM
04-13-2009 8:33 AM
Hi,
Check the below standard program.
BCALV_GRID_05
Let me know in case of any other query.If you can provide me some more code of your program it will be helpful for me to resolve your issue easily.
Regards.
Punit
Edited by: Punit Singh on Apr 13, 2009 9:35 AM
04-13-2009 10:41 AM
Hi,
In case you want to handle the sequence in your own way, I will suggest you to create a custom event in your local class defintion and implement a method to handle this custom event.
When your event handlers for data_changed or user_command is executed, you can call the RAISE EVENT command to invoke your custom event and the corresponding event handler method can take care of the order etc..
Hope it helps.