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

a question in a Dynpro

Former Member
0 Likes
572

hi,

i have a question about dynpro program. I use a Grid Control and Customer Control to create a table in a dynpro. Now i want to get the data from a row in the table with double click. How to achieve it?

Thanks for your suggestion.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
546

Hi,

You will have to handle the event double_click on the Grid. Check for examples in SLIS package.

regards,

Advait

hi,

i have a question about dynpro program. I use a Grid Control and Customer Control to create a table in a dynpro. Now i want to get the data from a row in the table with double click. How to achieve it?

Thanks for your suggestion.

3 REPLIES 3
Read only

Former Member
0 Likes
547

Hi,

You will have to handle the event double_click on the Grid. Check for examples in SLIS package.

regards,

Advait

Read only

0 Likes
546

Hi,

thank you for your reply. Could you give me the details e.g. example codes?

Read only

0 Likes
546

Class definition:

* Class Event Handler Definition for screen 0002
CLASS lcl_event_handler DEFINITION.
PUBLIC SECTION.
       METHODS: handle_double_click
                     FOR EVENT double_click OF cl_gui_alv_grid
                         IMPORTING e_row e_column.
ENDCLASS. " CLASS LCL_EVENT_HANDLER DEF..

Create Type ref:


data: gv_event_handler  TYPE REF TO lcl_event_handler,  " Event handler

Class implementation:

CLASS lcl_event_handler IMPLEMENTATION.
  METHOD handle_double_click.
      CHECK e_row-rowtype(1) EQ space and e_column-FIELDNAME = 'CHMULT'
.
      perform do_perform using e_row-index.
       
  ENDMETHOD. " HANDLE_DOUBLE_CLICK
ENDCLASS. " CLASS LCL_EVENT_HANDLER IMPL...

Create Object:

*-For Double click functionality
 CREATE OBJECT gv_event_handler.
 SET HANDLER gv_event_handler->handle_double_click FOR gv_alv_grid1.