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: 

System events on Hotspot Click of ALV Grid

0 Kudos

Hi,

I've got a question on behalf of the event handling of an ALV hotspot. It works perfectly. My problem is that I would like to perform an PBO (to change a pf status accordingly to the content of the selected cell) after an hotspot click. I tried to register the handler method as a system event but it didn't work. Has anyone got an idea?

my coding:

SET HANDLER handle_left_click FOR o_alv.

lw_evnt-eventid = '2'.

lw_evnt-appl_event = c_on.

APPEND lw_evnt TO lt_evnt.

CALL METHOD o_alv->set_registered_events

EXPORTING

events = lt_evnt

EXCEPTIONS

cntl_error = 1

cntl_system_error = 2

illegal_event_combination = 3

OTHERS = 4.

regards Johannes

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Uter,

Go through class CL_GUI_ALV_GRID.

Create a local class refer to cl_gui_alv_grid class. declare a method to handle hotspot event. Implement the method.

Register this event as SET HANDLER HOTSPOT_CLICK for cl_gui_alv_grid-reference.

Once you done this. IN fieldcatalog mention hotspot = 'X'.

In the above hotspot method store the contect of the selected cell in a global variable.

In PBO before set pf-status check the field content and change the pf-status.

Reward points.

Thanks and Regards,

Sampath.

2 REPLIES 2

Former Member
0 Kudos

Hi Uter,

Go through class CL_GUI_ALV_GRID.

Create a local class refer to cl_gui_alv_grid class. declare a method to handle hotspot event. Implement the method.

Register this event as SET HANDLER HOTSPOT_CLICK for cl_gui_alv_grid-reference.

Once you done this. IN fieldcatalog mention hotspot = 'X'.

In the above hotspot method store the contect of the selected cell in a global variable.

In PBO before set pf-status check the field content and change the pf-status.

Reward points.

Thanks and Regards,

Sampath.

0 Kudos

Hi Sampath,

Thanks for your answer. I had done exactly what you suggested before I sent this question. The hotspot click works perfectly but it doesn't send a system event.

I want to run a PBO module of the standard Dynpro after the hotspot click. This only happens if I can register the hotspot event as a system event but this doesn't work.

Has anyone got an idea?

regards Johannes