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

Retrieving data from ALV grid on previous level

0 Likes
519

Hi,

I am developing a report using ALV Grid, there is no OO involved.

The report is showing salary data at any department level in the company, and you can navigate to a lower level by clicking any cell in one of the displayed lines.

Since the layout at each level is identical, I'm using the same internal table for all levels.

Now my problem is: I have displayed level 1, then the user has clicked a cell after which I have displayed level 2, the user then presses F3 and clicks a new cell in the level 1 list - now my internal table do not have the level 1 data since it holds the level 2 data, however I need the data in order to present the correct new level 2.

In the form I specify in the i_callback_user_command form I immediately get the value of the cell the user has pressed from the slis_selfield parameter, but this is not necessarily the key field that I need, so I need some way of retrieving data for the entire row, not just the one field.

I hope someone will be able to help me with this.

Regards,

Claus Christensen

Hi,

I am developing a report using ALV Grid, there is no OO involved.

The report is showing salary data at any department level in the company, and you can navigate to a lower level by clicking any cell in one of the displayed lines.

Since the layout at each level is identical, I'm using the same internal table for all levels.

Now my problem is: I have displayed level 1, then the user has clicked a cell after which I have displayed level 2, the user then presses F3 and clicks a new cell in the level 1 list - now my internal table do not have the level 1 data since it holds the level 2 data, however I need the data in order to present the correct new level 2.

In the form I specify in the i_callback_user_command form I immediately get the value of the cell the user has pressed from the slis_selfield parameter, but this is not necessarily the key field that I need, so I need some way of retrieving data for the entire row, not just the one field.

I hope someone will be able to help me with this.

Regards,

Claus Christensen

2 REPLIES 2
Read only

MarcinPciak
Active Contributor
0 Likes
490

Hi Claus,

I am afraid there is no direct way of getting entire row data once you change content of your table. You can however:

- store previous level data in some tmp table

- when you pick F3 then use tabindex of slis_selfield which should hold index of selected row.

- then just read your tmp table using that index to get appropriate row data

Regards

Marcin

Read only

0 Likes
490

Thanks for your answer, I was hoping there was a way of accessing the Grid directly, but I'll make it work with a multi-level internal table instead.

Kind regards,

Claus Christensen