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 INTERNAL TABLE

Former Member
0 Likes
1,573

IN WHICH CONDITION CLEAR INTERNAL TABLE,APPEND INTERNAL TABLE STATEMENT IS USED?

3 REPLIES 3
Read only

Former Member
0 Likes
806

hi,

Normally we use clear statement immediately after using append statement... so as to clear the header of internal table ..


loop at itab.
  
  itab1-field1 = itab-field.
  append itab1. 
  clear itab1.
endloop.

Read only

Former Member
0 Likes
806

We use CLEAR itab after APPEND itab so that soem fields of data current record data should not move to next record of the table. because in some cases data from current record may not be overwritten next time..

Always use this..

Regards

Prax

Read only

Former Member
0 Likes
806

Just make sure that your internal table is defined with a header line when you do that, otherwise it works as REFRESH command and deletes all the records in the internal table.