Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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.


Former Member replied

declare two variables to get line count and line index

data: wrk_linecnt(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.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question