Application Development and Automation 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: 
Read only

ALV Grid editable fields

Former Member
0 Likes
750

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é

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
516

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

Read only

0 Likes
516

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

Read only

Former Member
0 Likes
516

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

Read only

0 Likes
516

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.