‎2010 Sep 02 9:22 AM
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.
‎2010 Sep 02 9:28 AM
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
‎2010 Sep 02 12:39 PM
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
‎2010 Sep 03 1:19 PM
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.
‎2010 Sep 06 12:08 PM
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