|Home • Trainings • Quiz • Tips • Tutorials • Functional • Cert Q's • Interview Q's • Jobs • Testimonials • Advertise • Contact Us|
Alternative for DESCRIBE TABLE statement
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
©2006-2007 SAPTechnical.COM. All rights reserved.
product names are trademarks of their respective companies. SAPTechnical.COM
is in no way affiliated with SAP AG.
Graphic Design by Round the Bend Wizards