Skip to Content
0
Former Member
Jan 09, 2008 at 07:26 AM

alv hotspot event

207 Views

Hi guys ,

I have created an ALV report using the CAll function " REUSE alv grid display "

I want the functionality that on double clicking the doc nr ( belnr of table bseg ) the doc should open .

I have found the folowing cod from sdn

FORM dis_data.

g_repid = sy-repid.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = g_repid

i_callback_user_command = 'USER_COMMAND'

i_grid_title = 'Interactive ALV'

it_fieldcat = fcat

it_events = eve

TABLES

t_outtab = itab

EXCEPTIONS

PROGRAM_ERROR = 1

OTHERS = 2

.

IF sy-subrc 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDFORM. "dis_data

FORM user_command USING u_com LIKE sy-ucomm sel_field TYPE slis_selfield.

CLEAR fcat1.

CASE u_com.

WHEN '&IC1'.

READ TABLE itab INDEX sel_field-tabindex.

IF sy-subrc = 0.

t_doc = itab-vbeln.

SET PARAMETER ID 'AUN' FIELD t_doc.

CALL TRANSACTION 'VA02' AND SKIP FIRST SCREEN.

ENDIF.

ENDCASE.

ENDFORM. "user_command

In the above code there is an event eve .. does someone kno what is this. also what is t_doc here .

Which parameter id should i set .

Thanks & Regards

Ashish