Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

abap dictionary

Former Member
0 Likes
1,357

WHAT'S DIFFERENCE B/W CLEAR,REFRESH,FREE?

REGARDS,

VIJAY KUMAR

13 REPLIES 13
Read only

Former Member
0 Likes
1,330

hi,

clear and refresh are used to clear the contents of the workarea and internal table respectively...

free deletes the contents and deallocates the memory assigned to the internal table.

regards

padma

Read only

Former Member
0 Likes
1,330

hi,

clear clear the header of internal table

refresh delete all data from internal table

free initilise memory

mukesh

Read only

Former Member
0 Likes
1,330

Hi

Free - You can use FREE to initialize an internal table and release its memory space without first using the REFRESH or CLEAR statement. Like REFRESH, FREE works on the table body, not on the table work area. After a FREE statement, you can address the internal table again. It still occupies the amount of memory required for its header (currently 256 bytes). When you refill the table, the system has to allocate new memory space to the lines.

Refresh - This always applies to the body of the table. As with the CLEAR statement, the memory used by the table before you initialized it remains allocated. To release the memory space, use the statement

Go through the link given below :

With Regards

Nikunj Shah

Read only

Former Member
0 Likes
1,330

Vijay,

welcome to SDN i feel you not read rules of forum before posting.

i would suggest first interview wuestion are not allowed.

am sure if you search in SDN with appropriate term like

use of clear refresh you will definately get answer.

Amit

Read only

anversha_s
Active Contributor
0 Likes
1,330

hi,

free - will release the memory.

refresh - will delete the contents of itab

clear - will delete onlyh the work area.

for more chk this link

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

Regards,

Anversha

Read only

former_member787646
Contributor
0 Likes
1,330

Hi

REFRESH: deletes the data from the body of an internal table.

CLEAR: deletes the data from the header line of an internal table if the internal table has header line,

otherwise deletes the data from the body.

FREE: frees the memory of the deleted records.

Hope it helps.

Murthy

Read only

Former Member
0 Likes
1,330

hiiii

CLEAR-> clear the header line of an internal table

REFRESH-> delete the body of the internal tables means it removes data

FREE-> remove the internal table from the memory.it removes data and header everything means it makes that memory free.

regards

twinkal

Read only

Former Member
0 Likes
1,330

Hi,

Clear : its Clears the workarea..

refresh : it clears the internal table. with header line..

free : it clears the data as well as memory.....

Read only

Former Member
0 Likes
1,330

hi,

CLEAR : clear the work area

REFRESH: is the clear the inertable table body fields

FREE: is the clear the internal table momery

CLEAR[]: is the same as REFRESH

regards

BHUPAL

Read only

Former Member
0 Likes
1,330

This message was moderated.

Read only

Former Member
0 Likes
1,330

clear: clear the content the header line if it is with header line, if it is with ut header line then it will clear the body.

clear variable clear the variable content.

Refresh: refresh the contents(if table with header line or with out headerline)

free: will release the memory.

Read only

Former Member
0 Likes
1,330

Hi Vijay.

I would like to suggest a few references,

[SDN - Reference for difference between refresh, clear and free and Its usage|;

[SDN - Reference for free, refresh, clear, delete - Difference |;

[SDN - Reference for Use of Refresh and Clear|;

[SDN - Reference for Releasing Memory from Internal Tables|;

Hope that's usefull.

Good Luck & Regards.

Harsh Dave

Read only

Former Member
0 Likes
1,330

Hi,

clear:

it clears the content in both the work area and the internal table.

Refresh:

it clears only the content in the body of the internal table but the memory remains as it is.

Free:

It also clears only the content in the body of the internal table and it also frees the memory allocated to the data.