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

internal tables

Former Member
0 Likes
609

what is the difference between clear, delete & refresh

with respect to an internal table

5 REPLIES 5
Read only

Former Member
0 Likes
583

Hi

<b>Clear: clear the Header line

Refresh: delete the Body of the Internal table

Free: Deletes the Internal table from memory:</b>

Suresh, why can't you go through the basics of ABAP and start asking the questions in this forum

You are asking all silly questions.

Reward points for useful Answers

Regards

Anji

Read only

Former Member
0 Likes
583

hi.

<b>clear itab means</b> It clear the workarea.

The initial values are assigned to elementary data types according to the table of built-in ABAP types.

Reference variables are assigned null references.

Structures are set to their initial values component by component.

All rows in an internal table are deleted. All the memory required for the table, except for the initial memory requirement, is released (see Declaring Internal Tables). The FREE statement is used to release the memory space occupied by the rows of internal tables.

The optional additions allow you to fill the spaces of a data object with other values than the initial value.

<b>delete itab means</b> it delete all the records .

<b>refresh itab means :</b>

This statement sets an internal table itab to its initial value, meaning that it deletes all rows of the internal table. The memory space required for the table is freed up to the initial memory size INITIAL SIZE. For itab, you must specify an internal table.

To delete all rows and free the entire memory space occupied by rows, you can use the statement FREE

The statement REFRESH itab acts for all internal tables like CLEAR itab[]. If an internal table itab has a header line, then the table body and not the header line is initialized. If the internal table itab has no header line, REFRESH itab acts like CLEAR itab. Therefore, you should always use CLEAR instead of REFRESH.

Read only

Former Member
0 Likes
583

for the above .......

reward points if helpful,

Regards

Raghunath.S

Read only

former_member378318
Contributor
0 Likes
583

Why not try finding the answer for yourself using SAP help and SDN search???

Read only

Former Member
0 Likes
583

hi

thanks for answering my question

regards

suri