Sometimes you need to sort table maintenance before display, this is simple method to do that.

1.Go to SE11 Open your table, go to menu Utilities-> Table Maintenance Generator.

2. Go to Environment -> Modification -> Maintenance Screens

sort table maintenance abap 1

3.Create one module in PBO.

4. Write this ABAP Code in module sort_extract.