‎2009 Sep 15 1:05 PM
All,
Anybody know how to sort a dynamically created internal table ?
I've got this dynamic table with 3 fields
VBELN POSNR MATNR
and would like to sort this ?
normally it's sort int_table by vbeln posnr matnr but that's not working with a dynamic table
Any idea's ?
Regards
‎2009 Sep 15 2:23 PM
Hi msapsdn,
you are excused if you are not at ECC600/SAP_BASIS 700. Dynamic sort was mot defined before.
Regards,
Clemens
Edited by: Clemens Li on Sep 15, 2009 3:23 PM
‎2009 Sep 15 1:15 PM
just press F1 on sort. you will get your answer.
sort <itab> by (otab).
‎2009 Sep 15 2:23 PM
Hi msapsdn,
you are excused if you are not at ECC600/SAP_BASIS 700. Dynamic sort was mot defined before.
Regards,
Clemens
Edited by: Clemens Li on Sep 15, 2009 3:23 PM
‎2009 Sep 15 3:14 PM
I tried it with a table as "sort by" but that didn't work
done it like this now
g_sort_field1 = 'VBELN'.
g_sort_field2 = 'POSNR'.
g_sort_field2 = 'MATNR'.
sort <dynamic_table>
by (g_sort_field1) (g_sort_field2) (g_sort_field3)
and that seems to work, also for the delete adjacent duplicates