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: 

double click in alv tree

Former Member
0 Kudos

hi!

I wrote an ALV report using some parts of the code from BCALV_TREE_DEMO.

I added a new icon to the status of the screen.

I want to add a function that when standing on the line with cursor and then pressing the new button, I will use the call transaction passing some of the values from the line which i selected to the call transaction.

how can i do it?

If someone has a code for it , it will be great.

thanks

Yifat

2 REPLIES 2

sharat_chandra
Active Participant
0 Kudos

Hi,

You can use the method " GET_SELECTED_ITEM "/ "GET_SELECTED_NODES " of CL_GUI_ALV_TREE to identify the selected items. I am assuming that you have used this class to construct your tree.

How you identify the item depends on the logic you used to construct your tree i,e if you have somehow stored the info of the node you select on the tree.

For ex, you have a tree displaying Sales orders. You can either give the NODE KEY as the Sales ord num itself or you may give the sales order num in the NODE TEXT so that you can retrieve that later.

Take a look at SLIS package for detailed examples on ALV tree's.

Now regarding the call transaction part, you can use the below format :

set parameter id 'VL' field [your_field].

call transaction 'VL03N' and skip first screen.

Identify your field & the transaction.

Regards,

Sharat.

Former Member
0 Kudos

HI Yifat

If ur using ALV function module, then u should read the EVENTS table in SLIS type-pools. Then u need to write come in User_commens routines. U need to read the events table with USER_COMMAND events. Then use the set parameter and get parameter to pass the data from ALV To transaction.

I Hope this will slove ur problem.

Need ur reward points.

Regards

Ravi