cancel
Showing results for 
Search instead for 
Did you mean: 

2 ALVs with scroll bars

Former Member
0 Kudos

Hi,

I have two ALV controls in my program that are side by side.

----


----


+

CL_GUI_ALV_TREE

CL_GUI_ALV_GRID

----


----


+

Only problem is that there are two scroll bars in each control. The top of line in each control must be syncrhonised. IE when I scroll down 5 lines in one control, the other must do the same automatically.

How can this be achieved? Are there system events that I can catch?

Can I turn off the scroll bars in both controls and implement my own using the scrollbar object? How can this be done?

Please provide examples.

Cheers,

Michael Pang

Accepted Solutions (0)

Answers (2)

Answers (2)

VXLozano
Active Contributor
0 Kudos

You can do this using only one ALV... just use an internal table to put your data in a single structure and use your ALV to manage this new table.

You will need to scratch more code, but the look will be more clear (IMO).

Good luck,

Vicenç

ssimsekler
Active Contributor
0 Kudos

Hi Michael

It seems to me that it will be more suitable for you to use the class "CL_GUI_COLUMN_TREE", won't it?

As far as I know, scrolling happens just at the presentation layer. That is, it cannot be handled via ALV events although it has "AFTER_USER_COMMAND" event. But there are some methods of "CL_GUI_ALV_GRID" about scrolling. Check these out, I generally use top two ones.

GET_SCROLL_INFO_VIA_ID

SET_SCROLL_INFO_VIA_ID

SET_SCROLL_INFO

SET_SCROLL_INFO_COMBINED

SET_SCROLL_INFO_ID

*--Serdar

Former Member
0 Kudos

Thanks Sedar.

Yes. It would be more appropriate to use CL_GUI_COLUMN_TREE as how you have suggested.

However I could not make CL_GUI_COLUMN_TREE editable.

The requirement is to be able to edit data the columns.

Do you know how this can be achieved?

Regards,

Michael Pang

ssimsekler
Active Contributor
0 Kudos

Hi Michael

I've tried to answer your last question, in one of your threads:

It's at the address:

*--Serdar