Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Methods for adding DBL click event in ALV

Former Member
0 Likes
1,315

Methods for adding DBL click event in ALV

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,288

Hi

Use the Methods of class <b>cl_gui_alv_grid

SET_USER_COMMAND

SET_TOOLBAR_INTERACTIVE</b>

for the Interactive list of ALV.

Reward points if useful

Regards

Anji

Methods for adding DBL click event in ALV

10 REPLIES 10
Read only

Former Member
0 Likes
1,288

Hi ,

Check the class cl_gui_alv_grid.

Read only

0 Likes
1,288

how to add that event to the program

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
1,288

Hi

You can find the useful methods related to all events in ALV in class

<b>cl_gui_alv_grid</b>.

Have a look on that.

Regards,

Sreeram

Read only

Former Member
0 Likes
1,288

Try the below link

https://www.sdn.sap.com/irj/sdn/forums

2-3 Sample codes below

https://www.sdn.sap.com/irj/sdn/forums

Hope it helps

Regards

Tushar Mundlik

Read only

Former Member
0 Likes
1,288

Hi,

In the implementation for class cl_event_reciever

call method handle_double_click using the

parameters given in cl_gui_alv_grid.

Read only

Former Member
0 Likes
1,288

Hi Jagrut,

If you are using CL_GUI_ALV_GRID class to display ALV report and want to add

double clicking functionality to ALV need to handle event DOUBLE_CLICK

in your local class.

See the below code how you define it.


*===============================================================
****************************************************************
* LOCAL CLASSES: Definition
****************************************************************
*===============================================================

CLASS LCL_EVENT_RECEIVER DEFINITION.
  PUBLIC SECTION.
* § 2. Define a method for each print event you need.
    METHODS:
    TOP_OF_PAGE FOR EVENT TOP_OF_PAGE
                         OF CL_GUI_ALV_GRID
                         IMPORTING E_DYNDOC_ID,
    DOUBLE_CLICK FOR EVENT DOUBLE_CLICK
                         OF CL_GUI_ALV_GRID
                         importing E_ROW.


  PRIVATE SECTION.
ENDCLASS.                    "lcl_event_receiver DEFINITION
*===============================================================
****************************************************************
* LOCAL CLASSES: Implementation
****************************************************************
*===============================================================
* class c_event_receiver (Implementation)
CLASS LCL_EVENT_RECEIVER IMPLEMENTATION.
*-------------------------------------------
  METHOD TOP_OF_PAGE.
* Top-of-page event
    PERFORM EVENT_TOP_OF_PAGE USING G_DYNDOC_ID.
  ENDMETHOD.                            "top_of_page

  METHOD DOUBLE_CLICK.
* Top-of-page event
    PERFORM list using e_row.
  ENDMETHOD.                            "DOUBLE_CLICK

You also need to register the events.

And also check the program BCALV_GRID_VERIFY.

Hope this will help you.

Thanks&Regards,

Siri.

Read only

Former Member
0 Likes
1,289

Hi

Use the Methods of class <b>cl_gui_alv_grid

SET_USER_COMMAND

SET_TOOLBAR_INTERACTIVE</b>

for the Interactive list of ALV.

Reward points if useful

Regards

Anji

Read only

uwe_schieferstein
Active Contributor
0 Likes
1,288

Hello Jagrut

Have a look at my sample report

Regards

Uwe