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

ALV mark only maximum 2 rows

Former Member
0 Likes
557

Hi!

I would like to make an ALV grid (made WITH REUSE_ALV_GRID_DISPLAY) to enable only maximum 2 rows marked at the same time.

The grid will be used to match the item pairs.

So it has to be the following states:

- initially 0 lines are selected

- first the user selects 1 lines

- then the user selects the first selected line's pair (2 lines are selected now)

IF the user selects a third line, the first selected line has to be un-marked and so on.

Is it possible to solve with the standard row markers or do I have to use an additional field for this?

Thank you in advance.

Tamá

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
523

Hi, can you please explain me how you solved the issue ?

3 REPLIES 3
Read only

Former Member
0 Likes
523

Hi Tamas,

I dont think it is possible with the standard functionality. If you want to implement this , u would have to copy the function module and the code which gets execute at the selection of the grid row .

For this just display ur data in the grid and debug to see wht is the include or function module for the Click event of gird . Make a z of this code and modify according to your need .

But it will be a very complicated task and you can do the same thing easily using table control if ur not bound to use the Grid.

Read only

Former Member
0 Likes
524

Hi, can you please explain me how you solved the issue ?

Read only

0 Likes
523

I'm using an empty, 1 char long field for marking. In the user command part of the ALV it's easy to code the markings.

The key is using the following statement in the user command section:

selfield-refresh = 'X'.