cancel
Showing results for 
Search instead for 
Did you mean: 

Table - Automatic scroll on changing the lead selection

Former Member
0 Kudos

Hi @ all,

I´ve got two tables and I want to add an entry from tab1 to tab2 if it is not existing in tab2. In case of an existing entry in tab2, the lead selection will be set on the entry in tab2 to show the entry. My Problem is the behaviour of the scroll bar in tab2. I need something like automatic scrolling to the lead selection of the table. Is that possible?

Armin

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Armin,

you can the use the proterty "First visible row" of the table.

create one attribute of type WDy_BOOLEAN and bind it to the "First visible row" of the table.

as soon as you set the lead selection,get its index and set it to the attributr that is( property "First visible row").

once this property is set , scrolling is done automatically and lead selected row is visible as first row.

I hope this resolves your issue.

Thanks,

Krishna

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Armin,

You need to use the

a) GET_LEAD_SELECTION_INDEX method of the context node get the index of table row that has Lead Selection, if match was found.

b) You would need to compute the 'firstVisibleRow' property value of the table, so as to move display of lead selected line.

-Prashant

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

If you want the second table to be updated on choosing a line in first table, do the logic in supply function method.

Check this link. Here I am changing second alv based on the first alv selection. Instead of that, you can try tables.

http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/600729d2-d2c4-2d10-7ab5-d3f720908368