3 Replies Latest reply: Jun 26, 2012 7:56 AM by Andrey Uryukin RSS

Not able to read data in FOX formula

Christoffer Owe
Currently Being Moderated

I have a relatively complex FOX formula reading both prices, quantities and opening balances (both as amounts and as quantities). To do this I realized I had to include both 0UNIT and 0CURRENCY in the fields to be changed, because otherwise the amounts and quantities were put in separate blocks of data.

 

Because of limited testdata, there is only one block of data. When executing the function, it says it reads 27 records, which is as expected. However none is changed or generated. I'm using MESSAGEs for debugging, and thus I figured out that I get no values. I'm simply not able to read any value. All values appears to be zero. I execute the function with trace in the planning modeler. I see the 27 records in the block and they do contain the expected values, But when reading the values in the FOX formula, I only get zero.

 

I am printing the values with this syntax:

DATA KYF_TMP TYPE F.

 

KYF_TMP = {0QUANTITY,#,001,BOE,"BW2100"}.
MESSAGE I001(Z0001) WITH KYF_TMP.
KYF_TMP = {0QUANTITY,#,001,BOE,"BV2100"}.
MESSAGE I002(Z0001) WITH KYF_TMP.
KYF_TMP = {0AMOUNT,NOK,000,#,"BX2100"}.
MESSAGE I003(Z0001) WITH KYF_TMP.

 

The syntax is:

{Key figure name, 0CURRENCY, 0FISCPER3, 0UNIT, Z00GLACCN}

 

I suspect the issue has something to do with the currency and unit, although I can see nothing wrong. From the records in the block from the trace, I see all records either include an amount and a currency (which is always NOK) or a quantity and a unit (which is always BOE).

 

Please note: We are using an account model, and the Z00GLACCN is identifying different types of amounts and quantities.

 

Any ideas why I'm not able to read the values?

 

Regards,

Christoffer Owe

Actions