2007 Jul 18 1:25 PM
I have an internal table containing date field. Now i want to sort this internal table in ascending order by date field so that I get the latest date as the last record in the internal table.
2007 Jul 18 1:27 PM
use sort by date.
default sorting is ascending so no need to specify.
also refer the following link
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3800358411d1829f0000e829fbfe/content.htm
regards,
srinivas
<b>*reward for useful answers*</b>
2007 Jul 18 1:27 PM
2007 Jul 18 1:27 PM
2007 Jul 18 1:35 PM
I ALREADY TRIED DOING THAT.
THIS IS THE COMMAND WHICH I GAVE
SORT ITAB_QTY1 BY BUDAT
BUT THERE IS NO EFFECT.
2007 Jul 18 1:28 PM
2007 Jul 18 1:28 PM
Hi,
Just use the command SORT itab by <date_field>.
Hope it is useful.
Thanks,
Sandeep.
2007 Jul 18 1:28 PM
Hi,
Say ur date field is i_date in the internal table itab.
sort itab by i_date.
this would solve ur problem.
Rewards points if this helps,
Kiran
2007 Jul 18 1:38 PM
I already tried doing this.
My itab name is itab_qty1 having date field budat.
The command which i gave was
SORT ITAB_QTY1 BY BUDAT.
But there is no effect
2007 Jul 18 1:44 PM
hi,
put a breakpoint, before the sort and after the sort....
chk whether control is coming there,
then chk whether all dates are the same....
With regards,
S.Barani
2007 Jul 18 1:51 PM
2007 Jul 18 1:28 PM
Hi
SORT that Internal table by date
<b>sort itab by date.</b>
<b>Reward points for useful Answers</b>
Regards
Ashu
2007 Jul 18 1:30 PM
hi,
SORT ITAB ASCENDING BY DATE.
(or)
SORT ITAB DESECNDING BY DATE.
With Regards,
S.Barani