How to reference current ICP in calc script?

Hello Everyone,
I am working on an HFM calc script. I am trying to assign the current ICP member to a variable. I attempted this using the following line of code:
POV_ICP = HS.ICP.MemberFromID(HS.ICP.IDFromMember(""))
I don't receive any error messages, but I don't seem to be populating the POV_ICP variable either.
Your help is greatly appreciated!
Chris

Ha ha... Good one.
I came back to post A solution and low and behold - you arrived at the same...
You've probable realized that the POV_ICP was only ever going to reference the ICP_None account under any condition.
Glad to hear you're back on track - G'Luck
Public Const WriteToFilePath = "C:\Documents and Settings\Admin\My Documents\!WRITEtoFILE" 'Will write log to app server you are currently logged on to. Need to ensure this path exists on each app server
Sub WriteToFile(txtStringToWrite)
On Error Resume Next
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("C:\Documents and Settings\DemoUser\My Documents\!WRITEtoFILE\RulesLog.txt", ForAppending, True)
f.WriteLine txtStringToWrite & " " & Now()
f.Close
On Error GoTo 0
End Sub
'CALCULATE
SUB Calculate()
'Set current POV members
POV_YEAR = HS.Year.Member
POV_PERIOD = HS.Period.Member
POV_SCENARIO = HS.Scenario.Member
POV_ENTITY = HS.Entity.Member
POV_VALUE = HS.Value.Member
'Variables
vPeriodNum = Hs.Period.Number()
vPeriod = HS.Period.Member()
vScenario = Hs.Scenario.Member()
vYear = Hs.Year.Member()
vEntity = Hs.Entity.Member()
vValue = Hs.Value.Member()
vEntisBase = HS.Entity.IsBase("","")
IF vEntisBase = TRUE AND (vValue = "<Entity Currency>" or vValue = "<Entity Curr Adjs>" or vvalue = "[Elimination]") THEN
'Check for value in ICP
SET DataUnit = HS.OpenDataUnit("")
lNumItems = DataUnit.GetNumItems
FOR i = 0 TO lNumItems-1
'Get the next item from the dataunit     
CALL DataUnit.GetItem(i, strAccount, strICP, strCustom1, strCustom2, strCustom3, strCustom4, dData)           
CALL WriteToFile(POV_SCENARIO & " " & POV_YEAR & " " & POV_PERIOD & " " & POV_ENTITY & " " & POV_VALUE & " " & (strAccount & " " & strICP & " " & strCustom1 & " " & strCustom2 & " " & strCustom3 & " " & strCustom4 & " " & dData))
     IF strAccount = "X" THEN
     'Do Nothing
     ElseIf dData <> "0" THEN
''      ElseIf dData = "1" THEN
     END IF
     NEXT
END IF
END SUB
This taken from the Rules.txt file...
Actual 2007 Jan EntityCashPool <Entity Currency> [ACashPool] WI [None] [None] [None] [None] 555555 2/1/2011 11:33:22 PM
Actual 2007 Jan EntityCashPool [Elimination] [ACashPool] WI [None] [None] [None] [None] -555555 2/1/2011 11:33:22 PM
Actual 2007 Jan EntityCashPool [Elimination] ICRecPayDiff WI [None] [None] [None] [None] 555555 2/1/2011 11:33:23 PM

Similar Messages

  • How to reference current tab on page zero?

    Hi,
    I have regions placed on page zero. How could I reference the current tab? I have to many pages, so using display condition by using page ID is little uncomfortable. I thought I could make a condition by using SQL expression and referring the label or name of the currently active tab. I think, this is a trivial question, but I can not find how to referre to the current tab's name or label.
    Tamas

    Hi
    I have the exact same problem.
    I cant have multiple navigators on page 0.
    Therefore my navigator on the left hand side should be dynamic, based on the tab I click.
    I've gotten this far (select statement below), but I don't know how to reference the current tab that I've clicked on / the current tab is active (see :P0_TAB_NAME)
    select "MENU_CODE" id,
    "PARENT_MENU_CODE" pid,
    decode(menu_type,'FL','<img src="#APP_IMAGES#folder.png" border="0"
    style="vertical-align:middle">&nbsp<b>' ||menu_description,
    'PG','<img src="#APP_IMAGES#pgm.png" border="0"
    style="vertical-align:middle">&nbsp<b>' ||menu_description,
    'PG','<img src="#APP_IMAGES#tree_group.png" border="0"
    style="vertical-align:middle">&nbsp<b>' ||menu_description) name,
    decode(page_name,null,null,'f?p=&APP_ID.:'||page_name||':&SESSION.') link,
    null a1,
    null a2
    from "CANELAB_NAVIGATOR" a, APEX_APPLICATION_TABS b
    where b.display_sequence = a.menu_group
    and b.tab_name = :P0_TAB_NAME
    order by MENU_CODE

  • How to capture user ID within Calc script, when running?

    Client wants to capture run information automatically (user ID - who ran selected calc script ), and save that information in application itself to see who ran it last time, without checking related logs.
    User IDs have been enumerated already so if we can pick user ID text, we can set them as number value in Essbase. Expectation is to generate CDF to see related user ID and refer property file to get related number, to save in one of account. Its only possible if we can get in same session when run CDF and check who runs it.
    Any possible way to identify user ID from calc script in Essbase?
    Edited by: 962124 on Oct 15, 2012 9:30 AM

    Could you please mark the responses as helpful or answer so others can benefit from your time?
    Kyle Goodfriend
    http://www.in2hyperion.com
    Please make sure to assign helpful/answered to responses if applicable - it rewards those who help and benefits the user community.

  • Execute calc script before batch load

    Hi
    I use FDM ERPI to load data from Oracle EBS R12 into Hyperion Planning 11.1.2
    I use batch loader to load several locations.
    How could I execute a Essbase calc script before the import process, so before the first load?
    Thanks in advance for your help
    Fanny

    Sorry, but I have searched in this forum.
    I have found topics about how to execute calc script after the load, but nothing (at least I have not found) about calc script befort many load via batch loader.
    So if someone can give me some clues...
    thanks!
    Fanny

  • Essbase 9.3 Calc scripts. Pb with dates. How to convert (string = number) ?

    Hello,
    I've a problem with Essbase(Planning?) Scripts on version 9.3. It looks simple but I do not find any (clean) solution :
    On my Essbase database, I have a member called "Reference_Date" on my axis Indicators. It is a date data type, that is to say, it displays a number corresponding to a YYYYMMDD format. For example : 20091029 for October 29th 2009.
    In calc scripts I often need to compare the month included in that "Reference_Date" with the current Member of my Time Axis (I have 12 Months members based on the format M02 for February for example). The final aim is to calculate a number of complete years since that "Reference_Date".
    But theses two elements are not of the same "type" (one is a number value and the other is a "member" in Time Axis). So I'm forced to convert one of this two elements in order to compare it.
    For example I can extract the month value of the "Reference_Date"' and put an "M" before it to have a Time member equivalent or I can convert the member Name M10 to a number (10))
    in both cases I have the same type problem : I don't know how to convert a string into a number nor how to convert a number into a string.
    (For example @CONCATENATE doesn't work with numbers). and that my only remaining problem.
    I didn't find any Essbase Function which do this (conversion number <=>string).
    Is anyone have an Idea ?
    Thanks for your help
    Best regards

    I don't know any way for you to compare your data against your metadata. Not directly. To me it makes little enough sense to try that I'm not surprised the developers didn't provide for it.
    I've converted member names to strings, manipulated the strings (calc script functions are not good at this), and turned them back into member names, but that's really the only use I've had for string manipulation. I don't think an equivalency operator even exists for string data. And I see no way to begin thinking of a member name, once converted to a string, as a number.
    It makes even less sense to me to try thinking of a data value as a string. Even text values in Sys 11 are stored as numbers. Not encoded characters, but just a number to look up somewhere.
    I think you can do what you want though, with something like this...
    IF (@ISMBR("FY08"))
    vYr = 2008;
    ELSEIF (@ISMBR("FY09"))
    vYr = 2009;
    ENDIF;
    IF (@ISMBR("M01"))
    vMth = 1;
    ELSEIF (@ISMBR("M02"))
    vMth = = 2;
    ENDIF;
    "Years_Since_Reference" = ((vYr * 100) + Mth) - ("Reference_Date" / 12);
    Obviously, the math will need some work, coz that doesn't actually work, but the logic above essentially turns your metadata into numbers, which is what you are after.
    Good luck,
    -- Joe

  • How to use Dynamic Time Series YTD on a calc script / member formula?

    Hi,
    I activated Dynamic Time Series on Essbase and would like to use the YTD function of a measure for a certain month.
    I tried to use
    MeasureName->YTD(Dec)
    MeasureName->Y-T-D(Dec)
    But couldn't use it to syntax problems. How can I call this function instead of using @Accum or @SumRange?
    Thank you
    Edited by: Icebergue on 10/Ago/2011 11:07

    I could be wrong, but I don't think you can use DTS members in calc scripts or member formulas. As you probably know, they can be used in Financial Reports, SmartView and Excel Add-in.
    You can create an alternate hierarchy in your Time dimension though:
    Jan (YTD): Jan ->Jan is being a shared member
    Feb (YTD): Feb+Jan (YTD) ->Both Feb and Jan (YTD) are being a shared members
    Dec (YTD): Dec+Nov (YTD) ->Both Dec and Nov (YTD) are being a shared members
    Cheers,
    Mehmet

  • How to run a Calc script in ASO application

    Hi,
    I have gone through the Essbase Release 11.1.2 and I tried to implement the Calc scripts in ASO application.
    When I tried to Create a Calc Script using Calc script editor for ASO Application in EAS console it say's "Calc script is not supported in ASO application". When i saved the Calc scripts it appears in Backend but it is not visible in EAS console.
    I tried to call the Calc script using MDX script but it says "Unable to open the file Custom calculation terminated with Essbase error 1241109"
    Can anyone help me how to work on Calc scripts in ASO application?
    Thanks in advance

    I think you might be confusing BSO calc scripts with ASO custom calcs, there is a whole section in the documentation on ASO calcs - http://docs.oracle.com/cd/E40248_01/epm.1112/essbase_db/aso_custcalc_alloc.html
    There are also examples on the internet if you search spend some time researching.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How currency COnversion calc scripts refers the HSP_Rates members?

    Hi,
    After creating the corrency conversion script based on selection of Scenario.Version,version type,currency.. planning also creates copy of this script as HSPCrtT & HSPCrtB. Here how its refering to HSP rates dimension?
    Thanks

    Hi,
    Have you restarted Essbase server after increasing cache sizes?
    Also verify if there are any calculations that are dependent on dynamic calc members.
    Assuming Entity is a Sparse dimension, you can use FIX instead of IF in the calc script.
    FIX(@UDA("ENTITY","CNY"))
    "Local" / "Entity"->"Versions"->"Currency"->"Function"->"Level"->"CNY_Rate" ;
    ENDFIX
    ...similarly for rest of entities.
    Also you can use USD instead of LOCAL as you had already copied LOCAL to USD.
    USD = "USD" / "Entity"->"Versions"->"Currency"->"Function"->"Level"->"CNY_Rate" ;
    in similarly way you can try to fine tune the script for better performance.
    Try these things and come up with the outcomes.
    - Krish

  • How to launch Calc Scripts from Analyzer

    Hello all,Just wondering if that there is an easier way to launch calcs from analyzer... what are some of the ideas -using a executable lauch button, hyperlink, via Analyzer API? Any other ideas appreciated. regards, Ray

    This message has resolved my query by setting a larger MAX_PROPERTY_VALUE_LENGTH to "30"Thanks.I have come across this problem before. If it is the same problem it is to do with the length of your calc scripts. Obviously Essbase calc scripts are stored as .csc files, if these are too big Analyzer can't read them. This issue is caused by the ADM layer that Analyzer uses. Search on the server for a file called adm.properties .You should find the file in the following directory \\hyperion\analyzer\adm\lib .You may find you have more than one copy on the Server in which case edit them all. In the file find a string called MAX_PROPERTY_VALUE_LENGTH. You will find this is currently to 4 (this respresents 4kb). Increase the value to say 20. Save changes, restart Analyzer Service and hopefully this should have fixed the problem. I would love to know if this works. Paul Armitage. Analitica Ltd. www.analitica.co.uk

  • Scripting Bridge: how to set current iTunes playlist

    I know how to get the current iTunes playlist using Scripting Bridge, but how do I set the current playlist?

    This is the answer:
    1. Dig into iTunesApplication's "sources" to find iTunesSource "Library"
    2. Dig into iTunesSource "Library" to find iTunesPlaylist "Party Shuffle"
    3. Do a reveal.

  • Calc script for calculating current month data after loading

    Hi,
    I'm trying to write a script to do a calculation to all dimension after load current month data; it ran successfully but current month data is all zero; can someone tell me what i'm doing wrong?
    SET CACHE HIGH;
    SET UPDATECALC OFF;
    SET CALCPARALLEL 4;
    FIX (&CurMon, &CurYr)
    AGG (Sparse2, Sparse3, Sparse 4, Sparse 5, Sparse 6);
    ENDFIX
    Dense1 – Dynamic Calc
    Period: Dense – Dynamic Calc
    Year: Sparse – Dynamic Calc
    Sparse2 – Label Only
    Sparse3 – Label Only
    Sparse 4– Label Only
    Sparse5 – Label Only
    Sparse6 – Label Only
    Thanks!

    Natilie,
    If I understand you correctly, you are loading data, then clearing out the current month->current year, and then aggregating current month->current year? There isn't going to be any data there -- you've cleared it out in your second step.
    I think the order you want is:
    1) Clear out the current month->current year to be sure it's a good load
    2) Load the current month->current year
    3) Aggregate the current month->current year
    This could be done with a single Maxl that controls two calc scripts and one import database (clear, import, agg) or you could do it manually.
    The default calc is (generally) equivalent to CALC ALL using db properties (UPDATECALC, AGGMISSG, etc.). There shouldn't be practical difference between that and the AGG portion of your calc.
    I would again confirm that all of your data is at the lowest level, i.e., you can navigate to leaf level on all dimensions and pull a data value before you aggregate. Perhaps you are loading to upper level members and don't realize it. I often use the Excel add-in's Styles to tell me if I'm at the lowest level of a db or not.
    Regards,
    Cameron Lackpour

  • Multi-dimensional allocation reference in calc script is locking up EAS

    I am trying to draft a calculation script that allocates 1 total number at a point of view that includes "Entity" "Product" and "Customer". This number is entered in at one entity, one customer, and one product. I have loaded allocation weights by entity, customer, and product to be used as the basis for allocating this number down to entity, customer, and product.
    We have tried to use the @MDALLOCATE in a script as follows:
    SET AGGMISSG ON;
    SET UPDATECALC OFF;
    SET CACHE HIGH;
    SET CALCPARALLEL 3;
    FIX("BU Version_1","Actual",&CurrFY,&CurMth)
    "PL_AC_4502" = @MDALLOCATE ("PL_DP_1"->"PL_AC_4502", 3, @LEVMBRS ("Prod_Line",0),@LEVMBRS("Product",0),@LEVMBRS("Customer",0),"Abs_4502",,share);
    ENDFIX
    This locked up the EAS server everytime we tried it.
    We decided to add an account to hold a calculated percentage for the allocation and tried the following calc script:
    SET CACHE HIGH;
    SET UPDATECALC OFF;
    SET AGGMISSG ON;
    SET CALCPARALLEL 3;
    FIX ("FY10","Jan","BU Version_1","Actual",
    @RELATIVE ("Entity",0),@RELATIVE ("Product",0), @RELATIVE ("Customer",0))
    "Pct_Abs_4502"="Abs_4502",@LEVMBRS("Prod_Line",0),@LEVMBRS("TotCustomer",0),@LEVMBRS("TotProduct",0) / "Abs_4502"->"Prod_Line"->"TotCustomer"->"TotProduct";
    ENDFIX
    This also locked up the EAS server. Each time, it did not even finish the syntax check.
    We have about 70 product numbers and about a dozen customer numbers with numbers in them. Can anyone suggest a modification that will allow either of these calc scripts to avoid locking up the servers?
    Much appreciated in advance,
    Rob

    I just thought I would try to add a little more context to Glenn's response. A calculation on Essbase will step through every single member of every dimension by default. When you mention member "Abs_4502" in a calc script, you are not referencing ONLY "Abs_4502", you are also implying exactly one member from every other dimension in your database (every data value needs a member from every dimension. FIXes are there to limit which members of certain dimensions should be subject to your calculation.
    The math you are doing to create a percentage should only reference one value in the numerator, and one value in the denominator. Your denominator is one value, but the numerator is undefined because it is referencing a range of member across three dimensions. I believe I understand what you are attempting here, but it is not necessary. Your FIX already explicitly states that the calculation will work across all the lev0 members of Entity, Product, and Customer. So, you don't need that in the math again. To restate Glenn's attempt...
    /* Assumes Prod_Line is "Entity", TotCustomer is "Customer" , and TotProduct is "Product" member */
    FIX ("FY10","Jan","BU Version_1","Actual",
    @RELATIVE ("Entity",0),@RELATIVE ("Product",0), @RELATIVE ("Customer",0))
    "Pct_Abs_4502" = "Abs_4502" / "Abs_4502"->"Prod_Line"->"TotCustomer"->"TotProduct";
    ENDFIX
    The very first calculation of this calc script is working on the first lev0 relative of "Entity", the first lev0 relative of "Product", and the first lev0 relative of "Customer", and divides the value in that intersection with the value at the "Prod_Line", "TotCustomer", and "TotProduct" intersection....which should be percentage (albeit probably very small...I'd warn against any rounding attempts). The fix then steps one by one through each of the lev0 members and does the same math.
    You could step this up and go across all months in the FIX too, and it will step through all months, and calculate the percentages within each month.
    Hopefully that helps a little.

  • How do you stop multiple users executing the same calc script at the same time?

    We have an issue when  users uplaod a spreadsheet and then run a calc script. at one time we have multiple exectuions of the script running.
    This slows up the system and we have to go cancel all the executions and run it again.
    Can we stop this and put them on a queue, so only one execution of the calc happens at one time. Or stop multiple executions getting submitted at all.

    You could use EXCLUSIVECALC to stop more than one calc running at the same time, although this will apply to all applications on your server.  And it doesn't just stop the same calc being launched twice.  Easier than the alternatives I can think of though, if it works for you.

  • How to make a calc script on a dense dimension ?

    Dears,
    I want to make a calculation script on a dense dimension where :
    - I want to get an input from a member, then make a mathematical calculation , then populate the result in another member at the same dimension .
    For More Clarification :
    I have the following fix
    CALC ALL ;
    FIX ("SAR","Working.V01","Budget2012","FY12","G_10","NM_CAT01","Employee General","BegBalance")
    "Internal Transportation" = "Monthly Transportation"*30 ;
    ENDFIX
    -Internal transportation and monthly transportation are 2 members on FB_account dimension (dense dimension) .
    Waiting for your response, Thanks in advance.

    Dear ,
    I appreciate your feedback . But, My problem is that after executing the calc script , No calculation happens .
    by another means ,
    -If I wrote "Internal transportation" = 500 ; --> It put 500 in it
    -If I wrote "Internal transportation" = "Internal transportation" * 100 ; --> No calculation happened but it executed successfully
    -if I wrote "Internal transportation" = "Monthly transportation" = 500; --> No calculation happened but it executed successfully
    I don't know Why ???

  • Can you suggest me how to run multiple calc scripts using singel maxl script

    Hello,
    I am writing a maxl script which should be able to :
    1. update Set Variables for the Essbase DB
    2. Execute multiple calc scripts
    2a. Trying to put specific sleep time within multiple calc scripts.
    Thanks and Regards.

    Why are you looking for a Maxl to run multiple maxls? Can't you use a batch or sh script to do it.
    Unix has a sleep command in batch file try using choice
    Regards
    Celvin

Maybe you are looking for

  • Failed to start Apache Web Server

    I can not start apach aftre the upgrade of the system /etc/httpd/conf/httpd.conf: # This is the main Apache HTTP server configuration file. It contains the # configuration directives that give the server its instructions. # See <URL:http://httpd.apac

  • Customer down payment problems

    Hello All, My client is facing the following problem can any one give me a clear idea about reason for this When an invoice is created from a billing plan, the amount displayed as the amount available from the downpayment is different from the amount

  • QueryString issues with Query Builder and Search Box

    Hi Guys, I've got the following scenario (Issues are bolded for quicker reading): I have a search results pages named results.aspx I have a page, named messages.aspx, with a webpart that display messages from a specific folder (which can be changed i

  • Is the isReachable() thread safe ? How to approach it ?

    I've created a ping class which uses InetAddress.isReachable(). I have 100 devices, with 100 threads which are using the ping object instances simultaneously. When one device is not reachable ( it doesn't responde), the next 5 o 10 ping test fail as

  • Why am I getting a "Your request could not be completed" error? Please help.

    I keep getting this error on my itunes that I just installed on pc. I am just trying to log into my account . Windows 8.