ABAP predefined functions - LINES

When dealing with internal tables, many a time, you are looking to know the number of records the table holds.

In this bite-sized post, I will try to show you how to use ABAP predefined function LINES over the traditional approach of using DESCRIBE keyword.

ABAP veterans have been using the good old DESCRIBE keyword to get the number of lines of an internal table.

 A typical example:

Function Lines:

The lines function returns the number of rows of an internal table. The argument must be an internal table. The return value has type I. 
Furthermore, the result of the function can directly be passed to suitable operand positions and method calls. 
Same example using LINES:




Popular posts from this blog

ABAP convert internal table to excel (.xlsx) format and Send email or download

ABAP read excel(.XLSX) file to internal table in ABAP using CL_FDT_XL_SPREADSHEET

Application Logging in ABAP