‎2005 Oct 26 10:11 AM
HI,
The statement,
SET CURSOR FIELD 'SCR_100' LINE scr_100-current_line.
does not.
How can i set cursor on table line.
‎2005 Oct 26 10:16 AM
try ...
set cursor field <b>scr_100-field1</b> line scr_100-current_line.
where scr_100 is your table control name and field1 is the column where u want to set the cursor in the row specified by scr_100-current_line
u r just missing the column of the table where u want to set the cursor
rgds,
PJ
Message was edited by: Priyank Jain
‎2005 Oct 26 12:10 PM
Thank you Priyanka for replying
but the field is an internal table field and when i give field name as it_ekpo-matnr it does not work, though it does not give any syntax errors.
But scr_100-it_ekpo-matnr gives an error
The data object "SCR_100" does not have a component called
"IT_EKPO-MATNR".
Message was edited by: Vinotha M
‎2005 Oct 26 10:17 AM
Hi, it's more like
SET CURSOR FIELD 'MY_STRUC-MATNR' LINE 5.Regards,
Christian
‎2005 Oct 26 12:15 PM
‎2005 Oct 26 12:01 PM
Hi,
u should write the statement in the PBO of the screen.
At PBO you can set the cursor on a specific field of a specific row of a table control.
SET CURSOR FIELD <f> LINE <lin> [OFFSET <off>].
Thanks,
Ruthra
‎2005 Oct 26 12:17 PM
Hey Ruthra,
But i tot this was only for tabstrip controls,
Anyway this too doesnt work..
Can u elaborate pleeez.
‎2005 Oct 26 1:38 PM
Hi!
Looks like you have a problem in finding the correct name. Just make a 'GET CURSOR' in PAI, then you can see in debugging how SAP expects the naming.
Regards,
Christian
‎2005 Oct 26 4:57 PM
get the screen name of that field not the internal table field name through which you are looping at.
code is:
set cursor field 'name of the field' line table_control_name-current_line.
this works....
‎2005 Oct 27 6:17 AM
‎2007 Aug 28 3:07 PM
Hi Christian,
i am working with the table control.
i have two push buttons as page up and page down, corresponding code is been written as well, and those are working well and making the table control to scroll up and down.
nut when i press page up and page-down from the keyboard the vertical scroll bar doesn't moves.
To make page down and page up to work i have to select some particular record on the table control.
i.e. if i set the cursor at every top_line of the table control the page down and page up from the keyboard will start working.
but i have a doubt how to work on it.
as you helped in solving the problem of set cursor.
so i thought of asking your help on this issue.
i will be thankful to you, if you guide me.
thanks,
ekta
‎2007 Aug 28 3:51 PM
hi
the issue is been resolved.
index_t = tab_ctrl1-top_line.
index_d = tab_ctrl1-top_line + n.
set cursor field 'WA_MATERIAL_DATA-MATNR' line N OFFSET INDEX_T.
thanks
ekta