Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Dynamic sort ascending / descending

Hi all,

I am trying to sort an internal table dynamically.

In this table I have a number of field to use for an ascending sort and other used to sort descending.

I have writen the code to create two fields (character field) in which I concatenate the sort field names.

The result is :

sort_field_up = ' field1 field2 field 3'

sort_field_dn = ' field4 field5 field 6'

and then i coded :

sort itab by (sort_field_up) ascending (sort_field_dn) descending.

But I get a dump ...

has anyone ever done this ?



Former Member
Not what you were looking for? View more on this topic or Ask a question