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

Append For sorted table??????????

Former Member
0 Likes
26,169

Can v use append statement for appending data in sorted table.

how???

please reply...

3 REPLIES 3
Read only

Former Member
0 Likes
6,954

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

Read only

former_member188827
Active Contributor
6,954

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.

Read only

ThomasZloch
Active Contributor
6,954

use

INSERT wa INTO TABLE itab.

for sorted tables. New line will be inserted according to table key.