Skip to Content
0
Former Member
Apr 07, 2014 at 08:43 AM

Fighting with FOX Formula

530 Views

Dear Community,

I am facing an Issue I was not able to solve for the last few days.

Just to make sure you understand, I will describe what we are going to do with the function.

We want to plan Data(with Integrated Planning in BW) for the next year with existing values. (e.g. Turnover 2013 -> Turnover 2014).

While doing this we want to enter a contract number that is written into the characteristics of year 2014.

The Problem is, that the contract is only valid for specific levels of the company. That’s why it is important, that only those records get copied that are really necessary for the contract.

I will show you how our process should look.

Step 1.

We create Masterdata for a contract.

The structure of the InfoObject “Contract” is the following:

ID | NAME | ORGANIZATIONAL UNIT (ID)

1 | Contract January | Germany (ID =100)

The attribute “Organizational Unit” has its own Hierarchy.

Step 2.

Let’s say we want to plan the total turnover of a contract, depending on existing keyfigures from last year. (Copy 2013 -> 2014).

Data is in the Cube and everything is in planning mode.

We have all actual data set to 0VTYPE = 010.

All the Plan Data should get 0VTYPE = 020.

So here comes the challenge.

We want to plan data via a Button, and an entry variable where we can enter the contract name.

Data has only to be planned for the specific Organizational Unit (and children in Hierarchy) in the Masterdata.

The problem is that if we have data without an existing contract, we cannot set the contract for the right Organizational Units.

Let’s assume we have a table displayed as the following:

CONTRACT | ORGANIZATIONAL UNIT | TURNOVER YEAR 2013 | PLAN TURNOVER YEAR 2014

# | 100 (Germany) | 50.000 € | (NULL)

# | 110 (Region West) | 10.000 € | (NULL)

# | 112 (Cologne) | 2.000 € | (NULL)

# | 200 (Spain) | 60.000 € | (NULL)

Organizational Unit 100 is the mother node of 110.

110 is the Mother Node of 112.

So in fact 110 is a child of 100 and 112 is a grandchild of 100.

Organizational Unit 200 is an independent organizational unit.

So what should happen if we enter a contract within the Popup in the Webtemplate:

The function should write a new record with values from turnover 2013 in the field PLAN TURNOVER YEAR 2014 and enter the contract number ONLY for the organizational unit that is attached as an attribute of the contract AND all his children and grandchildren.(In this case Org. Unit. 100, 110, 112)

The outcome of it should be the following.

CONTRACT | ORGANIZATIONAL UNIT | TURNOVER YEAR 2013 | PLAN TURNOVER YEAR 2014

1 | 100 (Germany) | 50.000 € | 50.000

1 | 110 (Region West) | 10.000 € | 10.000

1 | 112 (Cologne) | 2.000 € | 2.000

# | 200 (Spain) | 60.000 € | (NULL)

We tried a couple of things but nothing worked.

Our approach was the following.

We created a Customer exit Variable for the Org. Unit that collects all the organizational units in the hierarchy that are children or grandchildren of the Org. Unit of the contract.

The Variable gets filled with e.g. 3 Values that should get passed on to the FOX Formula.

But we always get an error saying that the Variable can only handle single values.

The Variable is defined as following:

Customer Exit, Characteristic: Organizational Unit, many single values, not input ready.

If we use the standard copy function something weird happens.

Let’s say we have 500 Records in our Cube.

The function creates a value for every 3 organizational units.

So at the end we have 1500 records.

Does anyone have a clue how this issue can be solved?

Any help appreciated!

Cheers

Christoph