08-20-2007 5:18 AM
08-20-2007 5:21 AM
Sy-tabix is used to find the current line in the internal table; its a current line index
08-20-2007 5:22 AM
Hi..
SY-TABIX is a system field that stores the Currently processed row of internal Table.
For Eg:
READ TABLE ITAB WITH KEY MATNR = V_MATNR.
IF SY-SUBRC = 0.
WRITE:/ SY-TABIX. "To find the Index of the Row which is READ
<b>Reward if Helpful</b>
08-20-2007 5:22 AM
SY-TABIX
Current line in an internal table. With the following statements SY-TABIX is set for index tables. With hashed tables, SY-TABIX is not filled or it is set to 0.
· APPEND sets SY-TABIX to the index of the last table row, that is the total number of entries in the target table.
· COLLECT sets SY-TABIX to the index of the existing or appended table row. With hashed tables, SY-TABIX is set to 0.
· LOOP AT sets SY-TABIX to the index of the current table row at the beginning of every loop pass. After leaving a loop, SY-TABIX is set to the value it had before entering the loop. With hashed tables, SY-TABIX is set to 0.
· READ TABLE sets SY-TABIX to the index of the table row read. If no row is found with binary search while reading, SY-TABIX contains the index of the next-highest row or the total number of rows +1. If no row is found with linear search while reading, SY-TABIX is undefined.
· SEARCH FOR sets SY-TABIX to the index of the table row, in which the search string was found.
08-20-2007 5:22 AM
SY-TABIX is the Table index. It gives the Last addressed line of a standard table or sorted table. Is set to 0 if hashed table is accessed.
reward if useful.
08-20-2007 5:23 AM
Hi
The SY-TABIX is system field whic in available in syst structure.
when u process the internal table with in the loop, this field contain the no. of current loop pass , by sceeing this field u can tell how many time ur internal tableis process in the loop.
itab conrtina 2 record
data number(3) type n.
loop at itab .
number =sy-tabix.
endloop.
write: number.
output 2.
reward point if helpfull.
Anees