‎2007 Jul 15 1:20 PM
‎2007 Jul 16 2:09 AM
Hello,
Eaxmple, your ITAB has following fields.
ITAB,
field01,
field02,
field03,
.............
..............
Dynamic sorting:
DATA: filedname01(10),
filedname02(10),
MOVE 'FIELD02' to filedname01.
MOVE 'FIELD01' to filedname02.
SORT ITAB BY (fieldname01) (fieldname02).
-
>this is same as:
SORT ITAB BY FIELD02 FIELD01.
Here you are specifying the sorting order at run time by moving the field name to the varibale filedname01 & fieldname02.
What is filedname01 & fieldname 02 is blank at run time ?
-Sorting on that field is innored.
Example:
MOVE space to filedname01.
MOVE 'FIELD01' to filedname02.
SORT ITAB BY (fieldname01) (fieldname02).
-
> this is same as:
SORT ITAB BY FIELD01.
Regards,
A.Singh