‎2008 Jan 24 8:13 AM
I have displayed records from DB table to a table control.There are more than 100 records.Now i want to keep a search button in which we want to give the key value and it want to take to tht particular line(either it is 99th line or 12th line)
Note : In the screen we can only view 10 records at a time.
can any tell how to get this
‎2008 Jan 24 8:21 AM
Mahesh,
FIELD-SYMBOLS: <F1>.
CALL FUNCTION 'TABLE_GET_KEY_TO_SET_CUR_ROW'
EXPORTING
TABLE = TABLE
F4_FORMNAME = 'TSFP_F4'
F4_PROGRAMNAME = 'SAPLSVIX'
IMPORTING
TABLE_KEY = READ_TABLE
TABLES
SELLIST = SELLIST
EXCLUDE_FIELDS = EXCLUDE_FIELDS
EXCEPTIONS
CANCELLED_BY_USER = 01
TABLE_NOT_FOUND = 02.
CASE SY-SUBRC.
WHEN 1. RAISE CANCELLED_BY_USER.
WHEN 2. RAISE TABLE_NOT_FOUND.
ENDCASE.
RETURNCODE = 0000.
POSITION = 1.
SY-FDPOS = STRLEN( READ_TABLE ).
IF SY-FDPOS = 0. SY-FDPOS = 1. ENDIF. "Leereintrag SW 20.08.1997
ASSIGN READ_TABLE(SY-FDPOS) TO <F1>.
READ TABLE READ_TABLE WITH KEY <F1> BINARY SEARCH.
POSITION = SY-TABIX.
RETURNCODE = SY-SUBRC.
Don't forget to reward if useful......
‎2008 Jan 30 6:01 AM
Thanks,
here u have given tht functionmodule right.In tht in importing u have given read_table..
How we want to define the read_table.