In script logic something like local variable

Hi.
How can I replace CATEGORY.#PLAN with local variable to make impossible saving values of  CATEGORY.#PLAN into cube in the code below:
[CATEGORY].[#PLAN] = [CATEGORY].[FACT] * 2
[CATEGORY].[#FORECAST] = [CATEGORY].[#PLAN] * 10

Hi,
You can try using something like:
*WHEN CATEGORY
*IS FACT
   *REC(FACTOR = 20, CATEGORY = FORECAST)
*ENDWHEN
Hope this helps.

Similar Messages

  • OBIEE 10g - Can I use logical SQL to set variable?

    I am trying to set value of a session variable in the Advanced tab Prefix box of a request.
    Assigment of absolute value like this is working good:
    SET VARIABLE MYVAR=1;
    Can I set the variable using logical SQL? Something like:
    SET VARIABLE MYVAR = (SELECT table1.col1 from catname where table1.col2=1)
    Thanks in advance.

    Hi,
    You can create a session variable or dynamic variable in the RPD and try using it in here at the Advanced Tab prefix.
    But still check yourself if you need multiple values returning in the SQL statement.
    Hope this is helpful/ useful.
    Regards
    MuRam

  • Use of prompted hierarchy's base members in Script Logic

    Hello all,
    I have a data manager package which prompts the user for a dimension called P_BUDGET_MODEL. The prompt is SELECT hence the user selects a hierarchy node on this dimension.
    In the relevant Script Logic I have a variable %P_BUDGET_MODEL_SET%, which is automatically created by the system. I would like to run the logic for the basemembers of the hierarchy node.
    Please note - the basemembers are not direct children of the selected hierarchy node (i.e. the selected node is the "grandparent" of the basemembers).
    I tried the following simple logic command:
    *XDIM_MEMBERSET P_BUDGET_MODEL = BAS(%P_BUDGET_MODEL_SET%)
    It yielded a message that "Member BAS() does not exist".
    I have also noticed the following thread:
    [BPC 7.5 NW - HIER NODE in PROMPT using Formule in Package ?;
    If I understood properly it is not relevant to my case because the hierarchy is more that 2 levels deep.
    Any ideas?
    TIA
    Avihay

    Hi,
    As it seems after further investigation the problem is that I use "_" in the dimension names and variable names. This creates a problem to BPC in some cases.
    For example here there is no problem:
    *SELECT(%MODEL%,ID,P_BUDGET_MODEL,ID="%P_BUDGET_MODEL_SET%")
    Here there is a problem hence the use of [ ]
    *XDIM_MEMBERSET P_MONTH = BAS([%P_VERSION_SET%.YEAR].TOTAL)
    Here there is not "_" so the code is fine:
    *XDIM_MEMBERSET P_BUDGET_MODEL = BAS(%MODEL%)
    Strange yet seems that this was the problem...
    Avihay

  • How can I make general.useragent.locale variable

    In our domain we have different user languages. Windows adapts it's gui depending on the username they login with.
    We have configured Firefox settings through GPO's and build a pakcage with the FF GPO add-in included, with also the 5 different language packs included we use in our domain.
    We can switch manually the GUI language, but we are looking for a way to automate this, depending on the profile language.
    I know we can change the user.js file, but I was wondering if there is a way to automate this through GPO's.
    Something like a variable we can place in the general.useragent.locale that looks for the sytem language? Or another way to automate this?

    You should be able to do this via a mozilla.cfg autoconfig file.
    This file is run as JavaScript with full chrome privileges and can contain more advanced code, so you should be able to check the system language and set general.useragent.locale accordingly.
    *http://mike.kaply.com/2012/03/16/customizing-firefox-autoconfig-files/
    *http://mike.kaply.com/2012/03/22/customizing-firefox-advanced-autoconfig-files/
    I don't know how to get the system language setting, but you should be able to read registry keys and environment variables if necessary.

  • Create sequence, function and view all at once -script or something similar

    Hi I would like to know in what way can I write a script or something like that which would define names for a sequence, function and a view in the beginning (for example TEST_SEQ, TEST_FJ, TEST_VIEW...) and after that create this sequence, function and view with definitions like
    CREATE SEQUENCE  TEST_SEQ
    MINVALUE 1 MAXVALUE 999999999999999999999999999
    INCREMENT BY 1 START WITH 1 NOCACHE  NOORDER  NOCYCLE;
    create or replace FUNCTION TEST_FJ RETURN NUMBER AS
    tmp number;
    BEGIN
    select TEST_SEQ.NEXTVAL  into tmp from dual
    RETURN tmp;
    END TEST_FJ;
    and so on...
    In the end I would also like to grant some rights on these objects I just created:
    grant select on TEST_SEQ to public;
    grant execute on TEST_FJ to public;
    So my question is how to package all these things together so I can execute them from a single file in SQL Developer, and if i need to change the names of these tables I want do it in one place in the beginning of this script (or something like a script, I'm not sure what)...
    Thanks in advance!

    hi,
    hope help you...
    this is my basic generic solution...
    create or replace procedure createSequence( psequenceName in varchar2 ) is
    begin
    execute immediate 'create sequence ' || psequenceName ;
    execute immediate 'grant select on ' || psequenceName || ' to public ';
    end ;
    create or replace function getNextVal( psequenceName in varchar2 ) return number is
    queryText varchar2(100) := 'select <sequence_name>.nextval into :next_value from DUAL' ;
    next_value number ;
    begin
    queryText := replace(queryText,'<sequence_name>',psequenceName);
    execute immediate queryText into next_value ;
    return( next_value ) ;
    end ;
    Edited by: edogt on Nov 27, 2008 5:33 AM
    Edited by: edogt on Nov 27, 2008 5:35 AM
    Edited by: edogt on Nov 27, 2008 5:35 AM

  • Local variable default value

    Hi
    Just a quick question to get me out of a hole..... I am using local variable to control while loops, and based on a counter value, it turns it on or off. When i probe the value of the actual boolean, it comes up not exectuted, but the local indicator value is true???? is there any way to change this?? i need to to remain false, UNTIL it goes true!
    Cheers
    Peter
    Solved!
    Go to Solution.

    I think that "Ravens" has hit the nail on the head. Using unprotected shared resources (like local variables) in parallel will open the door to race conditions... the bane of any programmers life!
    Here are some useful resources which further explain this concept.
    Using a Local, Global, or Shared Variable in Parallel Loops Can Cause Race Conditions
    http://digital.ni.com/public.nsf/allkb/4F3CC921B4179F9F86256A3B0045CE2D
    Tutorial: Local Variable, Global Variable, and Race Conditions
    http://zone.ni.com/devzone/cda/tut/p/id/7585
    The first link also mentions the producer/consumer articeture and the semaphore. Both great solutions. However, correctly sequencing your source code (using things like error clusters) will help prevent this issue.
    Further more, I wonder if you are initialising your variables??
    You should write a value of false to the variable before you enter the main body of your code. This ensure that the first time you read from the variable it will return a known value (false). If you dont do this, the variable will return what ever was the last value written to it.
    Hope this has been useful.
    Rich R
    Applications Engineer
    National Instruments UK & Ireland

  • Local variable in script/MDX logic

    Is it possible to define a local variable which will hold a calculated value temporarily to be used later in the program?

    Hello,
    no, it's not possible to use such kind of variables in BPC for NW script logic.
    Hope this info will help u,
    Dzmitry

  • Use of Variable in Script Logic

    Dear All,
    We are working on a BPC Script Logic involving depreciation calculation, which calls an implementation of the BAdI BADI_UJ_CUSTOM_LOGIC. We are passing some parameters from the script logic to the BAdI. There are two parameters to be passed: an account number (Account in which the posting will happen), and the rate (rate with which depreciation will be affected). The parameters are stored in the Dimension member of the account dimension and need to be fetched from there. We are using the following piece of code to achieve this:
    *INCLUDE FUNCTIONS.LGF
    [#PERC] = PRO([%ACCOUNT_DIM%].CURRENTMEMBER,DEP_PERCENTAGE)
    [#DEPACCOUNT] = PRO([%ACCOUNT_DIM%].CURRENTMEMBER,DEP_ACCT)
    *START_BADI DEPR
    QUERY = ON
    WRITE = ON
    DEPACCT = [#DEPACCOUNT]
    PERCENTAGE = [#PERC]
    *END_BADI
    Here, FUCNTIONS.LGF contains the PRO function, which fetches the account and percentage properties from the account dimension member. Problem is, when we refer to the temporary variables within our code using the variables [#DEPACCOUNT] and [#PERC], we encounter a short dump for CX_SY_CONVERSION_NO_NUMBER. We suspect that instead of passing the parameter values, the logic is passing the variable name as the value. How do we rectify this? What is the correct syntax for passing such a parameter to the BAdI? Any ideas?
    Thanks in Advance,
    Sid

    Hi Ethan,
    Thanks for the answer. Unfortunately, even after trying out your solution with K2 variables, we are getting the same dump, this time the log says:
    An exception with the type CX_SY_CONVERSION_NO_NUMBER occurred, but was neither handled locally, nor declared in a raising clause
    The argument '%PERC%' cannot be interpreted as a number
    We are starting to think that maybe only substitution variables can be passed as parameter to the BAdI call, because whenever we use a local variable, we end up in passing the variable name to the BAdI, and not the variable value. We digged through the SAP Help, following is the excerpt from there:
    Run the following instruction to call custom ABAP programs: where filter_value_of_your_BADI_implementation is the name of the filter you provided during the BADI implementation of UJ_CUSTOM_LOGIC BADI.
    *START_BADI <filter_value_of_your_BADI_implementation>
    <key1> = <value1>
    <key2> = <value2>
    *END_BADI
    where filter_value_of_your_BADI_implementation is the name of the filter you provided during the BADI implementation of UJ_CUSTOM_LOGIC BADI.
    Does this mean we can only pass <key>:<value> pairs, and not <key>:<variable> pairs? Is there any instance / documentation which points to this (or the contrary)?
    Awaiting answers.
    Thanks and Regards,
    Sid

  • Reg: Script Logic - REC Statement Variable usage

    hi friends
    Pl find enclosed the following code:
    *WHEN TIME               
    *IS TMVL(-1,2011.04)               
    *WHEN ACCOUNT               
    *IS "EXP01"               
    *REC(EXPRESSION = [TIME].[2011.04]-%VALUE%,TIME = 2011.04,ACCOUNT = EXP01A)               
    *ENDWHEN               
    *ENDWHEN               
    The above code is working fine and result is extracted but i have hardcoded , ACCOUNT=EXP01A;
    My Query is follows:
    I have used
    *WHEN ACCOUNT               
    *IS "EXP01"
    In REC i want to use concatenation of "A" To account like EXP01&"A"
    i know accunt & i want to concatenate "A" and use in REC statement like assign to variable
    var1="EXP01" & "A" and use var1 in REC
    *REC(EXPRESSION = [TIME].[2011.04]-%VALUE%,TIME = 2011.04,ACCOUNT = var1)
    i am not sure the syntax (Whether we need to put in strings)
    Also if EXP02 then var1="EXP02"&"A" and so on
    In fact i want to make this for all members in Account Dimenstion as generalised.
    Pl. verify and suggest best possibility
    Thanx & Rgds
    Srinath

    Hi Krishna
    *XDIM_MEMBERSET ACCOUNT AS %ACC% = EXP01
    *WHEN ACCOUNT
    *IS %ACC%
    REC(EXPRESSION = %VALUE%2,TIME = 2011.04,ACCOUNT = %ACC%A)
    *ENDWHEN
    Is it required to add EXP01A as below?
    XDIM_MEMBERSET ACCOUNT AS %ACC% = EXP01, EXP01A
    Also In Generalized code you have mentioned:
    Instead of Hard Coding EXP01, EXP02 can i have hierarchy of all EXP , so that if any new account added in dimension, there will be no change in script logic. Pl. can you share how to use the same.
    If above code needs to be generalised, *FOR *NEXT can be used .
    *XDIM_MEMBERSET ACCOUNT AS %ACC_LIST% = EXP01,EXP02,EXP03,EXP04
    *FOR %ACC_MBR% = %ACC_LIST%
    *WHEN ACCOUNT
    *IS %ACC_MBR%
    REC(EXPRESSION = %VALUE%2,TIME = 2011.04,ACCOUNT = %ACC_MBR%A)
    *ENDWHEN
    *NEXT
    Rgds
    Srinath

  • Create local variable using labview scripting

    I am trying to use labview scripting to create a control and a local variable for that control.  I want both the local variable and the control contained inside a case structure.  My problems are twofold:
    1. the local variable is left blank/unnamed
    2. the local variable is wired outside of the case structure, even though I set it's owner to be the same as the owner for the control (which is placed inside the case structure).
    The flat panel is there because I thought that my problem might be a result of the local var being created before the actual control, so this just forces the control to be created first.  The other thing I wonder about is the VI Object Class for the local variable.  I have tried 'Node' and Control->Boolean, but neither worked.
    I have attached a jpg of the code I'm talking about.  The picture on thetop is of the code in question.  The picture on the bottom is of the resulting code that's created....
    Can anyone offer any help?
    Thank you...
    Attachments:
    vi_scripting_lv.png ‏95 KB

    The reason your locals aren't tied to a control, is because you didn't make a local variable from any control.  Use the Boolean reference wire and wire it to an Invoke Node and select the Create >> Local Variable method.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • Reading locale system properties like set-variables of a windows Client

    Hello,
    is there a possibility to read locale system properties like set-variables of a windows Client?
    We want to read path-Info and user-info. Can I perhaps user javascript?
    Best regards
    Oliver Prodinger

    Hi Oliver,
    This code will work (assuming the client approves running of ActiveX)
    <html>
    <script>
      var shell = new ActiveXObject("WScript.Shell");
      var env = shell.Environment("process");
      alert(env("COMPUTERNAME"));
      alert(env("USERNAME"));
    </script>
    </html> 
    You can't really run it from WD, but what you can do is run this code from a portal component (DynPage/JspDynPage) that is running in the same page as your WD application and pass data by using portal eventing.
    The portal component iview can have size of 1 pixel so it won't be seen...
    Regards,
    Omri

  • Using variables in script logic.

    Hi,
    I still haven't figured out how to assign a userdefined variable in a script.
    My case is that I in my script commits data several times, after every commit I need to do a new *XDIM_MEMBERSET. Every time the *xdim_memberset is exactly the same.
    Example - what I do now.
    *XDIM_MEMBERSET ACCOUNT="REVENUE"
    *XDIM_MEMBERSET VERSION="90"
    *rec
    *commit
    *XDIM_MEMBERSET ACCOUNT="REVENUE"
    *XDIM_MEMBERSET VERSION="90"
    *rec
    *commit
    Etc.
    It would be much easier, if I the beginning of each script for Account and Version defined a variable, and then having every *xdim_memberset use the variable. Then I only need to change the definition of the variable in the beginning of each script.
    Example - what I want to achieve.
    //Definition of constant variables.
    %ACCOUNT_VARIABLE%= "ACCOUNT = REVENUE"
    %VERSION__VARIABLE% = "VERSION=90"
    *XDIM_MEMBERSET %ACCOUNT_VARIABLE%
    *XDIM_MEMBERSET VERSION=%VERSION__VARIABLE%
    *rec
    *commit
    *XDIM_MEMBERSET %ACCOUNT_VARIABLE%
    +*XDIM_MEMBERSET VERSION=%VERSION__VARIABLE%
    *rec
    *commit
    I've looked at the *SELECT and *MEMBERSET - but can't really get the syntax to work.....
    Thank you,
    Joergen
    Edited by: Jørgen Dalby Andersen on Dec 30, 2011 7:58 AM

    Hi,
    when I use *XDIM_MEMBERSET ACCOUNT AS %TEST% = BAS(REVENUE) - it work fine.
    BUT ! after my first commit, it seems like the variable value is lost. And the *Xdim_memberset takes all.....
    Fortunately enough, *select still contains the variable value after *commit.
    Thanks,
    Joergen
    *Correction !
    It actually works, it still contains the variable value after commit !!
    Edited by: Jørgen Dalby Andersen on Dec 30, 2011 1:33 PM

  • Is possible to have a script that makes a text randomly have caps and lower caps... i would love to create a kind of effect so it would look like manuscript - but it cannot be only the same letter in caps or lower caps - I wOuld NeEd oF SOmeTHing LikE Thi

    Is possible to have a script that makes a text randomly have caps and lower caps... i would love to create a kind of effect so it would look like manuscript - but it cannot be only the same letter in caps or lower caps - I wOuld NeEd oF SOmeTHing LikE This (random) - is it possibel?

    Hi,
    Sample with 2 regex:
    Launching the 1rst regex:
    Launching the 2nd regex:

  • Variable in  script logic

    Follow is the script code from previous post
    *XDIM_MEMBERSET ACCOUNT = ACC1
    *FOR %My_Var% = %ENTITY_DIM%
    *WHEN ENTITY
    *IS *
    *REC(EXPRESSION = (GET (ENTITY = %My_Var%.PROP1)), ENTITY = %My_Var%)
    *ENDWHEN
    *NEXT
    I understand that  both %My_Var% and %ENTITY_DIM% are variables, my question is how %My_Var% and %ENTITY_DIM% get the value during the process of the code, do we neeed to define the variable some where else before we use them? I remeber in FOX, we need to define the variable before we can use it.
    also is there a difference if I use $My_Var$ to replace %My_Var%?

    nilanjan,
    Thanks for the explanation,I have another question regarding to the variables.
    I need to get the YTD salary. in BPS the pseudocode code is as following:
    data YTD_salary type amount
    loop at each_month,
       YTD-Salary =  YTD-Salary  + current_month.
       if the  YTD-Salary  > FICA CAP.
       exit.
    Endloop
    How can we archive the same in BPC script logic with a variable to capture the YTD-Salary and pass it to next month?

  • Declare a variable in script logic

    I want to declare variable in the beginning of the code , that i could use later on.
    something like.
    %fiscalYear% = "2010.INP"
    Bu i'm able to do that, and BPC documentation is not really helping.
    I'd appreciate any insight.
    Leandro Brasil

    Hi,
    For this, you need to use the select statement. Please refer to the below link:
    http://help.sap.com/saphelp_bpc75/helpdata/en/12/bddcd3f6ba42f1aeb0b500fca1b876/content.htm
    The variables declared in the select statement can be used later in the code also.
    Hope this helps.

Maybe you are looking for

  • OCR Text Recognizition

    Hello All, I am new to Acrobat and have been assigned a task which I believe requires the deep knowledge of Acrobat . We have thousands of PDF documents that contain the scanned documents in it. In other words, we scan the document and generate the P

  • 0FI_GL_14  - What is the latest Business Content Level

    Hi,      Can anyone tell me how to find out what the latest Business Content Level is where 0FI_GL_14 was updated? and if you could point me to that documentation it would be great help. Thanks!

  • Possible to change priority in FCP X

    in Compresor 4 I get the option of setting the job priority high, med, or low. Is there a way for me to do the same FCP X when I'm exporting/encoding using FCP X.

  • Sync Mail to .Mac

    I recently transfered all my emails from Entourage to Mac Mail. Everything transfered beautifully. I had set up a tree of folders of all emails grouped in to specific topics in Entourage and they imported to mac mail in the same format. These emails

  • Installing of older version possible?

    Is it possible to install an older program version than the currently avaliable (e.g. Acrobat X instead of XI)?