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

How to set cursor in table control?

Former Member
0 Likes
569

I have a table control (Screen 300) to display invoice number and amount. For some checks we have around 200 invoices to be displayed. When user enters the invoice number in invoice text box and click on OK, it should highlight the invoice number and amount row or set the cursor position.

I have another problem.

Screen 300 is being called from Screen 200. When the user clicks on OK in 300, 300 is getting closed. Acutally it should be displayed with Cusor position or highlighted row.

I appreaciate your help ... Thanks

I have a table control (Screen 300) to display invoice number and amount. For some checks we have around 200 invoices to be displayed. When user enters the invoice number in invoice text box and click on OK, it should highlight the invoice number and amount row or set the cursor position.

I have another problem.

Screen 300 is being called from Screen 200. When the user clicks on OK in 300, 300 is getting closed. Acutally it should be displayed with Cusor position or highlighted row.

I appreaciate your help ... Thanks

1 REPLY 1
Read only

Former Member
0 Likes
439

I believe that you can use the SET CURSOR statement to do the first part of your requirement. Something like this should work:

SET CURSOR FIELD w_field LINE w_line.

Here's the info from SAP help:

Effect

: The cursor is positioned on the screen element whose name is contained in upper case in field. The data object field must be character-type and flat. The screen layout or a table control is scrolled in the display so that the screen element on which the cursor is positioned is visible. If the specified screen element is not found, the statement is ignored.

If the specified screen element is part of a table control or a step loop, the line of the table control or group of the step loop in which the cursor is positioned on the specified screen element must be specified using the addition LINE. For the data object line, the type i is expected. If there is no line or group for the value of line, or the addition LINE is not specified, the statement is ignored. The statement is also ignored if the addition LINE is specified and the screen element is not part of a table control or step loop.

I hope this helps.

- April King