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

Enter command problem in editable oo alv

eren_sert_sap
Explorer
0 Likes
1,066

Hello everyone,

I am using oo alv and have editable fields in grid. When I change data then click green tick button my sy-ucomm = 'enter' is working fine and makes the change. But when I press enter on the keyboard, nothing happens because cursor remains in grid. So enter only works when cursor isn't in the grid. What should I do to pressing enter works after changing data?

4 REPLIES 4
Read only

FredericGirod
Active Contributor
0 Likes
954

it depends a lot of your code ...

Read only

RaymondGiuseppi
Active Contributor
0 Likes
954

Did you already register the ENTER event?

    CALL METHOD go_diag_overview->register_edit_event
      EXPORTING
        i_event_id = cl_gui_alv_grid=>mc_evt_enter.
Read only

0 Likes
954

I am using a template so some event were already registered.

     CALL METHOD co_grid->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_modified.
 CALL METHOD co_grid->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_enter.

But it didn't change the problem despite I added 'ENTER' and perform in handle_user_command.

Read only

Sandra_Rossi
Active Contributor
0 Likes
954

I guess you are talking about CL_GUI_ALV_GRID. You have to define a handler for event via method REGISTER_EDIT_EVENT with parameter mc_evt_enter, and create a handler for event DATA_CHANGED_FINISHED.