Skip to Content
0
Former Member
Mar 13, 2007 at 05:10 PM

FOX formula to multiply 0calmonth to 0fiscper

206 Views

Hi experts,

I have a question regarding the FOX Formula using FOREACH.

I want to calculate the Gross Sales by multiplying the Price to the Quantity.

The problem is that the Price is stored in 0FISCPER and 0FISCYEAR while the Quantity is stored in 0CALMONTH and 0CALYEAR.

DATA CM TYPE 0CALMONTH.

DATA CY TYPE 0CALYEAR.

DATA FYP TYPE 0FISCPER.

DATA FY TYPE 0FISCYEAR.

DATA CU TYPE 0CURRENCY.

FOREACH CM, CM, FYP, FY, CU.

{ ZGRS #, #, FYP, K4, FY, ZCM1, 100, CU, # } =

{ ZQUANTITY, CM, CY, #, #, #, ZVRTC, 000, #, # } *

{ ZPRICES, #, #, FYP, K4, FY, ZPRI, 100, CU, GSP }.

ENDFOR.

Operand:{Key figure name, 0CALMONTH, 0CALYEAR, 0FISCPER, 0FISCVARNT, 0FISCYEAR, 0INFOPROV, 0VERSION, 0CURRENCY, ZPRICETYP}.

I tried to run the function and it does not work.

Then I also tried to run it with one foreach statement for every variable (it took longer) and it still does not work.

Can anyone help me to solve this problem?

Thank you a lot in advance.

Fen