‎2008 Nov 03 7:17 AM
Hello experts,
i wat to sort internal table in asscending order and am using the code as follows,
APPEND wa_final TO it_final.
sort it_final by edatu vbeln ASCENDING.
am getting output as 05.09.2008
10.09.2008
27.08.2008
but i want in 27.08.2008
05.09.208
10.09.2008
please help me ASAP.
Thanks,
vino....
‎2008 Nov 03 9:32 AM
Hi,
sort only with date , not with VBELN.
U will get the correct answer.
Thanks and Regards
Ganesh Reddy
‎2008 Nov 03 7:21 AM
Hi
I think you uploaded date field as your output format. If it is in ddmmyyyy format, when you sort it, automatically it will sort. Check your input entries.
Otherwise, what you had written is correct.
check your code
Regards,
Dhanunjaya Reddy.
‎2008 Nov 03 7:24 AM
Is your edatu field TYPE CHAR10 or sy-datum.
It has to be type sy-datum to be sorted properly.
‎2008 Nov 03 7:25 AM
Change your SORT statement as below
sort it_final by edatu ASCENDING vbeln ASCENDING.
‎2008 Nov 03 9:32 AM
Hi,
sort only with date , not with VBELN.
U will get the correct answer.
Thanks and Regards
Ganesh Reddy
‎2008 Nov 03 11:14 AM
hi vinoth,
if u make the format of the field edatu as YYYYMMDD and den put the sorting conditon on it.. then it will sort correctly.. rest vbeln is not a problem. beacuse if u have more than one similar date entry u have to sort it thru vbeln too..
so just try changing format..
regards
palak
‎2008 Nov 03 11:19 AM
Write as sort it_final by vbeln edatu ASCENDING.
Regards
Sandipan
‎2011 Aug 17 5:58 AM
Assigned the date fied to char and then sorted then it works fine.
‎2020 May 13 9:18 PM
Hi anindya12
I propose you create a new question for your issue, as this one has been already marked as answered.
regards,
Mateusz