‎2008 Mar 26 12:14 PM
Can v use append statement for appending data in sorted table.
how???
please reply...
‎2008 Mar 26 12:19 PM
Hi,
Yes, you can.
*If the target table itab is a SORTED TABLE, it must be sorted correctly after the append, otherwise a runtime error results.
After the statement has been executed, the system field SY-TABIX is filled with the index of the last line in the table*.
Defines the table as one that is always saved correctly sorted. Key access to a sorted table uses a binary key. If the key is not unique, the system takes the entry with the lowest index. The runtime required for key access is logarithmically related to the number of table entries.
You can also access sorted tables by index operations. When you insert using an index, the system checks to ensure that the sort sequence has been correctly maintained. For this reason, it takes longer than inserting entries in a standard table. As a rule, you should only access sorted tables using their key.
Thanks,
Sriram Ponna.
Edited by: Sriram Ponna on Mar 26, 2008 5:52 PM
‎2008 Mar 26 12:30 PM
you should avoid using append for sorted tables.
Append adds record to end of internal table.if sorting is violated coz of this,u'll get runtime error.
plz reward points if dis helps.
‎2008 Mar 26 12:32 PM
use
INSERT wa INTO TABLE itab.for sorted tables. New line will be inserted according to table key.