03-23-2006 10:29 AM
Hi experts,
Please help to set the cursor to particular field in the particular line of table control .
regards
manicveera
03-23-2006 10:40 AM
HI
At PBO you can set the cursor on a specific field of a specific row of a table control.
<b>SET CURSOR FIELD <f> LINE <lin> [OFFSET <off>]</b>
FOR MORE DOCUMENTATION ON THIS PLEASE GO THROUGH THE LINK
<a href="http://72.14.203.104/search?q=cache:AJJ3D7y_NFYJ:help.sap.com/saphelp_nw04/helpdata/en/9f/dbac9f35c111d1829f0000e829fbfe/content.htmSetcursortoTablecontrolField+ABAP&hl=en&gl=in&ct=clnk&cd=1">Cursor Position on Table Controls</a>
<a href="http://72.14.203.104/search?q=cache:eNQbEfxNJTUJ:help.sap.com/saphelp_nw04/helpdata/en/9f/dbac0b35c111d1829f0000e829fbfe/content.htmSETCURSORFIELDABAP&hl=en&gl=in&ct=clnk&cd=2">Setting the Cursor Position</a>
IF THIS FINDS USEFUL PLEASE REWARD POINTS
REGARDS
ANOOP
03-23-2006 10:36 AM
<deleted> , sorry i got confused
try this
SET CURSOR FIELD 'ITAB-FIELD' LINE lineno.
Message was edited by: Sekhar
03-23-2006 10:38 AM
03-23-2006 10:40 AM
HI
At PBO you can set the cursor on a specific field of a specific row of a table control.
<b>SET CURSOR FIELD <f> LINE <lin> [OFFSET <off>]</b>
FOR MORE DOCUMENTATION ON THIS PLEASE GO THROUGH THE LINK
<a href="http://72.14.203.104/search?q=cache:AJJ3D7y_NFYJ:help.sap.com/saphelp_nw04/helpdata/en/9f/dbac9f35c111d1829f0000e829fbfe/content.htmSetcursortoTablecontrolField+ABAP&hl=en&gl=in&ct=clnk&cd=1">Cursor Position on Table Controls</a>
<a href="http://72.14.203.104/search?q=cache:eNQbEfxNJTUJ:help.sap.com/saphelp_nw04/helpdata/en/9f/dbac0b35c111d1829f0000e829fbfe/content.htmSETCURSORFIELDABAP&hl=en&gl=in&ct=clnk&cd=2">Setting the Cursor Position</a>
IF THIS FINDS USEFUL PLEASE REWARD POINTS
REGARDS
ANOOP
03-23-2006 10:46 AM
Hi,
SET CURSOR
Variants:
1. SET CURSOR FIELD f.
2. SET CURSOR LINE line.
3. SET CURSOR col line.
Effect
Sets the cursor dynamically in the display of a screen or list.
Variant 1
SET CURSOR FIELD f.
Extras:
1. ... OFFSET off
2. ... LINE line
Effect
Places the cursor dynamically at the start of the field g which is specified in the field f. You must specify the name of the field in uppercase letters.
Note
With step loops and in list processing, you also need the addition ... LINE line.
Addition 1
... OFFSET off
Effect
Offsets the cursor position by off columns from the start of the field g which is specified in the field f (1st column = 0).
Addition 2
... LINE line
Effect
Places the cursor whose value is specified in field f in the field g of the loop line line in a step loop. In list processing, the cursor is placed in the absolute list line line (SY-LILLI).
Notes
Specifying LINE line is possible only with step loops and in list processing. In these cases, it is necessary.
The name specified in the field f must be a global field. For field symbols and reference parameters, you must use the name of the global field which is assigned to the field symbol or parameter at the time of output (i.e. with "WRITE").
Examples
1. Place the cursor on a screen field.
DATA f(5) TYPE C VALUE 'MODUS'.
DATA MODUS(10) TYPE C VALUE '1234567890'.
...
SET CURSOR FIELD F.
or
SET CURSOR FIELD 'MODUS'.
Both statements place the cursor at the beginning of the field MODUS.
SET CURSOR FIELD F OFFSET 2.
or
SET CURSOR FIELD 'MODUS' OFFSET 2.
Both statements place the cursor on the third character (in this case the digit "3") of the field MODUS.
...
2. Place the cursor at the beginning of a field when selecting a line in list processing.
MOVE 'MODUS' TO F.
MOVE '1234567890' TO MODUS.
DO 10 TIMES.
NEW-LINE.
POSITION SY-INDEX.
WRITE MODUS.
ENDDO.
AT LINE-SELECTION.
SET CURSOR FIELD F LINE SY-LILLI.
or
SET CURSOR FIELD 'MODUS' LINE SY-LILLI.
Both statements place the cursor at the beginning of the field MODUS on this line when the user double-clicks.
SET CURSOR FIELD F LINE SY-LILLI OFFSET 2.
or
SET CURSOR FIELD 'MODUS' LINE SY-LILLI OFFSET 2.
Both statements place the cursor on the third character (in this case the digit "3") of the field MODUS on this line when the user double-clicks.
Variant 2
SET CURSOR LINE line.
Extras:
1. ... OFFSET off
Effect
Places the cursor dynamically in the loop line line with step loops or in the absolute list line line (SY-LILLI) in list processing. This variant is only possible with step loops and in list processing.
Addition 1
... OFFSET off
Effect
Places the cursor off columns from the beginning of the line.
Example
Place the cursor at the beginning of the line when selecting a line in list processing.
DATA MODUS(10) VALUE '1234567890'.
DO 10 TIMES.
NEW-LINE. WRITE MODUS.
ENDDO.
AT LINE-SELECTION.
SET CURSOR LINE SY-LILLI.
This statement sets the cursor at the beginning of the line when the user double-clicks.
SET CURSOR LINE SY-LILLI OFFSET 2.
This statement sets the cursor on the third column (in this case the digit "3" of the field MODUS) on this line when the user double-clicks.
Variant 3
SET CURSOR col line.
Effect
Places the cursor dynamically on the column col and the line line of the current screen.
Note
This variant of the statement SET CURSOR does not operate on the cells of a table control or the fields of a tabstrip control, since different elements may exist at the absolute position col line.
Example
SET CURSOR 60 5.
Positions the cursor on line 5, column 60.
Related
GET CURSOR
Additional help
Setting the Cursor Position
Setting the Cursor Position From a Program
Regards
Vijay
03-23-2006 11:17 AM
Hi
use the below syntax.
SET CURSOR FIELD <field name> LINE <line no>.
Please go thru the SAP Docu as well.
Cheers,
Abdul
03-23-2006 11:20 AM
Hi Veera,
What exactly you are looking for , i mean to say do you want the modify that field in the table control or similar to that then .
You can check the program <b>DEMO_DYNPRO_TABCONT_LOOP_AT</b> which has got the same type of reqmt. as you are looking for.
Cheers
Sunny
Rewrd points, if found helpful