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

diff b/w into table and appending table

Former Member
0 Likes
2,449

hi Experts,

Diff b/w into table <internal table> and appending table<internal table>?

Reply me soon,

S.Suresh.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,786

Hi,

Into table is : entering the data into internal table for the first time

Appending table is appending the internal table which has data already.

Thanks,

Anon

Hi,

If you use into <internal table> then the previous contents in internal table are replaced but this is not the case in appending <internal table>.

Reward if useful.

Regards,

Swetha.

7 REPLIES 7
Read only

Former Member
0 Likes
1,786

INTO TABLE is used to move the data from Database tables into an internal table using SELECT Query. If there is already any existing data in internal table, then tht wud b overwritten.

APPENDING TABLE is used to move data from Database tables into an internal table using SELECT Query. But in this case the internal table might already be holding few records.

Read only

Former Member
0 Likes
1,786

Hi,'

When you use INTO TABLE, the table is REFRESHed and new values are put into it.

When you use APPENDING, existing values in that internal table (if any) is retained and the new values are appended to it.

Read only

Former Member
0 Likes
1,786

Hi,

If you use into <internal table> then the previous contents in internal table are replaced but this is not the case in appending <internal table>.

Reward if useful.

Regards,

Swetha.

Read only

Former Member
0 Likes
1,787

Hi,

Into table is : entering the data into internal table for the first time

Appending table is appending the internal table which has data already.

Thanks,

Anon

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,786

SELECT INTO

FETCHES DATA INTO ITAB.

SELECT APPENDING.

APPENDS DATA BELOW THE DATA EXISTSING IN THE ITAB.

WHEN NO DATA EXISTS IN ITAB THE APPENDING STATEMENT

ACTS SIMILAR TO 'into' sTATEMENT

Read only

Former Member
0 Likes
1,786

Hi,

Appending table is used when you want to append the selected entried to your internal table with already existing records.

Into table is used to overwrite the selected entries into your internal table without retaining the old records.

Thanks and Regards,

Lakshmi.

Read only

Former Member
0 Likes
1,786

hi suresh,

If the result set consists of multiple lines, an internal table itab of any table type can be specified after INTO or APPENDING. The row type of the internal table must meet the prerequisites.

The result set is inserted into the internal table itab line-by-line; a sorting process is executed in the case of a sorted table. If INTO is used, the internal table is initialized before the first line is inserted. Previous lines remain intact if APPENDING is used.

If INTO is used, the internal table is initialized before each loop pass and, in the SELECT loop, it only contains the lines of thecurrent package. If APPENDING is used, a further package is added to the existing rows of the internal table in each SELECT loop.

After ENDSELECT, the contents of itab is not defined if INTO is used - that is, the table can either contain the lines of the last package or it can be initial. If APPENDING is used, the content of itab retains the state of the last loop pass.

hope its clear to you,

reward points if usefull,

Thanks,

Kalyan.