Skip to Content

How to use global variable defined in planning area in FOX

Hi guys

I meet a situation that needs to use variables defined in planning area in FOX.How to code?

My situation as follows:

Two variables are defined in planning area,one is zcomp_code,the other is zfiscyear.

There are two key figures in the planning area,one is sales volume,the other is delta(%).

I want to use sales volume multiplied by delta(%) in selected zcomp_code and zfiscyear by users.

Anyone can help?

Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 07:50 AM

    Hi

    Create local variables in FOX for these two variables.

    comp_code = VARV(zcomp_code)

    fiscyear = VARV(zfiscyear)

    These two statements will retrieve the values selected by user,

    Regards,

    Bindu

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 07:25 AM

    Hi,

    In addition to the above, you may have to define your variables as type the characters, preferably on which the global variables are created.

    For the 2 keyfigures, check the data type tab in the adjacent panel and select a suitable type.

    Use these variables as in any normal calculation to obtain the values you require and assign it to the desired keyfigure.

    Hope this clarifies...

    Regards,

    Aby

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 30, 2008 at 04:46 PM

    Hi Eric

    check this example

    in fox you shoud declare your data and after call your variable

    after this you could easily operate on data using the f4 for definig the right fox operators

    DATA FYEAR TYPE 0FISCYEAR.

    FYEAR = VARV(PLANYEAR).

    {0COPANETRV, FYEAR,CRA,020} =

    {0COPANETRV,FYEAR,CRA,020} *

    ({ 0CP_DELTAB,FYEAR,CRA,020} + 100 ) /100.

    {0CP_DELTAB,FYEAR,CRA,020} = 0.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.