FREE is a keyword used in SAP ABAP programming.
This tutorial covers its introduction & syntax details.
Reset to correct initial value for type,
including release of
Like CLEAR f ,
FREE f resets any data object f to the correct initial value for its
In contrast to CLEAR , however, FREE also releases any resources
connected with the data object f . This may be relevant with internal tables,
structures with tabular components as well as table work areas (created with
After FREE f , you can address the data object f again at any
time, but this may involve reallocating resources.
If f is an
internal table with a header line, the FREE f statement refers to the table
body, but the CLEAR f statement refers to the header
The runtime required to execute the FREE
statement is about 5 msn (standardized
FREE – Release an area in ABAP/4
Releases an area in ABAP/4 memory previously defined
with EXPORT TO MEMORY , i.e. an additional IMPORT … FROM MEMORY sets the
return code value of SY-SUBRC to 4.
FREE MEMORY deletes the
entire ABAP/4 memory , including data exported with EXPORT TO MEMORY ID key
… ID key
Releases only the ABAP/4 memory
for the ID key .
FREE – Release memory occupied by an
Releases the memory needed for object obj . The object
cannot be processed afterwards.
The return code value is set as
SY-SUBRC = 0 Object was released successfully.
1 Error during communication with SAPGUI .
SY-SUBRC = 2 Error during function
call in SAPGUI .
The OLE function modules are only implemented in
Release an EXCEL
DATA EXCEL TYPE OLE2_OBJECT.
OBJECT EXCEL ‘Excel.Application’.
FREE OBJECT EXCEL.
[ FREE ] SUBSCRIBE
RECEIVE UPDATES & SAP ARTICLES RIGHT IN YOUR INBOX.