HSGetValue and substitution variables

Hi volks,
is it possible to use the SmartView Hsgetvalue/HSSetValue with substitution variables  like &CurrFC  etc..
any examples (Syntax) ?
Thanks in advance
M

user11956030 wrote:
Hello everyone i'm having a little trouble on using define command for a hw assignment.
Here is what is needed:
1)Use the DEFINE command to define a variable sal and initialize it to 6000
2)In the declarative section declare two variables: ename of type employees.last_name and emp_sal of type employees.salary. Pass the value of the substitution variables to emp_sal.
Here is what i put in and it doesn't work:
SET SERVEROUTPUT ON
SET VERIFY OFF
DEFINE sal=6000
DECLARE
ename emp.last_name%TYPE;
emp_sal emp.salary%TYPE;
emp_sal = &sal;
BEGIN
END;
Thanks for the help.The assignment operator in PL/SQL is :=, with a colon first.
Change:
emp_sal = &sal;to
emp_sal := &sal;Also, a stand-alone assignment statement like that can not be in the DECLARE section. Put it after BEGIN.
It is allowed to assign a value when you declare a variable, like this:
emp_sal emp.salary%TYPE := &sal;but it is not allowed to have an empty BEGIN section. If you want to assign the value in the DECLARE section, then put something (anyhting, at least for now) in the BEGIN section.
For example:
DECLARE
     ename     emp.last_name%TYPE;
     emp_sal emp.salary%TYPE          := &sal;
BEGIN
     dbms_output.put_line (  TO_CHAR (emp_sal)
                    || ' = emp_sal at start of BEGIN section'
END;
/= (without a colon) is the PL/SQL (and SQL) equality operator . You can use it in constructions like this:
IF  emp_sal = &sal 
THEN
END IF; Edited by: Frank Kulash on Nov 30, 2009 7:26 PM

Similar Messages

  • Financial Reporting and substitution variable

    Hello,
    i have a problem with FR and substitution variable. I create the substitution variable in Essbase for example antYear but i dont'see in dimension layout in FR studio and workspace.
    Thanks.

    You'll need to restart FR studio, after you have created the substitution variables. As the studio only performs one read of the sub var database on startup.
    It also won't show up unless you assign a member to it.
    Hope this helps.
    Iain

  • Issue with rule file and Substitution variable

    Hi All,
    I am using Essbase 9.3.3
    I created a rule file with 5 dimensions in which 3 dimensions I defined in columns and two dimensions I gave it as header in data column with comma seperated.
    Among those two dimension members, one is an account member with "/" in it within quotes and other is a substitution variable.
    The member assigned for that Substitution variable has a space in between and is updated within quotes in variables list.
    When I try loading data, I am getting an error saying that two members are not valid.
    Eg: "Tax/Unit",&Scenario is not valid.
    &Scenario - "Budget Q1"
    Can some one please suggest on the issue.
    I am not facing any problem in calc scripts or reports scripts using the substition variable.
    Thanks in advance

    Mark,
    Modifying the default files is dangerous and ill advised. You could always just add a style sheet (inline or linked) to your application that overrides that one setting while you wait on the permanent fix.
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen

  • Defined variable and substitution variables

    Are both of these internally treated in the same way by the Oracle database?
    for example a defined variable
    DEFINE p_grade = a
    and if I use a substitution variable p_grade
    DECLARE
    p_grade VARCHAR2(10);
    v_name VARCHAR2(10);
    BEGIN
    SELECT last_name
    INTO v_name
    FROM employees;
    WHERE job_id = &p_grade
    END;
    Edited by: user6287828 on Feb 24, 2009 10:52 AM

    Hi,
    What you're calling a "defined variable" is nothing but a substitution variable.
    DEFINE  p_grade = ais just one way of setting the value of the substitution variable p_grade.
    When you later use that variable, for example
    WHERE job_id = &p_gradethere is no way of telling how p_grade got its value (if it has one).
    Avoid using the same name for two different types of variables.
    For example:
    DECLARE
        p_grade VARCHAR2(10);   -- Local variable declared
        v_name VARCHAR2(10);
    BEGIN
        SELECT  last_name
        INTO    v_name
        FROM    employees
        WHERE   job_id = &p_grade;    -- Substitution variable used
    END;In the second line, you are creating a local VARCHAR2 variable called p_grade that is never used. It has nothing to do with the substitution variable p_grade (unless the value of that substitution variable happens to be p_grade,
    DEFINE  p_grade = p_grade)
    If you do use the same name for differnt types of variables, SQL*Plus may keep them straight, but no one else (including you) will.

  • Block based on "From clause query" and substitution variable

    Hi Folks,
    I have a "From clause query" block type, which is based on query that uses a substitution variable (:BLOCK.COLUMN) from previous block. When I run a query, then I obtain an error: ORA-01008: not all variables bound.
    My query looks like:
    select seq_no, prod_code, descr, curr_code,
           max(decode(sched_type_code,'ROLLOVER',amt,0)) OUTSTD_DRAW,
           max(decode(sched_type_code,'INTCHG',amt,decode(sched_type_code,'FEEREC',amt,0))) OUTSTD_INTEREST_FEE
    from
        select r.fac_no, r.prod_code, f.descr, r.prod_seq_no seq_no, r.curr_code, r.sched_type_code,sum(nvl(rep_amt,0)) amt
          from repay_scheds r,
               fac_prods f
         where r.fac_no = f.fac_no
           and r.prod_code = f.prd_code
           and r.prod_seq_no = f.seq_no
           and r.fac_no = :B2.FAC_NO
           and r.trans_ref_from is not null
           and r.status         <> 'P'
        group by r.fac_no, r.prod_code, f.descr, r.prod_seq_no, r.curr_code, r.sched_type_code 
    group by seq_no, prod_code, descr, curr_code
    having max(decode(sched_type_code,'ROLLOVER',amt,0)) >0 or max(decode(sched_type_code,'INTCHG',amt,decode(sched_type_code,'FEEREC',amt,0))) > 0Once I replace that substitution variable in query condition with some exact test number then it works fine.
    select seq_no, prod_code, descr, curr_code,
           max(decode(sched_type_code,'ROLLOVER',amt,0)) OUTSTD_DRAW,
           max(decode(sched_type_code,'INTCHG',amt,decode(sched_type_code,'FEEREC',amt,0))) OUTSTD_INTEREST_FEE
    from
        select r.fac_no, r.prod_code, f.descr, r.prod_seq_no seq_no, r.curr_code, r.sched_type_code,sum(nvl(rep_amt,0)) amt
          from repay_scheds r,
               fac_prods f
         where r.fac_no = f.fac_no
           and r.prod_code = f.prd_code
           and r.prod_seq_no = f.seq_no
           and r.fac_no = 2012500
           and r.trans_ref_from is not null
           and r.status         <> 'P'
        group by r.fac_no, r.prod_code, f.descr, r.prod_seq_no, r.curr_code, r.sched_type_code 
    group by seq_no, prod_code, descr, curr_code
    having max(decode(sched_type_code,'ROLLOVER',amt,0)) >0 or max(decode(sched_type_code,'INTCHG',amt,decode(sched_type_code,'FEEREC',amt,0))) > 0How can I use substitution variable within query for "From clause query" block type? Or any other way how to get the same result?
    Thanks for your reply.
    Tomas

    I have a solution:
    Before entering block I'm calling function, that populates my block:
    PROCEDURE POP_<<MY_BLOCK>>_BLOCK IS
      query_txt varchar2(2000);
    BEGIN
       query_txt := '(select seq_no, prod_code, descr, curr_code,
                            max(decode(sched_type_code,''ROLLOVER'',amt,0)) OUTSTD_DRAW,
                            max(decode(sched_type_code,''INTCHG'',amt,decode(sched_type_code,''FEEREC'',amt,0))) OUTSTD_INTEREST_FEE
                                                  from
                                                     select r.fac_no, r.prod_code, f.descr, r.prod_seq_no seq_no, r.curr_code, r.sched_type_code,sum(nvl(rep_amt,0)) amt
                                                       from repay_scheds r,
                                                            fac_prods f
                                                      where r.fac_no = f.fac_no
                                                        and r.prod_code = f.prd_code
                                                        and r.prod_seq_no = f.seq_no
                                                        and r.fac_no = '||:B2.FAC_NO||'
                                                        and r.trans_ref_from is not null
                                                        and r.status         <> ''P''
                                                     group by r.fac_no, r.prod_code, f.descr, r.prod_seq_no, r.curr_code, r.sched_type_code 
                                                 group by seq_no, prod_code, descr, curr_code
                                                 having max(decode(sched_type_code,''ROLLOVER'',amt,0)) >0 or max(decode(sched_type_code,''INTCHG'',amt,decode(sched_type_code,''FEEREC'',amt,0))) > 0)';
       Go_Block('<<MY_BLOCK>>' );
       Clear_Block ;
       Set_Block_Property( '<<MY_BLOCK>>', QUERY_DATA_SOURCE_NAME, query_txt) ;
       -- populate my  block --
       Execute_Query ;
    END;Thanks,
    Tomas

  • MDX and substitution Variable usage in Essbase 7.1.5 -- Problem

    <p>Hi,</p><p> </p><p>Iam trying to write a query like this and Iam unable to validatethis in MDX -</p><p> </p><p>SELECT<br><br>{ [USD]}<br>ON COLUMNS,<br>{&CurMon}<br>ON ROWS<br><br>FROM [Sample.Basic]</p><p> </p><p>It gives me error at "&"</p><p> </p><p> </p><p>Also I tried to use substituion variable in a formula on amember like this and I couldnot get it validated -</p><p> </p><p> </p><p>CASE [Time Periods].CurrentMember<br>WHEN [JAN]<br>THEN SUM( CROSSJoin( {[Net Income]} , {[JAN]} ) )<br>WHEN &CurMon<br>THEN SUM( CROSSJoin( {[Net Income]} ,{[JAN] : &CurMon} ) )<br>ELSE<br>missing<br>END</p><p> </p><p> </p><p>Please reply me if indeed , we cannot use substitution variablesin MDX.</p><p> </p><p>( Note: Subsitution variables were already setup in thesystem)</p><p> </p><p>Thanks<br></p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p>

    Each essbase application can go up to 2GB only. If you have one application which use more than 2GB of ram, it will probably crash.
    If you use direct I/O, you can use more than 2GB of ram, however it is limited by the operating systems.
    For Windows, it is recommended to turn on the /PAE setting in boot.ini. This will allow the windows to use more than 4GB of RAM. According to Essbase DBA guide, Turning 4GT will allow Essbase to use up to 3GB of RAM when you use direct I/O.

  • Issue with substitution variable with @MDSHIFT in BR in Calc Manager

    Hi Experts,
    We have a BR in EAS which is working fine.
    and exported to Calcmanager, now while validation it is giving error "@BaseScenario" is not found.
    the code is
    @MDSHIFT("LFLSalesIncVAT_GBP_C_DHP"->&BaseScenario->"Final"->"CD_FinalPlanPL",-1,"Year",,1,"Period",);
    if i hard code it like @MDSHIFT("LFLSalesIncVAT_GBP_C_DHP"->"P7PP"->"Final"->"CD_FinalPlanPL",-1,"Year",,1,"Period",); working fine.
    is there any limitation with calc manger and substitution variables?
    Thanks
    GP

    There seems to be many issues with validations in calc manager, does the rule run if you dont validate.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Global variable vs substitution variable

    Hi Gurus,
    Can we can use substitution variables in Business Rules(we can make it applicable for all the applications)..
    Then what exactly is the difference between Global variable and substitution variable.
    Thanks,
    ~RN

    Yes you can use substitution variables.
    A Global variable in Business rules can be used across all business rules and can only be used in business rules, it has the added benefit that they can be set as run time prompts, more info at About Variables
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Sharing complex substitution variable values between ASO and BSO databases

    We have ASO and BSO Essbase database member names with spaces in, and need to store some of these member names in substitution variables. However, this has to be done differently for ASO and BSO, due to calc script syntax requiring double quotes and MDX requiring square brackets. For example:
    ASO:
    &CurWeek value = Week 1
    MDX: [&CurWeek]
    BSO:
    &CurWeek value = "Week 1"
    Calc Script: &CurWeek
    As a result, the substitution variables cannot be shared between the ASO and BSO cubes, since the BSO variable value requires double quotes due to the space in the member name.
    Is there a way to get the above to work with both ASO and BSO? Can the double quotes be escaped in calc script syntax? Or can the double quotes be removed in the MDX formula?

    Hi TimG,
    Apologies for such a late reponse to this, genuinely haven't had a spare second to reply until now!
    Yes, I suspect a complex alias name may be the best solution here, and to remove the spaces from the actual member names.
    I was not aware of the latter part at all. My colleague has confirmed as much on this too - DBAG 11.1.2.1 pp117 & 118:
    "Note: If a substitution variable value is numeric or a member name starting with a
    numeral or containing the special characters referred to above is to be used both
    in MDX and non-MDX situations, create two substitution variables, one without
    the value enclosed in quotation marks and one with the value in quotation marks."
    "To ensure that a new substitution variable value is available in formulas, partition definitions,
    and security filters, stop and restart the application. All other uses of substitution variables are
    dynamically resolved when used."
    This last paragraph is the most concerning since we were planning to be able to update substitution variables values and then access the new values from calc scripts and formulae instantaneously. This quirk is unexpected and a little inconvenient. We may have to look at scheduling a change of substitution variable value overnight, followed by a stop/start of the app ready for the next day, and to work around needing to access changed values instantly.

  • Diff betwn Substitution and Dynamic Variable

    Hi All,
    As I'm new in hyperion planning I'm not able to figure out the difference between Substitution and Dynamic user variable. does anyone have any explanation with an example.. :(

    Hi,
    Substitution variables act as global placeholders for information that changes regularly.
    Each variable has a value assigned to it that can be set and changed centrally on the Analytic Services server at any time. When you are creating a substitution variable it depends on the requirement that variable is going to used for all application and its database or for particulaer apllication and its databases.
    Substitution variables are especially useful when you are developing and reporting on rolling forecasts.
    You can also use substitution variable in web form , business rules.
    Substitution variable is created in Essbase but from 11.1.2.2 we can create substitution variable from workspace.
    There is nothing named as Dynamic User variable. If i am not wrong you are asking about user variable.
    User variables act as filters in data forms, enabling planners to focus only on the members they are interested in, such as departments in a particular division. Before you can associate a user variable with a data form, you must create the user variable.
    User variable can increase performance by helping planners focus on certain members.
    It is available in the File -> New -> User variable. It is also available in the Administration -> Manage -> User Variable.
    Hope this helps.
    Regards
    SST.....
    Edited by: ss1988 on Mar 1, 2013 2:14 AM
    Edited by: ss1988 on Mar 1, 2013 2:16 AM

  • Difference between 2.2 and 3.0 substitution variable behaviour?

    What would cause a difference in the determination of substitution variables between 2.2 and 3.0?
    In 2.2 the following code works:
    select nvl(get_last_change(v('APP_ID'),v('APP_PAGE_ID')),'no date recorded')from dualIn 3.0 the code does not work, and I had to change it to:
    select nvl(get_last_change(&APP_ID., &APP_PAGE_ID.), 'no date recorded')
    from dualI even tried using nv() instead of v(), but it still would work in 3.0. Is there a change in the v() function or something that I've overlooked?
    Thanks.
    Bill Ferguson

    I think I may have stumbled across the culprit, but I'll have to find some time to experiment to make sure.
    Even though I'm not using it yet, I did install Patrick Wolf's ApexLib Framework. I also just got done dropping the old ApEx schemas (FLOWS_020000 and FLOWS_020200), and all of a sudden my users started saying the web pages were giving them error messages. I tracked it down to the v() funtion in ApexLib having the FLOWS_020200 hardcoded in the function. Changing that to FLOWS_030000 and recompiling got rid of the error messages in the app.
    So, I'm thinking that since I upgraded from 2.2 to vers. 3, the v() function from ApexLib was executing Apex's v() in the old 2.2 schema instead of in the newer 3.0 schema, which was giving me the different results.
    I might get a chance to experiment tomorrow morning, but I think this will wind up being the culprit.
    Bill Ferguson

  • Synchronize substitution variables values between Essbase and Planning

    Hello,
    In EPM version 11.1.2.1 (but we noticed the problem also in previous EPM versions) when we set the value of a substitution variable in Essbase, the value is is not immediately updated in Planning: for some time we see the old value. The value in Planning remains unchanged even in we log off or exit Planning and log on again.
    Instead if we restart the Planning service, the value is immediately updated
    Since we would like to use the Essbase substitution variables to manage some selections in Planning Data Entru Forms, is there any way to force a synchronization, or to increase the frequence of synchronizations between Essbase and Planning?
    Regards
    Francesco Quaranta

    Have a look at setting the planning property SUBST_VAR_CACHE_LIFETIME
    http://docs.oracle.com/cd/E17236_01/epm.1112/hp_admin/properts.html
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Substitution variable and security

    What is the minimum security a user can have in order to change substitution variable value.Apart from appman, I understand that MaxL can be used to manage substitution variables. What is required to install MaxL? Any server based solution, anyone investigated?

    I believe it depends on the scope of the substitution variable. DB designers can change variables at the DB level, app designers at the app level, supervisors at the server level.As to the rest of the question I plead blissful ignorance. :)Regards,Bruce

  • Can we use Substitution variables in MAXL?

    Hi,
    Can we use substitution variables in MAXL script?
    I have to run this MAXL command for clearing a slice of ASO cube on V11.1.1.3.
    alter database Apname.DBname clear data in region 'CrossJoin({[2009]},{[Dec]})';
    I am planning to use Current_year & Current_month variables instead of hardcoding 2009 & Dec as I have to use this everymonth to clear the current months data.
    If it is allowed, what is the syntax?
    Is there any alternative apart from substitution variables?
    Appreciate your thoughts.
    Thanks,
    -Ethan.

    You would just use ampersand and the variable name instead of the hard coding e.g. &yearVar &periodVar.
    Not tried it on aso clears but in theory it should work as ...'CrossJoin({&yearVar},{&periodVar})';
    just change yearVar and periodVar for your substitution variable names.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Use varialbe as a value in substitution variable

    Hi there,I incrementaly update my cube day by day.And I set a user variable in autoexec.bat to get the current date,eg '2003-06-23'.Could I use such variable as a variable's value in substition variable ?My platform is 6.5 on w2k.Regards,luau

    You can use that in a MAXL script to set the substitution variable.the MAXL script would be something like:Alter database $4 drop variable $5;alter database $4 add variable $5 $7 ;where: $4 is the app.cub $5 is the substitution variable name $7 is the value of the subs. variableRich Sullivan - Beacon Analytics

Maybe you are looking for

  • Sharing a  groupwise calendar through iCal

    I use an iPhone for my work but our appointments and mail are managed through groupwise. While my groupwise calendar syncs fine with iCal, the problem I'm having is that there is no "share" option in iCal for me to share that calendar with my partner

  • How to calculate standard error in Numbers

    How to calculate standard error in Numbers?

  • To reach the end of a varchar

    i want to remove last character of my varchar variable. is there any command as to reach a char of varchar. such as charAt() in java. so, i have a varchar variable. and its last character is ','. i must remove it. how can i do this? thanx

  • Error in user admin  applet

    i am getting error message "the current database design invalid. do you want to exit without updating the database". i'm getting this error message recently but unable to recollect what update i had done. does this have any impact on any of the packa

  • Cannot open RAW in CS3. This must be a common problem. Any help please?

    Good day folks Anyone got any help with opening files in RAW ? I'm using CS3 and my cam is a 5D mark 2. Keep getting the same generic message from adobe " could not complete your request because this is not the right type of document "  aaarrrgghhhhh