Alternative for DESCRIBE TABLE statement

by Raghavan

In order to check the number of records in an internal table or to check if the internal table is empty or not, we use DESCRIBE TABLE statement.  Somewhere I heard that DESCRIBE TABLE statement would be obsolete soon (not sure of the fact though). So I started looking for an alternative for the same and came across a function LINES( itab ). itab being an internal table. 

To check  whether the internal table is empty or not, we can now directly use 

IF LINES( itab ) = 0.

 instead of declaring a variable to hold the number of records and using the DESCRIBE TABLE statement. See the sample code below:



 

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image