cancel
Showing results for 
Search instead for 
Did you mean: 

IS INITIAL vs. LINES > 0

0 Kudos

Hi,

which statement is faster in checking whether an internal table is empty:

IF lt_table IS INITIAL.

or

IF LINES( lt_table ) > 0.

Or is there no difference at all?

--Florian

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

tested "IS INITIAL" to be a lot faster than "LINES( ... ) = 0", factor 5 to 6.

Best regards, Frank

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Why don't you just test it ?

Put the instruction to test in a 10 000 iteration loop and measure the response time.

You will know the answer for sure !

My guess is "IS INITIAL" will be faster...

Regards,

Olivier