Skip to Content
0
Former Member
Feb 15, 2011 at 03:47 PM

FOX Formula to create a record

241 Views

Hello friends.

Let me share the business scenario to ask you how to write a FOX formula to perform the action.

There is a planning cube containing characteristics: 0MATERIAL, ZMATERIAL, 0PLANT, 0CALDAY, ZTYPE and Key Figures ZSALES and ZSAL. In original record ZSAL is empty and ZTYPE contains always constant 'S'. I would like to write the formula that works like this: If 0MATERIAL <> ZMATERIAL create a record which contains ZTYPE = 'D' and ZSAL = ZSALES. The rest of characteristics remain the same.

For example, original record:

MATERIAL, ZMATERIAL, 0PLANT, 0CALDAY, ZTYPE, ZSALES, ZSAL

MAT01, MAT17, 1000, 24.12.2010, S, 500, 0

MATERIAL <> ZMATERIAL, then the new record should be:

MATERIAL, ZMATERIAL, 0PLANT, 0CALDAY, ZTYPE, ZSALES, ZSAL

MAT01, MAT17, 1000, 24.12.2010, D, 500, 500

To be honest I am lost.

Thank you in advance for any help on this.

Cheers,

A.