Skip to Content
Jul 04, 2012 at 06:54 AM

Confirming warning message in ALV by pushing Enter


Hello Experts,

i have a Tab-Strip and inside of it a subscreen with an ALV.

The user marks one line of the ALV and than psuhes a function in the custom menu button.

The event USER_COMMAND is handled by an action handler, the action handler triggers PAI.


CASE e_ucomm.


CALL METHOD cl_gui_cfw=>set_new_ok_code( new_code = 'FUNCTION' ).



The user-command 'FUNCTION' is handled by the PAI of the dynpro.

FORM user_command

gv_okcode = ok_code.
CLEAR ok_code.

CASE gv_okcode.






Now a SAP-Function-Module is called which can trigger WARNING Messages and here lies the problem.

Usually warnings are comfirmed by pushing ENTER and that is not working.

I can hit enter as much as i want to, but the warning does not disappear and the Function Module does not continue.

If i push the green ENTER icon left of the command field it is working as it should.

If i click somewhere else on the Dynpro it is working too, but not while my cursor is somewhere inside the ALV.

Seems the ALV is not procesing the ENTER button.

So i tried the ALV method 'register_edit_event' with parameters mc_evt_enter and mc_evt_modified and set handlers for on_data_changed and

on_data_changed_finished. Result is that the WARNING disappears, but the Function Module does not continue. The handlers for data_changed are not event triggered. When i make one or more ALV fields editable the data_changed handler is triggered but it does only work if i hit ENTER twice.

And i can't allow the ALV to be editable, so that's no solution after all.

I tried 2 days already and dont know that to do anymore.

Thx for any help.