Wednesday, April 7, 2010

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.

1 comment:

  1. It's a very easy piece of code, and can do so many things in the program. I am in favor of creating cloud native application development because I know what potential such applications have. The more so because I use this type of solutions very willingly and often.

    ReplyDelete