This website is not affiliated with, sponsored by, or approved by SAP AG.

FOX Formula does not work - Please help

All postings related to SEM only

Moderators: Snowy, thx4allthefish

FOX Formula does not work - Please help

Postby Guest » Sun Jun 12, 2005 3:25 am

I have the following scenario:

Planning area - ZA Infocube - ZCUBE1
Planning Area - ZB Infocube - ZCUBE2
Multi Planning Area - ZC


ZCUBE2 is a tr cube.

I have defined a level against ZC and a Planning function of formula and all I am doing in the planning function is using FOX to copy values from one cube to the other and while copying I want to modify the key figures with a formula.

The strcuture of ZCUBE1 and ZCUBE2 are the same. It as the following values:

0fiscper
0fiscvarnt
0comp_code
0plant
0amount
0quantity


The system is indicating that it expects the values in the following form:
{0FISCPER, 0FISCVARNT, 0PLANT, 0COMP_CODE, 0AMOUNT, 0QUANTITY, PlanningArea}


So I specified the following FOXCODE:

DATA FISCPER LIKE 0FISCPER.
DATA FISCVARNT LIKE FISCVARNT.
DATA PLANT LIKE 0PLANT.
DATA COMP_CODE LIKE 0COMP_CODE.
DATA AMOUNT LIKE 0AMOUNT.
DATA QUANTITY LIKE 0QUANTITY.


{FISCPER, FISCVARNT, PLANT, COMP_CODE, AMOUNT, QUANTITY, ZB} =
{FISCPER, FISCVARNT, PLANT, COMP_CODE, AMOUNT, QUANTITY, ZA}



still it complains it does not know the planning areas ZA and ZB so I changed the code as follows:

{FISCPER, FISCVARNT, PLANT, COMP_CODE, AMOUNT, QUANTITY} =
{FISCPER, FISCVARNT, PLANT, COMP_CODE, AMOUNT, QUANTITY}


Now it works with error. Except that when I run the function it sayg 5800 record read 0 changed.

All I want to begin with is read a record from ZA and write to ZB and then I want to change AMOUNT = AMOUNT + ( AMOUNT * 0.1 ).

FOX is not letting me do this also next I want to change something like this

CONCATENATE FISCPER(4) '2005' to FISCPER.

that is change all 2004 fiscal periods as 2005 fiscal periods.

So more or less I want to do the same what I do in a update rule. Somehow it is not letting me do it.

Appreciate help in this code. How can I read the data from one Planning area and write to the characteristics or key figures in the other planning area.

Thanks
Charlotte
Guest
 

Postby Chirag Savla » Mon Jun 13, 2005 3:40 am

Hi

U can try to use the std. copy func to copy data from one cube to other. It will also enhance performance as compared to FOX. Then u can use FOX to change the KF value. To change the Fiscal year u may use repost function.

Create a sequence of all the above three functions to get the result.

Basis my experience with BPS i can say that the performance in std func is better than FOX and one shld try to use the std func to the extent possible.

Chirag Savla :lol:
Chirag Savla
 
Posts: 134
Joined: Wed Sep 01, 2004 6:12 am
Location: India

Postby Guest » Mon Jun 13, 2005 10:22 am

Hi,
Please include planning area ZB only in the level and it should work.
Let me now.
Thanks
Sekar
Guest
 

Postby Guest » Mon Jun 13, 2005 6:50 pm

Can you please advise how using the FOX I can get the above to work. Please note I know to use the copy and repost function. I am just wondering as a academic exercise what is wrong with the above code and how I can get it to work.

It puzzles when it says 0 records updated why it is not updating data.

Thanks
Charlotte
Guest
 

Re: FOX Formula does not work - Please help

Postby Guest » Sat Dec 24, 2005 7:32 pm

Anonymous wrote:I have the following scenario:

Planning area - ZA Infocube - ZCUBE1
Planning Area - ZB Infocube - ZCUBE2
Multi Planning Area - ZC


ZCUBE2 is a tr cube.

I have defined a level against ZC and a Planning function of formula and all I am doing in the planning function is using FOX to copy values from one cube to the other and while copying I want to modify the key figures with a formula.

The strcuture of ZCUBE1 and ZCUBE2 are the same. It as the following values:

0fiscper
0fiscvarnt
0comp_code
0plant
0amount
0quantity


The system is indicating that it expects the values in the following form:
{0FISCPER, 0FISCVARNT, 0PLANT, 0COMP_CODE, 0AMOUNT, 0QUANTITY, PlanningArea}


So I specified the following FOXCODE:

DATA FISCPER LIKE 0FISCPER.
DATA FISCVARNT LIKE FISCVARNT.
DATA PLANT LIKE 0PLANT.
DATA COMP_CODE LIKE 0COMP_CODE.
DATA AMOUNT LIKE 0AMOUNT.
DATA QUANTITY LIKE 0QUANTITY.


{FISCPER, FISCVARNT, PLANT, COMP_CODE, AMOUNT, QUANTITY, ZB} =
{FISCPER, FISCVARNT, PLANT, COMP_CODE, AMOUNT, QUANTITY, ZA}



still it complains it does not know the planning areas ZA and ZB so I changed the code as follows:

{FISCPER, FISCVARNT, PLANT, COMP_CODE, AMOUNT, QUANTITY} =
{FISCPER, FISCVARNT, PLANT, COMP_CODE, AMOUNT, QUANTITY}


Now it works with error. Except that when I run the function it sayg 5800 record read 0 changed.

All I want to begin with is read a record from ZA and write to ZB and then I want to change AMOUNT = AMOUNT + ( AMOUNT * 0.1 ).

FOX is not letting me do this also next I want to change something like this

CONCATENATE FISCPER(4) '2005' to FISCPER.

that is change all 2004 fiscal periods as 2005 fiscal periods.

So more or less I want to do the same what I do in a update rule. Somehow it is not letting me do it.

Appreciate help in this code. How can I read the data from one Planning area and write to the characteristics or key figures in the other planning area.

Thanks
Charlotte
Guest
 

fox code problem

Postby debasish » Fri Jan 27, 2006 4:45 am

Hello Dude,

U just change the data type declaration for amount and quantity into type F then i hope it will work fine.

Bye
Debasish :)
debasish
 

Re: FOX Formula does not work - Please help

Postby bturner23 » Wed Oct 27, 2010 3:06 pm

Debashish's reply above is correct--I tried it in a sandbox and it worked.

Instead of multiplying a quantity in a FOX formula, I often prefer to use the "Revaluation" function type, since it keeps the mantainance of that multiplication value in a more easily maintainable table.
bturner23
 
Posts: 1
Joined: Wed Oct 27, 2010 3:00 pm


Return to SEM

Who is online

Users browsing this forum: No registered users and 2 guests





loading...


This website is not affiliated with, sponsored by, or approved by SAP AG.