09-04-2008 9:57 AM
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
09-04-2008 10: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
09-04-2008 10: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
09-05-2008 6: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