Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

CL_SALV_TABLE - how to trigger Double_Click question

I am trying to find how to trigger an event on double click similar to using Event Double_Click in Class CL_GUI_ALV_GRID I am fresh out of the ABAP OO class and everything is a blur. This is what I did. I created a program that with

Data: r_grid TYPE REF TO cl_salv_table.

CALL METHOD CL_SALV_TABLE=>FACTORY

Importing R_SALV_TABLE = r_grid

Changing ITAB.

I then tried to create an Include program to define a Local Class

&----


*& Include ZSD_DISPLAY_CUSTOMER

&----


class lcl_event_handler definition.

PUBLIC SECTION.

METHODS: on_double_click for event double_click of cl_gui_alv_grid

    • METHODS: on_double_click for event double_click of cl_salv_table

IMPORTING es_row_no e_column.

ENDCLASS.

class lcl_event_handler IMPLEMENTATION.

METHOD on_double_click.

Data: IT_CUSTHIER type ZSD11_CUST_HIER_TABLE_TYPE.

Data: WK_CUSTHIER LIKE LINE OF IT_CUSTHIER.

types: BEGIN OF custhier_x,

custhier like WK_CUSTHIER,

number TYPE int4,

quantity type MENGE_D,

dollars_n_cents type DMBTR,

END OF custhier_x.

data: it_custhier_x type STANDARD TABLE OF custhier_x.

data: wk_custhier_x like LINE OF it_custhier_x.

read table it_custhier_x into wk_custhier_x

index es_row_no-row_id.

data: wk_vkorg type vkorg.

data: wk_vtweg type vtweg.

data: wk_spart type spart.

wk_vkorg = '3290'.

wk_vtweg = '00'.

wk_spart = '00'.

SET PARAMETER ID: 'KUN' field wk_custhier_x-custhier-kunnr.

SET PARAMETER ID: 'VKO' field wk_vkorg.

SET PARAMETER ID: 'VTW' field wk_vtweg.

SET PARAMETER ID: 'SPA' field wk_spart.

call TRANSACTION 'VD03' AND SKIP FIRST SCREEN.

ENDMETHOD.

ENDCLASS.

When I try to do a syntax check I get this error

The Handler Method ON_DOUBLE_CLICK is only defined for trigger objects of CL_GUI_ALV_GRID, but the system tried to register a trigger object of CL_SALV_TABLE

Any suggestions on what I need to do in order to trigger a event for double click ?

Thanks

Edited by: Bob Ackerman on Sep 22, 2010 11:25 AM

Former Member
Not what you were looking for? View more on this topic or Ask a question