Skip to Content
avatar image
Former Member

Setting Cursor in desired line in table conrol

Hi All,

I am presently working on a table control where I had to insert a new line in the table control. It had used SAp wizard for this and it is working fine.

here the insertion is happening but the cursor is not coming to the new line instead going to the top line in the display.

I am using 'SET CURSOR ' for setting the cursor position.

Can u pls help in this regard.

Thanks and Regards,

Chaitanya swaroop maka

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Sep 04, 2008 at 09:00 AM

    Hi

    U need to create or insert the code in a module of PBO and using the option LINE and FIELD to define the record and the field where the cursor has to be placed:

    SET CURSOR FIELD <FIELD> LINE <LINE>.

    The <LINE> can have value from 1 to N, where N is the max number of lines can be displayed in the table control. U can know this information using the system variable SY-LOOPC.

    Max

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 04, 2008 at 09:39 AM

    In the PBO create a module.

    first describe your internal table using the below syntax.

    Describe table itab lines v_lines.

    iv_lines = v_lines + 1.

    set cursor field < field name>

    line v_lines.

    where TC- is the definition of your table control

    hope this helps.

    Regards,

    Ravi

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 05, 2008 at 05:14 AM

    Hi,

    try this one.

    after inserting the new line in table control.

    w_line = tc-currentline + 1.

    set cursor field <fieldname> line w_line.

    regards

    padma

    Add comment
    10|10000 characters needed characters exceeded