Skip to Content
avatar image
Former Member

S.No generation for the records

hi gurus

i have a report where i need to generate SNo(serial number ) to the records

displayed....

pls help me out....

thank u

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jul 10, 2009 at 11:06 AM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 10, 2009 at 11:11 AM

    Hi,

    Try like this;

    Data : s_no(3) type n.
    
    Loop at itab.
    s_no = sy-tabix.
    ...........
    ...........
    ..........
    Write : s_no.
    .....................
    .......................
    endloop.

    Regards

    Karthik D

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      Try that and then conclude, sy-tabix will only give serial numbers actually its the record number in the internal table.

      You need to use DESCRIBE TABLE itab LINES i_lines to get the total records.

      Regards

      Karthik D