‎2009 Jan 18 10:42 AM
Hi
i want to sort an internal table ascending by some fields if any to records matches then sort in descending order by some other fields,
please help me to do this.
Thankas&Regards,
venkat
‎2009 Jan 18 10:49 AM
‎2009 Jan 18 10:55 AM
hi see thse threads
U can sort by specifying ascending and descending on seperate fields in same statements but not sure abt the condition thing u mentined so see these threads
in the above thread somebody ahs given suggestion to use
C140_TABLE_DYNAMIC_SORT
U can try it, i cannot try it now as i am not on sap right now.
Edited by: kartik tarla on Jan 18, 2009 4:35 PM
‎2009 Jan 18 10:56 AM
HI ,
the syntax for sorting an internal table .
sort itab by <field name> ascending.
sort itab by <field name> descending.
regards
chinnaiya
‎2009 Jan 18 7:14 PM
Hi Venkat, I saw your last posts and I advise you to be more accurate in your questions (for example, give initial data and expected result) AND close your threads with a feedback, so that you may receive accurate answers in the future ; read [rules of engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
‎2009 Jan 19 4:24 AM
Hi,
First sort internal table abter that use 'AT' commads and modify as per your requirement.
Regards
Md.MahaboobKhan