‎2007 Mar 02 10:08 AM
hi guys can u plz explain to me d use of sy-tabix,sy-lilli,sy-lisel,sy-tfill
wid d help of seperate coding ....dont gimme a huge thing...just need a small 5-6 lines code just to understand how it can be used in programs.
‎2007 Mar 02 10:13 AM
http://help.sap.com/saphelp_46c/helpdata/en/7b/fb96c8882811d295a90000e8353423/content.htm
Abour sy-tabix,sy-lilli,sy-lisel,sy-tfill
SY-TABIX
Current line of an internal table. SY-TABIX is set by the statements below, but only for index tables. The field is either not set or is set to 0 for hashed tables.
APPEND sets SY-TABIX to the index of the last line of the table, that is, it contains the overall number of entries in the table.
COLLECT sets SY-TABIX to the index of the existing or inserted line in the table. If the table has the type HASHED TABLE, SY-TABIX is set to 0.
LOOP AT sets SY-TABIX to the index of the current line at the beginning of each loop lass. At the end of the loop, SY-TABIX is reset to the value that it had before entering the loop. It is set to 0 if the table has the type HASHED TABLE.
READ TABLE sets SY-TABIX to the index of the table line read. If you use a binary search, and the system does not find a line, SY-TABIX contains the total number of lines, or one more than the total number of lines. SY-INDEX is undefined if a linear search fails to return an entry.
SEARCH <itab> FOR sets SY-TABIX to the index of the table line in which the search string is found.
SY-LILLI
Line at which the event was triggered. The counter begins at 1 and includes the page header.
SY-LISEL
Contents of the line in which the event was triggered (restricted to the first 255 characters).
SY-TFILL
After the statements DESCRIBE TABLE, LOOP AT, and READ TABLE, SY-TFILL contains the number of lines in the relevant internal table.
dont forget to award points if found helpful
u can check this similar thread too
‎2007 Mar 02 10:10 AM
hi,
sy-tabix - Internal Table, Current Line Index
sy-LILLI List processing, current list line
sy-lisel List processing, contents of selected line
sy-tfill Internal tables, current number of lines
example on sytabix.
loop at itab.
write:/ sy-tabix. ( it will start printing from 1 )
endloop.
describe table itab lines sy-tfill.(sy-tfill contains teh no of recors fetched present in iatb)
Regards,
Sruthi
‎2007 Mar 02 10:13 AM
http://help.sap.com/saphelp_46c/helpdata/en/7b/fb96c8882811d295a90000e8353423/content.htm
Abour sy-tabix,sy-lilli,sy-lisel,sy-tfill
SY-TABIX
Current line of an internal table. SY-TABIX is set by the statements below, but only for index tables. The field is either not set or is set to 0 for hashed tables.
APPEND sets SY-TABIX to the index of the last line of the table, that is, it contains the overall number of entries in the table.
COLLECT sets SY-TABIX to the index of the existing or inserted line in the table. If the table has the type HASHED TABLE, SY-TABIX is set to 0.
LOOP AT sets SY-TABIX to the index of the current line at the beginning of each loop lass. At the end of the loop, SY-TABIX is reset to the value that it had before entering the loop. It is set to 0 if the table has the type HASHED TABLE.
READ TABLE sets SY-TABIX to the index of the table line read. If you use a binary search, and the system does not find a line, SY-TABIX contains the total number of lines, or one more than the total number of lines. SY-INDEX is undefined if a linear search fails to return an entry.
SEARCH <itab> FOR sets SY-TABIX to the index of the table line in which the search string is found.
SY-LILLI
Line at which the event was triggered. The counter begins at 1 and includes the page header.
SY-LISEL
Contents of the line in which the event was triggered (restricted to the first 255 characters).
SY-TFILL
After the statements DESCRIBE TABLE, LOOP AT, and READ TABLE, SY-TFILL contains the number of lines in the relevant internal table.
dont forget to award points if found helpful
u can check this similar thread too
‎2007 Mar 02 10:13 AM
sy-tabix: Index for internal tables.
itab-field = 1.
append itab.
itab-field = 2.
append itab.
loop at itab.
write:/ sy-tabix. "Will have the current loop pass number
endloop.
The output will be
1
2
Check the DEMO Program: demo_list_system_fields in se38.
Regards,
Ravi
‎2007 Mar 02 10:16 AM
SY-TABIX - Current int table index,
SY-LILLI - Current line in list
sy-lisel - selected line in list processing
sy-tfill - no of line in internal table.
‎2007 Mar 02 10:25 AM
this may help u,
tables spfli.
data t_spfli like standard table of spfli.
select * from spfli into table t_spfli.
loop at t_spfli into spfli where carrid eq 'AZ'.
write:/ sy-index,sy-tabix,sy-tfill.
endloop.
at line-selection.
write:/ 'Current line number:' ,sy-lilli,
/ 'Contents of line : ' ,sy-lisel.