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

clear[] and refresh?

Former Member
0 Likes
1,946

hi friends..

is there any difference bt clear[] and refresh ?

hi friends..

is there any difference bt clear[] and refresh ?

16 REPLIES 16
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
1,907

Hi,

No there is no difference.

Since you are using clear with [] this will clear the rows of the ITAB.

Also REFRESH does the same it will clear the itab but keeps the headerline data as it is.

One more thing is REFRESH will clear the memory also and will keep only memory required for number of rows that are mentioned in INITIAL SIZE.

I am sure you are confused with the answers given to your questions but best thing is to write a small program and finding it out. Its some times sad to see pople giving wrong answers.

Regards,

sesh

.

Message was edited by:

Seshatalpasai Madala

Read only

Former Member
0 Likes
1,907

Hi,

Clear will clear the header line only and Refresh will clear the whole internal table.

regards,

step

Read only

0 Likes
1,907

i am asking clear[] and refresh ?

what abt header line in the case of clear[], refresh,free ?

Read only

0 Likes
1,907

hi selva,

if you use clear with [] this will the clear header and clear the rows of the ITAB.

REFRESH:refresh will delete the entries of ur ITAB.

FREE : it will dealocate the memory for that ITAB.

Thanks,

Ravinder.

Read only

Former Member
0 Likes
1,907

Hello,

Clear delete the data from workarea or the table header line.

refresh deletes all the entries from the table.

Regards,

Neelambari.

Read only

Former Member
0 Likes
1,907

Hi,

clear will clear the header line only.

clear[] will clear the body of the internal table only.

refresh will clear the body of the internal table and header line of that internal table.

rgds,

bharat.

Read only

Former Member
0 Likes
1,907

aye there IS a difference!

Clear deletes the contents of you workarea, or if you have a itab with headerline, it deletes the contents of the headerline.

Refresh deletes the contents of you itab, tho i´m not a 100% sure but i think the headerline data stays.

Read only

0 Likes
1,907

there is NO difference between clear[] and refresh .

Both clear the body of the int table .

Read only

Former Member
0 Likes
1,907

Clear:

Deletes the content of the header area of internal table

Does not delete the content of the internal table

Refresh:

Deletes the content of the internal table

Does not delete the content of the header area

Free:

Frees the memory space allocated to the internal table

Read only

Former Member
0 Likes
1,907

Clear:

Deletes the content of the header area of internal table

Does not delete the content of the internal table

Refresh:

Deletes the content of the internal table

Does not delete the content of the header area

Free:

Frees the memory space allocated to the internal table

Read only

Former Member
0 Likes
1,907

Refresh: it will cleare the header of the internal table,

Clear[] : it will cleare the body of the internal table and headr also.

Reward point if helpfull,

Regards

suresh.d

Read only

Former Member
0 Likes
1,907

clear is to clear the variable and the heder line of the internal table

and refresh will clear the whole internal table.

Read only

Former Member
0 Likes
1,907

Hi Selva,

Refresh itab.

The internal table itab is reset to its initial state, i.e. all table entries are deleted.

When we use refresh, the header entry of a table with a header line remains unchanged. It can be reset to its initial value using CLEAR.

clear itab --> clears the value in the header line .

clear itab[] --> works same as Refresh.

regards,

Sree

PS: rewards points if Useful.

Read only

Former Member
0 Likes
1,907

Clear is for header of internal table - i mean it clears only header line of internal table

you can use to variables and internal table

Refresh - clears the body of the internal table and you should not use to variables

Reward Points if it is helpful

Thanks

Seshu

Read only

Former Member
0 Likes
1,907

If for example itab is an internal table with header line.

Now if u write clear itab it will clear the header.

But if u write clear itab[] it will clear the contents but not the header.Same thing happens if u use refresh itab.

Either u can use clear itab[] or refresh itab.both are same.

Read only

0 Likes
1,907

ok mr srinivasan its clear.... what abt free