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

refresh and clear

Former Member
0 Likes
1,127

hi gurus......

what is the difference between refresh and clear ?

good points will be rewarded

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,095

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

hi gurus......

what is the difference between refresh and clear ?

good points will be rewarded

5 REPLIES 5
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,096

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

Read only

Former Member
0 Likes
1,095

Hi

REFRESH clears the contents of the internal table.

CLEAR : it clears the variables, work areas,

Regards,

Vivek Shah

Read only

Former Member
0 Likes
1,095

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.

Read only

Former Member
0 Likes
1,095

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[].

Read only

Former Member
0 Likes
1,095

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.