Archived discussions are read-only. Learn more about SAP Q&A

diff refresh Vs clear of internal table

Hello ABAP Experts,

What is the difference between refresh and clear of internal table.

Suggestions appreciated.

Thanks,

BWer

Tags:
replied

Hi ,

REFRESH and CLEAR are the various methods for initializing Internal Tables.

examples:

CLEAR <itab>.

If <itab> is not having header line, this will clear the entire contents.

CLEAR <itab>.

If <itab> is having header line, this statement will just clear the contents of header line.

CLEAR <itab>[]

If <itab> has header line, this will clear the body contents ( excluding header line)

REFRESH <itab>.

This statement will cause the body content to be cleared. But memory allotted to the table will remain as it is.. Then u have to use

FREE<itab> to free the memory.

Just check this link...

http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb384e358411d1829f0000e829fbfe/content.htm

Regards,

SP.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question