Application Development 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: 

Regarding interactive ALV

Former Member
0 Kudos

Hi guys,

Can you please tell me at what level we can go in interactive ALV by double clicking on any field?

Also, tell me the way after level 1.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

You can go upto 20 levels deep. Because SAP can handle 20 internal sessions in one external session.

The way is same as you would do for level 1, i.e in the user command of each list, you will call the next detail level list ( ALV ) based on the selection of the previous list (ALV).

regards,

Advait

2 REPLIES 2

Former Member
0 Kudos

Hi,

You can go upto 20 levels deep. Because SAP can handle 20 internal sessions in one external session.

The way is same as you would do for level 1, i.e in the user command of each list, you will call the next detail level list ( ALV ) based on the selection of the previous list (ALV).

regards,

Advait

Former Member
0 Kudos

Hi,

First you need to define class and method to handle double click functionality.

 *----------------------------------------------------------------------*
*       CLASS DEFINITIONS                                              *
*----------------------------------------------------------------------*
* 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..

Second: you need to implement Class

*----------------------------------------------------------------------*
*       CLASS IMPLEMENTATION.                                          *
*----------------------------------------------------------------------*
CLASS lcl_event_handler IMPLEMENTATION.
*  METHOD handle_double_click.
*      CHECK e_row-rowtype(1) EQ space and e_column-FIELDNAME = 'MATNR'
*.
*      perform form1.
*  ENDMETHOD. " HANDLE_DOUBLE_CLICK 

ENDCLASS. " CLASS LCL_EVENT_HANDLER IMPL...

Third: Create a variable with type ref class event handler as below.

 *----------------------------------------------------------------------*
*       TYPES                                                          *
*----------------------------------------------------------------------*
data: gv_event_handler  TYPE REF TO lcl_event_handler,  " Event handler

Fourth: trigger event handler.

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