You need to get the cursor line by using the command:
GET CURSOR FIELD <field name> LINE <line>.
This gives you the line in the table control where the cursor is but you also need to consider if the user has scrolled the table control entries. The code below will give you the true cursor line for your table control.
GET CURSOR LINE <line>.
cursor_line = <table_control>-top_line + <line> - 1.
Add a comment