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: 

Getting Cursor for Table control while scrolling

kavya_2017
Explorer
0 Kudos

Hi Experts,

I am displaying 3 pages of records using table controls,

and when i double click on the record, i have to display some pop up based on the values present in the particular record,

this is done by getting the line number of the record using GET CURSOR LINE and reading the internal table with the index obtained from GET CURSOR LINE

This is working fine for one page. I am getting problem for more than one pages

i.e. if i have to validate for the 23rd record, it will be the second record in the second page, so i will get line number as 2nd instead of 23rd (using GET CURSOR LINE) and i will read the 2nd record in the internal table instead of reading the 23rd record.

This will lead to improper pop up messages.

So please let me know how can i catch/get the line number of particular record irrespective of number of pages.

Thanks,

Kavya

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.