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

CLASS LCL_EVENT_HANDLER

Former Member
0 Likes
3,286

Hi,

I have just started to use object oriented and i have a lot of questions in my head. I am trying to do hotspot on alv list for now.I did it with gs_layout-keyhot = 'X' but i have no idea about how i can see information on another screen for each row when i click a row.I think i should use CLASS LCL_EVENT_HANDLER. The big thing is how i can do that.I will be pleased if you can help me about this.

Regards.

4 REPLIES 4
Read only

Former Member
0 Likes
1,730

Hi Masuke,

you can take a look to BCALV_* program (trx se38) there are a lot of exampla for implementing ALV with OO programming.

bye

enzo

Read only

MaryM
Participant
0 Likes
1,730

Hi,

1. Define your local class (LCL_EVENT_HANDLER.)

Definition:

public section.

methods:

hotspot_click for event hotspot_click

of cl_gui_alv_grid

importing e_row_id

e_column_id

es_row_no.

Implementation:

method hotspot_click.

perform event_hotspot_click using e_row_id

e_column_id.

endmethod. "hotspot_click

2. Mark in fieldcatalog:

ls_fcat-fieldname = 'YOUR_FILED'

ls_fcat-hotspot = 'X' ( or ls_fcat-style = cl_gui_alv_grid=>mc_style_hotspot. )

3. Event object and handler:

in pbo:

create object o_event. (define: type ref to lcl_event_handler)

set handler o_event->hotspot_click

for your_grid.

Regards,

MeryM

Read only

Former Member
0 Likes
1,730

Hi,

thank you for your help maryme i fixed the problem.I am trying to refresh my table after update on another screen now. But cant do that with selfield-refresh so i find refresh_table_display but it doesnt work.

Regards.

Read only

0 Likes
1,730

Hi,

refresh_table_display should work fine.

Just code::

- for the first time display

grid->set_table_for_first_display

- for next times (and after having modified the internal table you are displaying)

grid->refresh_table_display

Regards,

MaryM