Skip to Content
author's profile photo Former Member
Former Member

How to set cursor in table control?

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Apr 20, 2007 at 06:12 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.