‎2007 Aug 16 10:20 AM
‎2007 Aug 16 10:23 AM
ofcourse there is Keyword SORT
SORT Itab by fieldname.
Regards,
Reema.
‎2007 Aug 16 10:27 AM
Hi,
There is no specific keyword for unsort. Only thing you can do is sort with a field different from the field which you dont need to be sorted.
For ex if you have fields X and Y and you have already sorted with X, then try sorting with Y if you dont want the field X to be sorted.
This will change the order of the sort.
But as such you cant get back unsorted data.
Regards,
Yogesh
‎2007 Aug 16 10:24 AM
first identify u'r criteria for unsort, then apply SORT statement with that criteria.
cheers
S@meer
‎2007 Aug 16 10:25 AM
Simple just take out the SORT statement from your program is a logical answer. right??
Regards
Gopi
‎2007 Aug 16 10:25 AM
hi,
make the copy of original internal table and then sort the copied one and use. in this manner u will be able to access both sorted and unsorted internal table.
reward points.
regards
Abhilasha
‎2007 Aug 16 10:26 AM
hI Anu
suppose if u r internal table is sorted on first field , if u want to it as a unsorted then the internal table on another field......
is this is ur req?
reward points to all helpful answers
kiran.M
‎2007 Aug 16 10:26 AM
Why would you want to do that?.. why cant you just not sort it..?
explain the scenario..
Aparna
‎2007 Aug 16 10:31 AM
I am reading a file from application server into an internal table and sorting the internal table to calculate the opening balances and closing balances and paassing the file to standard SAP program.
The requirement here is to maintain the file as it is from the application server.
but for calculating using AT NEW account i need to sort it.
Thanks,
Aruna.
‎2007 Aug 16 10:37 AM
Hi ,
one option is , create one index field in that internal table and put a counter on it , after doing all ur calculations based that counter sort out ur final internal table.
data: n type sy-index.
n = 0.
loop at itab1.
move-corresponding itab to itab1.
itab-count = n.
n = n + 1.
endloop.
do something.
and sort based on that count.
Regards
Peram
‎2007 Aug 16 10:34 AM
make a copy of the table before sorting..
then loop throught the sorted table after calculating the balances and modify the unsorted table wherever necessary..!!
Regadrs,
Aparna