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: 

Table Controls: - Find selected line index

lijisusan_mathews
Active Contributor
0 Kudos

HI,

I have a table control . In tis 4 lines are visible at a time..1 field in this table comntrol is a button.

when the user clicks on a button, the details of the corresponding line should be used to trigger a new screen. If the no of lines in the table control is less than 4( o of visible lines) , i can use get cursor line, to get the index of the line selected. . but if i scrolled down and selected the button in the 15 th line, then get cursor line cannot be used as it will retrieve the no 3. CAn u please give me a solution.

thnx.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

declare two variables to get line count and line index

data: wrk_linecnt(10),

wrk_lineindx(10).

get cursor line wrk_linecnt.

wrk_lineindx = <table control name>-top_line + wrk_linecnt - 1.

read table <internal table used in table control> index wrk_lineindx.

1 REPLY 1

Former Member
0 Kudos

declare two variables to get line count and line index

data: wrk_linecnt(10),

wrk_lineindx(10).

get cursor line wrk_linecnt.

wrk_lineindx = <table control name>-top_line + wrk_linecnt - 1.

read table <internal table used in table control> index wrk_lineindx.