Skip to Content
avatar image
Former Member

ABAP

Hi All,

Pleae can anybody expalins me what is the difference between sy-tabix and sy-index(Loop Index) ?

Because in one case i am Modifyimg the internal table inside the do loop by giving sy-index ((Index of Internal Tables)(MODIFY scarr_tab INDEX sy-index FROM scarr_wa TRANSPORTING currcode. ) in the syntax and in other case inside loop statement i am modifyng same record by giving sy-tabix MODIFY scarr_tab INDEX sy-tabix FROM scarr_wa TRANSPORTING currcode.) in the syntax.In both cases its working fine but i am not getting which one i have to use where to modify the internal table?

regards

Satya

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Nov 30, 2007 at 02:09 PM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 30, 2007 at 11:27 AM

    Index is loop Index and Tabix is Index of Internal table.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Satya,

      <b>Sy-tabix</b> is nothing but Table index , This should be used between LOOP and ENDLOOP as a record counter in an Internal tables. where <b>sy-index</b> it is also used as a counter and is used between DO and ENDDO for identifying the number of times these statments were performed .

      Regards,

      Narendra.

  • Nov 30, 2007 at 05:40 PM

    Point hunting?

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      HI,

      Finally i got the result that sy-index will come into picture in DO AND WHILE LOOP

      and sy-tabix comes into picture in all other case where we need to know the index of internal table.

      Thanks

      Satya