Application Development and Automation 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: 
Read only

issue finding current line when page down occurs - table control

Former Member
0 Likes
613

HI experts,

How to find the current line index of the table control? The "Current line" property of table control gives the index of the current line when the cursor is in the first page. If it exceeds the first page, then it is not returning the correct value..

For example, first page has 10 lines and the cursor is in the 5th line of the 2nd page, then the index must be returned as 15.. But current line returns the value as 5..

Pls tell me how to find this.

HI experts,

How to find the current line index of the table control? The "Current line" property of table control gives the index of the current line when the cursor is in the first page. If it exceeds the first page, then it is not returning the correct value..

For example, first page has 10 lines and the cursor is in the 5th line of the 2nd page, then the index must be returned as 15.. But current line returns the value as 5..

Pls tell me how to find this.

2 REPLIES 2
Read only

Former Member
0 Likes
474

Try FM SCROLLING_IN_TABLE instead. It conforms to the SAP style guide and is documented.

Rob

Read only

Former Member
0 Likes
474

Hi,

try this Way...

IN PBO At MODULE STATUS_<Screen-Number>.

13 is the number of cells in the Tables control

TBC_200 is the Table control Name....

if sy-ucomm = 'PGUP'.

if TBC_200-current_line GE 14.

TBC_200-top_line = TBC_200-top_line - 13.

endif.

ENDIF.

if sy-ucomm = 'PGDN'.

if TBC_200-current_line lE TBC_200-lines.

TBC_200-top_line = TBC_200-top_line + 13.

endif.

ENDIF.

Regards,

Prabhudas