Skip to Content
-2

advanced sort of internal table

Nov 30, 2017 at 06:36 PM

48

avatar image
Former Member

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)
10 |10000 characters needed characters left characters exceeded

You say "atzhl descending", but the Excel picture says "atzhl ascending".

0
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Sandra Rossi Nov 30, 2017 at 08:28 PM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
Mike Pokraka Nov 30, 2017 at 06:50 PM
0
Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

thanks, but this will not work i think. I need it sorted as on the excel screenshot, meaning F2 descending, BUT only where there is more than 1 entry. Maybe i could use "loop at.. group by" or something like that.

0

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

0