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: 

Hotspot Click in OOPS

former_member184551
Contributor
0 Kudos

Hi Guys

Could u please provide me a working example of hotspot click using OOPS.

I have defined it this way but its not working,

**PBO

CREATE OBJECT g_event_alv.

SET HANDLER event_alv=>handle_hotspot_click FOR g_grid.

**PBO

and then have defined and implemented the class in the following way

CLASS lcl_eventhandler DEFINITION.

PUBLIC SECTION.

METHODS: handle_hotspot_click

FOR EVENT hotspot_click OF cl_gui_alv_grid

IMPORTING e_row_id.

ENDCLASS. "lcl_eventhandler DEFINITION

----


  • CLASS lcl_eventhandler IMPLEMENTATION

----


*

----


CLASS lcl_eventhandler IMPLEMENTATION.

METHOD: handle_hotspot_click.

READ TABLE gt_outtab INTO wa_outtab INDEX e_row_id-index.

SET PARAMETER ID 'MAT' FIELD wa_outtab-matnr.

SET PARAMETER ID 'WRK' FIELD wa_outtab-werks.

CALL TRANSACTION 'MMBE' AND SKIP FIRST SCREEN.

ENDMETHOD. "handle_hotspot_click

ENDCLASS. "lcl_eventhandler IMPLEMENTATION

PS I am new to OOPS, a working example will really help

Kind Regards

Sameer

2 REPLIES 2

mnicolai_77
Active Participant
0 Kudos

hi,

try to change your PBO from

>**PBO

>CREATE OBJECT g_event_alv.

>SET HANDLER event_alv=>handle_hotspot_click FOR g_grid.

>**PBO

to

>**PBO

>CREATE OBJECT g_event_alv.

>SET HANDLER g_event_alv->handle_hotspot_click FOR g_grid.

>**PBO

where g_event_alv is

>data: g_event_alv type ref to lcl_eventhandler.

hope that is usefull.

regards

Marco

0 Kudos

Thanks Marco