07-06-2006 8:22 AM
07-06-2006 8:23 AM
I don't think it's possible. You can appending the entries in a sorted way. But when you enter another record that not fit the sorting, you have to sort it with the sort statement.
Why can't you use the sort statement ?
regards
Hans
Message was edited by: Hans Senden
07-06-2006 8:25 AM
y r u not want to use sort...
it is very simple to write .
sort itab....
07-06-2006 8:24 AM
Hi,
When retrieving the data from the database table into internal table, use order by clause to sort the contents,
Rgds,
07-06-2006 8:31 AM
07-06-2006 8:31 AM
DECLARE A SORTED INTERNAL TABLE.
DATA : ITAB TYPE SORTED TABLE OF MARA WITH UNIQUE KEY MATNR.
Now, whatever data you are inserting into ITAB will be SORTED automatically.
You CANNOT use APPEND statement with SORTED tables, have to use INSERT statement. You don't have to use the SORT statement.
regards,
Ravi
Note : Please mark all the helpful answers and close the thread if the issue is resolved.
07-06-2006 8:33 AM
hi,
you can declare your itab as sorted table.then it will be automatically sorted with out sorting it.you can do this way...
data: itab type sorted table of mara with non-unique key matnr.
Regards
vijay