I hv never use hot spot to link as a call transaction can u give the link or code how to make hot spot on a particular fields i am working on a ALV report in that report in the belnr coloumn when user click on belnr i want to call FB03 transaction ref. to that belnr number and fisacl year.
try the following code, i used it with kunnr to call transaction with the selected kunnr on hotspot click.
WA_FCAT_HEADER-COL_POS = 2. WA_FCAT_HEADER-FIELDNAME = 'KUNNR'. WA_FCAT_HEADER-TABNAME = 'IT_POHEADER'. WA_FCAT_HEADER-COLTEXT = TEXT-008. APPEND WA_FCAT_HEADER TO IT_FCAT_HEADER. CLEAR WA_FCAT_HEADER. *---method implementation READ TABLE IT_POHEADER INDEX E_ROW_ID-INDEX INTO WA_POHEADER. IF WA_POHEADER-KUNNR IS NOT INITIAL. SET PARAMETER ID 'KUN' FIELD WA_POHEADER-KUNNR. CALL TRANSACTION 'XD03'. ENDIF.
hope it helps.
In the fieldcatalog you will have to write the hotspot as shown below,
wa_fieldcat-hotspot = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
i_callback_program = sy-repid
i_callback_user_command = 'USER_COMMAND'"----> this is important
i_callback_pf_status_set = 'PFSTATUS'
it_fieldcat = it_fieldcat
is_layout = it_layout
it_event_exit = it_eventexit
i_screen_start_column = 10
i_screen_start_line = 20
i_screen_end_column = 70
i_screen_end_line = 45
i_grid_title = 'Customer-Order Details'
t_outtab = it_data.
then you will have to catch the user command as follows,
FORM user_command USING r_ucomm TYPE sy-ucomm
rs_selfield TYPE slis_selfield.
DATA: alv_vbeln TYPE vbeln,
mess_text(30) TYPE c,
txt_vbeln(10) TYPE c.
*User clicks a Order No. in ALV it passed to the following transaction.
READ TABLE it_data INDEX rs_selfield-tabindex INTO wa_data.
alv_vbeln = wa_data-vbeln..
IF sy-subrc = 0.
CLEAR: mess_text, txt_vbeln.
WITH pr_vbeln = alv_vbeln AND RETURN.
put your call transaction logic here
Hope it helps you,
Abhijit G. Borkar
Hotspots are primarily used as follows: