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

Regarding Cursor position in ALV OOps

Former Member
0 Likes
739

Dear All ,

I have developed 3 containers in 1 screen and display 3 different ALV Reports in this containers through OOps Concept. Now if user put cursor on 1st column of 1st alv than accordingly related data should be displayed in 2 another alvs. Now My question is that how can I identify cursor position that it is on which row and column and what is value of this field..

If Anybody knows than please help me for same.....

Thank You ,

4 REPLIES 4
Read only

uwe_schieferstein
Active Contributor
0 Likes
679

Hello

Very simple solution: add the optional IMPORTING parameter SENDER to the definitions of your event handler methods, e.g.


  METHOD handle_double_click
     FOR EVENT double_click OF cl_gui_alv_grid
     IMPORTING
         e_row     = 
         e_column =
         SENDER.  " grid instance that has triggered the event 

Now within the event handler method simply distinguish based on the SENDER grid:


METHOD handle_double_click
  CASE sender.
     WHEN go_grid1.  " double-click in first grid -> fill 2nd grid

     WHEN go_grid2.  " double-click in 2nd grid -> fill 3rd grid
  ...  
ENDMETHOD

Regards

Uwe

Read only

0 Likes
679

Hi Uwe Schieferstein ,

Thanks for your repply

Can you just send me some sample code for this ?

Thank You ,

Read only

0 Likes
679

>

> Hi Uwe Schieferstein ,

> Thanks for your repply

>

> Can you just send me some sample code for this ?

>

> Thank You ,

Please search in SCN.

Read only

0 Likes
679

Hello

Have a look at: [Against All Odds - Programming of Communicating ALV Grid Controls|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/21504] [original link is broken] [original link is broken] [original link is broken];

Regards

Uwe