Skip to Content
avatar image
Former Member

advanced sort of internal table

Hi there,

maybe a noob quastion, butcan someone help out please on how to sort the internal table from this:

to this :

Basically i need to sort by ADZHL descending ( and atzhl descending ) but only for the entries which have the same ADZHL.

Many thanks . )

image-7.png (6.3 kB)
image-6.png (9.0 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Nov 30, 2017 at 08:28 PM

    The requirement makes no sense from my point of view, it's impossible to have a list with 2 different sorting rules. See this example, and tell me what should be the order!

    300  9 1
    300 13 1
    300 13 2
    300 11 1
    300 10 1
    300 10 2
    300 14 1
    300  6 1
    300  6 2
    300 15 1

    You should ask the real functional rules (written text of what the user wants), not an example from which we should deduce the exact rule.

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 30, 2017 at 06:50 PM
    Add comment
    10|10000 characters needed characters exceeded

    • OK, then your description and example weren't entirely clear so I just looked at the red box. 'Sort something but only if it's the same' doesn't make sense. You also write atzhl descending but your excel example is ascending.

      As I now understand, you want to selectively apply a sort only to the rows that are part of a multiple occurrence of F2?

      I am not sure if this can be done in one go, I would need to spend some time with this on a system. Unfortunately I have neither right now.

      But as a starting point I would suggest looking at REDUCE, with which you can count how many F2's per F1 there are. It's quite versatile, but beware you can lose hours playing with it. :-)

      See Horst's blog I Don’t Like REDUCE, I Love It