‎2007 May 07 3:55 PM
I have a field with a match-code in a table control. Is there any way to know the current row number when i press the match-code of that field?
Thanks
‎2007 May 07 4:09 PM
Hi,
Use "<b>Get Cursor field fname line n</b>".
n-line number of TC.
‎2007 May 07 4:09 PM
Hi,
Use "<b>Get Cursor field fname line n</b>".
n-line number of TC.
‎2007 May 07 4:13 PM
Hi Jose ,
READ TABLE i_tab1 INDEX tab_cntrl-current_line.
This statement reads the table control current row .
Reward points if helpful.
Regards,
Hemant
‎2007 May 07 4:14 PM
Hi,
After user interaction with the screen, you may need to know the position of the cursor when the action occurred. This is particularly important if the user chooses the Choose function (F2 or mouse double-click).
To find out the cursor position, use the following statement:
GET CURSOR FIELD <f> [OFFSET <off>]
[LINE <lin>]
[VALUE <val>]
[LENGTH <len>].
This statement transfers the name of the screen element on which the cursor is positioned during a user action into the variable <f>. If the cursor is on a field, the system sets SY-SUBRC to 0, otherwise to 4.
The additions to the GET CURSOR statement have the following functions:
OFFSET writes the cursor position within the screen element to the variable <off>.
LINE writes the line number of the table to the variable <lin> if the cursor is positioned in
a table control. If the cursor is not in a table control, <lin> is set to zero.
VALUE writes the contents of the screen field in display format, that is, with all of its
formatting characters, as a string to the variable <val>.
LENGTH writes the display length of the screen field to the variable <len>
Regards,
Bhaskar