How to Find the Number of Entries of Internal Table in ABAP/4

We can find out how many entries of internal table by apply statement "DESCRIBE".

Example


DATA: it_tab TYPE TABLE OF BKPF WITH HEADER LINE,
      tot_lines TYPE i.
...
...
DESCRIBE TABLE it_tab LINES tot_lines.

Or you can apply statement ’LOOP AT’ and count it.

Example


LOOP AT it_tab.
tot_lines = tot_lines + 1.
ENDLOOP.

Post new comment