Table Controls: - Find selected line index
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.
Jeniphin Paul replied
declare two variables to get line count and line index
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.