Skip to Content
0
Former Member
Oct 13, 2005 at 01:26 PM

How is buffer data sorted in FOX FOREACH-loop?

306 Views

Hi everybody,

I would appreciate some help on the following.

I need to create a historical mean by time period by company code. The number of historical data points is unknown.

A loop "FOREACH co-co 0FISCPER..." will sort the buffer data by co-co and 0FISCPER. My question refers to the sort logic of this data.

I have noticed that the loop:

processes the co-co's in a ascending order (by technical key) going through the FISCPERs from the oldest to the most recent.

Example:

FOREACH iteration

1: co-co 4711 fiscper 1.2005

2: co-co 4711 fiscper 2.2005

3: co-co 4711 fiscper 3.2005

4: co-co 4712 fiscper 1.2005

5: co-co 4712 fiscper 2.2005

6. etc.

Can I rely on that this will always be the case?

Or could it be that the sort order sometime is ascending and sometime is descending? In which case the above example could look like this (if co-co is ascending and FISCPER descending).

1: co-co 4711 fiscper 3.2005

2: co-co 4711 fiscper 2.2005

3: co-co 4711 fiscper 1.2005

4: co-co 4712 fiscper 2.2005

5: co-co 4712 fiscper 1.2005

6. etc.

I saw some documentation on this sometime back, but have been unable to find it again. Does anyone know where this sorting logic is documented? Thanks for any help.

Martin