Initializing an Internal Table

In case you have an internal table “itab”, and you wish to initialize it (clear it), here are some common statements:

CLEAR itab.
This command clears the header of a table, but keeps its content. The initial memory allocated for the table remains reserved.
(If you don’t remember what a header line is, you can find out here or here).

CLEAR itab[].
The content of the table is released, and the header line is not (kind of the opposite of the CLEAR command).

REFRESH itab.
Clears the content of the internal table completely. The initial memory allocated for the table remains reserved . The header content is also cleared.

FREE itab.
Initializes the internal table and releases its entire memory space, including the initial memory requirement. So using free deallocates memory.

For more information visit the SAP Help. Also, the following blog has nice examples of what happens to an internal table and its header by using each of the commands above.

1 comments:

peterjohn September 10, 2015 at 7:35 AM  

I appreciate you sharing this article. Really thank you! Much obliged.
This is one awesome blog article. Much thanks again.

sap online training
software online training
sap sd online training
hadoop online training
sap-crm-online-training

About This Blog

This blog contains tips, tricks, tutorial, and some of my personal experiences with the SAP ABAP language.

FEEDJIT Live Traffic Feed

  © Blogger templates The Professional Template by Ourblogtemplates.com 2008

Back to TOP