Tuesday, December 2, 2014

function lines( ) in SAP ABAP instead of "describe table lines"

Hi Folks,
i just came across the lines( ) function in abap.

Instead of " describe table lines nlines"  now we can directly say if lines ( lt_table ) > 5...
without the need to declare an extra varialble

It is quite handy indeed!

Here the help extract
Enjoy! 

lines - Row Function
A row (or line) function is available for internal tables.
Syntax
... lines( arg ) ...
The lines function returns the number of rows (or lines) in an internal table. The argument arg must be an internal table. The return value has the type i.
Note
The function described here is one of the function that can also be used in the extended functional operand positions of the statements MOVE, CASE, and WHEN.