02-23-2008 9:24 AM
I am not clear with the difference between append and insert. Hence append is one which add a particular tuple into last of an internal table but while using insert also it gives the same while using at programmiing. So, please clear this concept.
Regards,
Venkat
02-23-2008 9:28 AM
Both Append and Insert are used for the Internal Tables ...
But Append only apeends a REcord at Last in the ITab.. But Insert using Insetrt statement can be done at any point.........
You can use Append and Insert for Standard Tables But u cannot use Append for Sorted or Generic Tables.. because it will apeend at end only..then the sorted order will be violated then u will get the shortdump..
so for sorted or generic type of tables u have to use Insert rather than Append...
Babu...
Edited by: venkoji babu on Feb 23, 2008 10:29 AM
02-23-2008 9:28 AM
Both Append and Insert are used for the Internal Tables ...
But Append only apeends a REcord at Last in the ITab.. But Insert using Insetrt statement can be done at any point.........
You can use Append and Insert for Standard Tables But u cannot use Append for Sorted or Generic Tables.. because it will apeend at end only..then the sorted order will be violated then u will get the shortdump..
so for sorted or generic type of tables u have to use Insert rather than Append...
Babu...
Edited by: venkoji babu on Feb 23, 2008 10:29 AM
02-23-2008 10:15 AM
with 'append'.appended record will save it on the end of the internal table.
with 'insert' record will be placed where ever u want.
02-23-2008 10:35 AM
Append:Can be used with Standard internal table.
Insert:Can be used with standard,hashed and sorted internal table.
append always adds entry at the end of internal table.
insert for standard tables adds at end or index specified.
for sorted and hashed it will add entry as per the key given.
please reward if useful.
02-23-2008 10:47 AM
Hi ,
- To add lines to internal table either by singly or groups
INSERT <WA> INTO TABLE <ITAB>
- To add several lines to an internal table
INSERT LINES OF <ITAB> [FROM <N1>] [TO <N2> ] INTO TABLE <ITAB2>
<ITAB1> AND <ITAB2> ARE TABLES WITH A COMPATIBLE LINE TYPES.
- APPEND <WA> TO <ITAB> :
or
APPEND lines of <itab1> to <itab2>.
Append only appends a record at Last in the itab and Insert using Insert statement can be done at any point
Thanx
Jagadeesh.G.
Edited by: Jagadeshwar Gollapelly on Feb 23, 2008 11:48 AM