Skip to Content
author's profile photo Former Member
Former Member

IP Problem - Fox Formula - VARV with an hierarchy variable

Hello,

I would like to use the value of a variable but a hierarchy variable into a Planning function type formula

I use the code but the system give an error.

The first code :

DATA CHA_PF TYPE 0PROFIT_CTR.

CHA_PF = VARV(EVHAPF01, HIENM = PROFIT_CTR_BUDGET, VERSION= A).

The second code :

DATA CHA_PF TYPE 0PROFIT_CTR.

FOREACH CHA_PF IN VARIABLE EVHAPF01, HIENM = PROFIT_CTR_BUDGET, VERSION= A.

I have the same error message : Variable PROFIT_CTR_BUDGET is not available in an active version

The Profit Center hierarchie has the name PROFIT_CTR_BUDGET and it's active

The variable EVHAPF01 has the characteristics : Hierarchy Node, Autorisation, Single Value, Variable is Ready for Input

Could you please give me the correct code or the correct manipulation ?

Thank you

Edited by: Joël Vuillaume on Aug 19, 2009 5:12 PM

Edited by: Joël Vuillaume on Aug 19, 2009 5:15 PM

Edited by: Joël Vuillaume on Aug 19, 2009 9:50 PM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 06, 2012 at 11:38 AM

    You have to specify a variable for the hierarchy name, not the hierarchy name itself. In BEx Query Designer, go to 0PROFIT_CTR, Tab Hierarchy,click Select Hierarchy, Instead of "Hierarchy Name" create a "Hierachy Variable".

    You can set the name of your Hierarchy as default value.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      Please check sap note 1086496 . This would solve your issue.

      If you use hierarchy node variables in formulas, you must specify additional context information in the FOREACH statement. You must always specify the hierarchy name.

      To do this, write HIENM = 'Variable for the hierarchy names' as an additional argument.

      If the hierarchy is time-dependent, you must specify a variable for the time. To do this, write: DATETO = 'Name for the date variable'.

      If the hierarchy is version-dependent, you must specify a variable for the version. To do this, write: VERSION = 'Name for the version variable'.

      You must specify the information in the form of a global variable, that is, not with a variable that is defined as local in the formula. The syntax is as follows, for example:

      FOREACH GES IN VARIABLE HIERVARBER, HIENM = HIE_NAM_1, VERSION= HIER_VERS.

      The hierarchy is version-dependent in the example.

      In your case, create a variable for hierarchy PROFIT_CTR_BUDGET and use it in VARV and Foreach.

      Thanks,

      Reshma M.

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.