Hi All, 😊
I have a strange problem, which I hope to get som advice about.
Anyway I have created an ALV-report with hot-spot.
The hot-spot executes the line below and of course it "jumps" to VA03.
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
The strange thing happens when I press 'F3' and returns to the ALV.
The first time I do this, - it works fine, but when I 're-click' on the hot-spot Im again directed to transaction VA03.
Now have to press 'F3' twice to get back to the ALV.
Same thing happens when I 're-re-click' the hot-spot. But now I have to press 'F3' three times.
Does anyone have an Idea how to solve this?
I use the event to handle the hot-spot and I have attached the PBO snippet below to ease your understanding of my program.
Please feel free to ask for more information
Thanks in advance
Lars Bernstorff Hansen
**********************************
CLASS cl_event_receiver DEFINITION.
PUBLIC SECTION.
DATA: t_utab_unsend TYPE zsd_tt_utab_unsend_mail
, t_utab_send TYPE zsd_tt_utab_send_mail.
METHODS: handle_hotspot_click
FOR EVENT hotspot_click OF cl_gui_alv_grid
IMPORTING
e_row_id
e_column_id.
*************************************
MODULE status_0100 OUTPUT.
DATA: et_index_columns TYPE lvc_t_col
, i_structure_name TYPE dd02l-tabname
, is_layout TYPE lvc_s_layo
, it_fieldcatalog TYPE lvc_t_fcat
, i_gridtitle TYPE lvc_title
, linetype TYPE string
, itabref TYPE REF TO data
, ls_fcat TYPE lvc_s_fcat.
FIELD-SYMBOLS: <psaareatab> TYPE STANDARD TABLE
, <psaareatab2> TYPE STANDARD TABLE.
IF p_r1 = lcl_initialization=>c_x.
linetype = 'ZSD_UTAB_UNSEND_MAIL'.
i_gridtitle = 'Ukomplette ordrer - ej sendte'(200).
i_structure_name = 'ZSD_UTAB_UNSEND_MAIL'.
ELSE.
linetype = 'ZSD_UTAB_SEND_MAIL'.
i_structure_name = 'ZSD_UTAB_SEND_MAIL'.
i_gridtitle = 'Komplette ordrer - sendte'(201).
ENDIF.
CREATE DATA itabref TYPE STANDARD TABLE OF (linetype).
ASSIGN itabref->* TO <psaareatab>.
IF p_r1 = gc_x.
ASSIGN gt_utab_unsend TO <psaareatab>.
ELSE.
ASSIGN gt_utab_send TO <psaareatab>.
ENDIF.
SET TITLEBAR 'MAIN100'.
SET PF-STATUS 'MAIN100'.
IF go_custom_container IS INITIAL.
CREATE OBJECT go_custom_container
EXPORTING
container_name = go_container.
CREATE OBJECT go_grid
EXPORTING
i_appl_events = lcl_initialization=>c_x
i_parent = go_custom_container.
ENDIF.
lcl_initialization=>gxt_utab_unsend[] = gt_utab_unsend[].
lcl_initialization=>gxt_utab_send[] = gt_utab_send[].
lcl_initialization=>bukrs = p_bukrs.
lcl_initialization=>r1 = p_r1.
" Create handler.
CREATE OBJECT event_receiver.
" Register handler for events.
SET HANDLER event_receiver->handle_hotspot_click FOR go_grid.
CALL METHOD r_present_result->set_layout( CHANGING is_layout = is_layout ).
" Create field catalog.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = i_structure_name
CHANGING
ct_fieldcat = it_fieldcatalog.
" Hotspot fields.
CALL METHOD r_present_result->set_fieldcatalog
EXPORTING
i_r1 = p_r1
CHANGING
it_fieldcatalog = it_fieldcatalog.
lcl_initialization=>it_fieldcatalog[] = it_fieldcatalog[].
CALL METHOD go_grid->set_table_for_first_display
EXPORTING
i_structure_name = i_structure_name
is_layout = is_layout
CHANGING
it_fieldcatalog = it_fieldcatalog
it_outtab = <psaareatab>.
CALL METHOD go_grid->set_gridtitle
EXPORTING
i_gridtitle = i_gridtitle.
ENDMODULE. " STATUS_0100 OUTPUT