2006 Feb 22 2:19 PM
Hello,
I got a dynpro with 3 ALV grids. I edit a value of grid 3, then I execute a pushbutton of grid 1. The value of grid 3 is resetted then.
What should I do to keep the value?
Reward points guaranteed.
Regards
René
2006 Feb 22 2:23 PM
Sounds like the event handler method for event data_changed is not being fired. In one of my programs, I am registering the "ENTER" key, the user must hit enter after editing the field to fire the data_changed event.
* Set for first display
call method alv_grid->set_table_for_first_display
exporting
is_layout = lt_layout
it_toolbar_excluding = lt_exclude
changing
it_outtab = ialv[]
it_fieldcatalog = fieldcat[].
* If cancelling points, register "ENTER" as event
* and create the event receiver
<b> call method alv_grid->register_edit_event
exporting
i_event_id = cl_gui_alv_grid=>mc_evt_enter.</b>
* create Event Receiver
create object event_receiver.
* handler for ALV grid
set handler event_receiver->handle_data_changed for alv_grid.
Do this records the changes that the user has made. I believe that this must be done before you start the processing of the button on Grid1.
Regards,
Rich Heilman
2006 Feb 22 2:47 PM
I got 3 different handlers.
I solved it now by calling the method CHECK_CHANGED_DATA for all grids.
Thanks for your help.
Message was edited by: René Günther
2006 Feb 22 2:36 PM
Hi Rene,
are you handling the data_changed event for each grid separately. and what about user_command event is it same for all the grid. i hope you are having 3 handlers for 3 grids. can you confirm it once.
regards
vijay
Regards
Vijay
2006 Feb 22 2:56 PM
Hi Rene,
In field_cat for alv grid3 set edit mode , when you enter the new value if it is "Date " field then declare size as 10 type c .
if it if Quanity field then Take ALV_List dont go for grid .
You want to change in Grid only then after changing the value then when you select the Usercommand then Move selfield_value to some other internal table then call function module again.
thanks & regards,
Ranadheer.