Application Development 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: 

ALV Catch Event's

Former Member
0 Kudos

Hi,

l am using 'REUSE_ALV_GRID_DISPLAY'.

I am able to catch event, from ALV list, example DBLCLICK.

I would like to catch command from key pad also, example ENTER.

How can l do?

5 REPLIES 5

Former Member
0 Kudos

you must have a subrutine USER_COMMAND and in you function in the parameter i_callback_user_command = 'USER_COMMAND'.

Then in the subrutine USER_COMMAND out this code...

form user_command using r_ucomm like sy-ucomm

rs_selfield type slis_selfield.

data wa_alv like ztab.

case r_ucomm.

when '&IC1'.

check not rs_selfield-value is initial.

endcase.

The '&IC1' is DCLICK... in this case replace for your sy-ucomm.

0 Kudos

Hi Andrea,

That is exactly what l do see my code:

FORM l01_user_command USING i_ucomm LIKE sy-ucomm

io_selfield TYPE slis_selfield.

*When

CASE i_ucomm.

WHEN '&IC1'.

io_selfield-refresh = 'X'.

....

But canot catch the ENTER from key pad!

0 Kudos

ENTER on you key pad and Doubleclick have different fcodes.

Check what is the value of i_ucomm when you say ENTER on your key board in debug mode.

Regards,

Ravi

Former Member
0 Kudos

You need see in your status gui the correct fcode.

former_member188685
Active Contributor
0 Kudos

Hi,

you need to SET The pf status using the PFstatus option,

here you have to set the OKCODE for the Green tick button

that is related to enter.

say ENTR for the Green Tick button and catch it in User Command form.

you need to have two forms

one for pf status, one for user_command.

Regards

vijay