09-28-2012 7:58 AM
I created a dialog program using table control. After user saves the entries in table control, iam validating all the rows in table control .If there is any error, i want to set cursor to particular row where there is error. can any one tell me how to do that?
09-28-2012 12:24 PM
09-28-2012 2:29 PM
Here is some document on how to set and get cursor for the table control.
Cursor Position for a table control can be set in following ways:
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>]
Using the optional addition OFFSET, you can enter the offset of the cursor in the field as described under Setting the Cursor Position.
At PAI you can read the current cursor position.
GET CURSOR FIELD <f> LINE <lin> …
In addition to the information given under Finding Out the Cursor Position, field <lin> contains information on which row of the table control the cursor is currently on. You can also use
GET CURSOR LINE <lin>.
to determine the row of the table control. SY-SUBRC allows you to check if the cursor is placed in a row of a table control.
For getting the corresponding line of the internal table :
GET CURSOR line <lin>.
ind = <table_control>-top_line + <lin> – 1.
Read table <itab> index ind.
The system variable stepl - contains the current table line index in a loop … endloop. Loopc – contains number of lines visible in the table
10-03-2012 5:29 AM
10-09-2012 5:23 AM
10-09-2012 8:17 AM
Hi Poorani,
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].
Using the optional addition OFFSET, you can enter the offset of the cursor in the field as described under setting the cursor position.
At PAI you can read the current cursor position.
GET CURSOR FIELD f LINE lin ...
Refer to this standard program: DEMO_DYNPRO_SET_CURSOR
- Regards,
Manish Shankar.