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.
No comments:
Post a Comment