Application Development 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: 

refresh and clear

Former Member
0 Kudos

hi gurus......

what is the difference between refresh and clear ?

good points will be rewarded

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

CLEAR is used to clear variables and structures, work areas, and/or header lines of internal tables.. REFRESH is used to clear the body of an internal table.

Regards,

Rich Heilman

5 REPLIES 5

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

CLEAR is used to clear variables and structures, work areas, and/or header lines of internal tables.. REFRESH is used to clear the body of an internal table.

Regards,

Rich Heilman

Former Member
0 Kudos

Hi

REFRESH clears the contents of the internal table.

CLEAR : it clears the variables, work areas,

Regards,

Vivek Shah

Former Member
0 Kudos

Refresh is used to refresh the body contents of the internal table. This is used if in case internal table is not declared with header line.

Clear is used to clear the contents in the work area or header line.

Clear[] is similar to refresh itab - This refresh the contents of the body.

Former Member
0 Kudos

If you have defined an internal table ITAB with header line.

1) CLEAR statement will clear the header line only.

2)If you need to clear the body use CLEAR ITAB[].

3) REFRESH ITAB will work the same as CLEAR ITAB[].

Former Member
0 Kudos

Hi Diana,

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.