2008 May 14 4:30 PM
Hi All,
I have a weird problem with my ALV hotspots.
If a user clicks on matnr they get taken to MD04 which works fine, but the two purchasing hotspots work initially but remember the last click of the user
class lcl_event_receiver implementation.
method handle_hotspot_click.
read table part_data index e_row_id assigning <alv>.
if sy-subrc = 0.
case e_column_id.
when 'MATNR'.
set parameter: id 'MAT' field <alv>-matnr,
id 'WRK' field <alv>-werks.
call transaction c_md04 and skip first screen.
when 'ZSUPER'.
set parameter: id 'MAT' field <alv>-zsuper,
id 'WRK' field <alv>-werks.
call transaction c_md04 and skip first screen.
when 'EBELN'.
set parameter: id 'VRT' field <alv>-ebeln,
id 'WRK' field <alv>-werks,
id 'BERID' field <alv>-werks.
call transaction c_me32 and skip first screen.
when 'SUPER_EBELN'.
SET PARAMETER ID 'VRT' FIELD <alv>-super_ebeln.
CLEAR bdcdata.
bdcdata-program = 'SAPMM06E'.
bdcdata-dynpro = '0205'.
bdcdata-dynbegin = 'X'.
APPEND bdcdata to itab_bdc.
CLEAR bdcdata.
bdcdata-fnam = 'RM06E-EVRTN'.
bdcdata-fval = <alv>-super_ebeln.
APPEND bdcdata to itab_bdc.
CLEAR bdcdata.
bdcdata-fnam = 'BDC_OKCODE'.
bdcdata-fval = '/00'.
APPEND bdcdata to itab_bdc.
CALL TRANSACTION 'ME38' USING itab_bdc MODE 'E'.
endcase.
endif.
endmethod.
2008 May 14 4:33 PM