CDF function in essbase

HI,
I'm planning to use a cdf function in my essbase outline -
'@JgetMonthNumberWorkDays(2009, 1, "aus")'
Now my question is..can we pass other essbase functions within this cdf and make it work ?
e.g. Will something like below work?
'@JgetMonthNumberWorkDays(@CURRMBR (year), @CURRMBR (period), "aus")'
where year dimension is 2010,2011 and so on
and period dimension is jan,feb and so on.
Any pointers will be appreciated!!
Edited by: whirlpool on Aug 7, 2012 7:18 AM

If you want to use the CDF in a FIX statement you need to make sure that it returns a member name rather than a number:<BR><i><BR>public class ChildAccess<BR>{<BR>    public static String GetFirstMember(String[] members)<BR>    {<BR>        return members[0];<BR>    }<BR>}<BR></i><BR>I prefer to define the function against a specific application rather than globally because you only need to restart the application in order to pick-up any modifications to the .jar file. So the MaxL function definition would be:<BR><i><BR>    create or replace function appname.'@_GETFIRSTMEMBER' as<BR>        'ChildAccess.GetFirstMember(String[])';<BR></i><BR>and in the calculation script the FIX statement would become:<BR><i><BR>    fix ( @member( @_GetFirstMember( @name( @children( "Abc" ) ) ) ) )<BR></i><BR>This looks a little messy so you can use a macro to simplify it:<BR><i><BR>    create or replace macro appname.'@GETFIRSTMEMBER'(single) <BR>        as '@member( @_GETFIRSTMEMBER( @name( @@1 ) ) )' <BR>        SPEC "@GETFIRSTMEMBER(memberRange)";<BR></i><BR>and then the FIX statement could be written:<BR><i><BR>    fix( @getfirstmember( @children( "PRODUCT" ) ) )<BR></i>

Similar Messages

  • Error while creating Custom Defined Functions in Essbase

    <p>Hi All,<br>I am trying to create CDF(Custom Defined Functions) in Essbase. Iwant to create a function which take list of child member andreturn the first child. For this, i have created a java file called"ChildAccess.java" which contains the following code:<br>public class ChildAccess<br>{<br>public static char GetFirstMember(char [] members)<br>{<br>return members[0];<br>}<br>}<br>I have compiled and made jar file called"ChildAccess.jar" and pasted it at"ARBORPATH/java/udf". Then i restarted the Essbase Serverand run the following MaxL command to register the function<br>create or replace function '@ChildAccess' as<br>'ChildAccess.GetFirstMember'<br>spec '@ChildAccess(memberRange)'<br>comment 'adds list of input members'.<br>Till here i am not getting any error but when i am using thisfunction in my calc script as given below<br><br>FIX(@ChildAccess(@CHILDREN("Abc")))<br><br>it gives the following error<br>"Error:1200414 Error parsing formula for [FIX STATEMENT]<br>(line 2)"argument[1] may not have size[6] in function[@CHILDREN]"<br>NOTE: The SIZE[6] is giving the no. of child in member"ABC".<br><br>Thanks in Advance<br>Arpit</p>

    If you want to use the CDF in a FIX statement you need to make sure that it returns a member name rather than a number:<BR><i><BR>public class ChildAccess<BR>{<BR>    public static String GetFirstMember(String[] members)<BR>    {<BR>        return members[0];<BR>    }<BR>}<BR></i><BR>I prefer to define the function against a specific application rather than globally because you only need to restart the application in order to pick-up any modifications to the .jar file. So the MaxL function definition would be:<BR><i><BR>    create or replace function appname.'@_GETFIRSTMEMBER' as<BR>        'ChildAccess.GetFirstMember(String[])';<BR></i><BR>and in the calculation script the FIX statement would become:<BR><i><BR>    fix ( @member( @_GetFirstMember( @name( @children( "Abc" ) ) ) ) )<BR></i><BR>This looks a little messy so you can use a macro to simplify it:<BR><i><BR>    create or replace macro appname.'@GETFIRSTMEMBER'(single) <BR>        as '@member( @_GETFIRSTMEMBER( @name( @@1 ) ) )' <BR>        SPEC "@GETFIRSTMEMBER(memberRange)";<BR></i><BR>and then the FIX statement could be written:<BR><i><BR>    fix( @getfirstmember( @children( "PRODUCT" ) ) )<BR></i>

  • To expand the filter functions in essbase

    Hi All,
    Please help me to expand the filter functions in essbase like @LIST, @ IDESCENDENTS, @DESCENDENTS , @REMOVE. My expected resulted is the member names in the outline that is indicated by the filter.
    This is to get the member names to which a filter definition represents.
    For example
    If A has three children A1, A2 and A3 and i have a function @IDESCENDENTS(A), then i need a result as A1, A2 and A3.
    This is just an example, I am trying for complex one.

    Go through
    http://docs.oracle.com/cd/E12032_01/doc/epm.921/html_techref/funcs/funclist.htm
    There are many commands to select members in a dimension. You can select particular generation using @genmbs anr level members using @levmbre or you can use @relative. You can tag uda if you want to select members randomly.
    Technical reference is the best place to start about calculation commands.

  • JExport cdf function working - but changing essbase files ?

    Hello,
    we finally managed to get CDF JEXPORT function running
    (Link http://www.jasonwjones.com/?p=68 was very helpful)
    now we scheduled daily exports to txtfiles and oracle database - it's running well - we scheduled to export every night from testdatabase and productiondatabase -
    but I noticed, that it's now changing the essbase *.pag and *.ind files last-accessed-datestamps (not all of our 100 GB -but obviously those we fix the export to)
    as we run daily incremental backups and essbase has to be offline during that time, this causes us several hours of offline time every night - because additional 50 GB of data have to be secured - the dataexport command does not change the files but jexport does
    -> did anymody notice something like this ? jexport changing datestamps of *.pag and *.ind files ?
    my common understanding is that an export is reading data and should not change files - as we want to export attributes we can not use dataexport command
    of course I am aware of workarounds like: use dataexport command, do not export every day, buy a faster backupserver, run restructure so that the relevant data is in fewer datafiles - but still hoping that there is a better solution.
    regards
    Rodian

    Hi,
    thank you for being interested into the issue
    we use the new essbase / hyperion planning / epm 11.1.2.1 64 bit on windows 2008 R2-
    maybe you or somebody else has an idea or we really didn't see the easy way
    what we need is a fast export of essbase data combined with alias member names and attribute member names
    dataexport command seems not to allow to export essbase data combined with/sorted/fixed by attribute dimensions - we realized already that dataexport is much faster (15 min instead of 24 hours for the major export part - so we ended up with a combined approach already (it was already tricky to get jexport running exporting to oracle tables):
    1 dataexport script (15 min runtime for all real essbase budget data using dataexport to file and 2 jexport scripts (5 min each), which we actually just use to derive the corresponding attribute dimension values for those of the 5000 members, which are used for budgeting in the selected planning scenario
    We managed jexport to export to oracle database directly, while dataexport we managed only to export to file (so it needs another script to import into oracle database again)
    Furthermore, we needed also the alias values of each member - which dataexport and jexport did not deliver - so we had to use sql statements to derive it from the hyperion planning application oracle tables hsp_object and hsp_alias
    at the end, the result of the 3 calcscripts and the alias names from the hyperion planning oracle table have to be written to 2 txt files, which get delivered to SAP on daily basis - the reason why we ended up with such a wild mix of scripts is obviously that SAP and the other involved planning system defined the data to be delivered
    as we have only 2 interfaces and 2 planning/essbase applications and limited financial budgets, it appeared too big effort to invest time into ODI (still open, what the cost of this would have been, if the scripts could be scheduled and would be fast)
    all scripts are scheduled and run daily and are very reliable - with the only disadvantage, that the queried *.pag and *.ind (not all files change) files tend to change datestamp every night now.
    I clearly identified jexport the root of it.
    we managed outline extractor utility 11.1.2.0 running as well on 11.1.2.1 - but looks like this can not scheduled and allows only to export the pure value lists of attributes and members
    the only thing i could test is placing the jexport script into a hyperion planning businessrule instead of an essbase calc script and exporting to textfile only (but I expect same result)
    so the only remaining alternative might be to extract also the attribute dimension values (hsp_member_to_attribute) for our members from the hyperion planning oracle tables and combine them with our essbase data
    so what we actually miss is an essbase dataexport command, which allows to export essbase data with attribute values and member names from alias tables directly into oracle tables (ok, to a flat file would be ok as well)
    regards
    Rodian

  • String CDF functions not working in business rules

    Working with EPM 11.1.2. I created a calc script on the planning cube and it works perfectly. I then put the same code in a business rule and it will not validate. Please see the code below.
    1) created udf folder in following directory
    essbase/Oracle/Middleware/EPMSystem11R1/products/Essbase/EssbaseServer/java
    2) modified udf policy to grant access to all
    3) saved CDF_String.jar file to new udf folder on server
    4) registered functions via maxl
    5) stop/start application
    6) stopped/started EAS services
    I get the following error in the message window (line 9 is the JGetStringFromDouble statement):
    "Encountered " "-> " "-> "" at line 9, column 35.
    Was expected one of:
    What do I need to do to get this code working as a business rule since I want to use RTPs in this routine?
    FIX("No_Profit_Center", FY07:&CapAppEndYr, "Working Plan", "Current", "Manual_Input", "LOC", @Relative("Period",0), @Relative("Project",0), @Relative("Entity",0))
    "AC_Unappr_Fcst_Depr"
      IF ( "AC_Unappr_Fcst_Depr"  == #Missing)
         IF ("FY07"->"No_Period"->"AC_Depr_CC" != #Missing)
              "AC_Unappr_Fcst_Depr"->(@MEMBER(@CONCATENATE("EN_",@JgetStringFromDouble("FY07"->"No_Period"->"AC_Depr_CC",@_False,@_False))))  = "AC_Unappr_Fcst_Depr_Temp";
        ELSE
              "AC_Unappr_Fcst_Depr" = "AC_Unappr_Fcst_Depr_Temp";
        ENDIF
      ENDIF
    ENDFIXEdited by: jjdubb on Jun 11, 2012 9:10 AM

    I've had this issue with a different string function. Business Rules does not like the boolean parameters (@_FALSE) used in these CDF's. I had a similar issue and had to rewrite my CDF without the parameters. You basically need to hardcode the "with quotes" and "with decimals" parameters in the java code.
    Hope this helps,
    - Jake

  • RATE function in Essbase

    Does anyone know how to get an Essbase function equivalent to the RATE function in Excel?<BR><BR>Regards,<BR><BR>Pablo

    Here is what you need to do:<BR><BR>Java code:<BR><BR>public static double Rate(double npr, double pmt, double Pv, double Fv,double guess, double error){<BR>          double rate = 0.01;<BR>          <BR>          if (guess > 0)<BR>               rate = guess / 100;<BR>          double a = 0.0;<BR>          if (pmt == 0) {<BR>               return (Math.pow(Fv/Pv,1/npr) - 1) * 100;<BR>          } else {<BR>               while(1==1) {<BR>                    a = Pv * rate * Math.pow((1 + rate),npr) / ( Math.pow(1 + rate,npr)- 1);<BR>                    System.out.println(a);<BR>                    if ( Math.abs(a - pmt) < error) {<BR>                         return rate * 100;<BR>                    } else if (Math.abs(a) > pmt) {<BR>                         rate -= 0.00001;<BR>                    } else {<BR>                         rate += 0.00001;<BR>                    }<BR>               }<BR>          }<BR>          <BR>     <BR>     }<BR><BR><BR>MAXL to register the CDF:<BR><BR>CREATE OR REPLACE FUNCTION '@JRate'<BR>AS 'com.hyperion.essbase.cdf.stats.Stats.Rate(double,double,double,double,double,double)'<BR>SPEC '@JRate(npr, pmt, Pv, Fv, guess, error)'<BR>COMMENT 'Return the rate where npr: number of payments, pmt: periodic payment, Pv: present value, <BR>Fv: future value, guess: rate guess (If 0 then the default is 10%), error: error tolerance on payment estimate';<BR><BR><BR>Usage in a clac script:<BR><BR>Example 1: Number of payment = 26, Present Value = 500, Future Value = 572. What is the rate?<BR>@JRate(26,0,500,572,5,0.1) = 0.5188%<BR>Excel returns RATE(26,0,-500,572) = 0.5188%<BR><BR><BR>Example 2: Number of payment = 360, Payment = 665, Present Value = 100,000. What is the rate?<BR>@JRate(360,665,100000,0,5,0.1) = 0.5829%<BR>Excel returns RATE(360,665,-100000) = 0.5830%<BR><BR>Send me your direct email address if you want the actual files.<BR>

  • Java CDF hangs up Essbase application - Kindly help

    Hi!
    I compiled the below java code which i am using to run a batch script from a calculation script using RUNJAVA.
    import java.*;
    import java.io.*;
    import com.hyperion.essbase.calculator.*;
    public class IRUN {
    public IRUN() {
    public static void main(com.hyperion.essbase.calculator.Context ctx, String[] args)
         try{
              Runtime.getRuntime().exec ("cmd /c start E:\\Hyperion\\ISIS_Scr\\email_users.bat");
         catch(Exception e){
    *After I run the calculation script which simply says RUNJAVA IRUN; the batch script executes successfully and I get an email from the batch script. But after that if I stop my application and try starting it again I get an error saying "Unable to load database [Basic]". The application log gives the below error:*
    [Wed Mar 03 09:00:46 2010]Local/Demo///Error(1120006)
    Unable to lock file [E:\Hyperion\products\Essbase\EssbaseServer\APP\Demo\Basic\Basic.esm]. Essbase will try again after a short delay.
    [Wed Mar 03 09:00:47 2010]Local/Demo///Error(1120005)
    Unable to lock file [E:\Hyperion\products\Essbase\EssbaseServer\APP\Demo\Basic\Basic.esm]. Please make sure other processes do not access Essbase files while Essbase server is running.
    [Wed Mar 03 09:00:47 2010]Local/Demo///Warning(1007089)
    Unable to open [E:\Hyperion\products\Essbase\EssbaseServer\APP\Demo\Basic\Basic.esm] for database [Basic]
    [Wed Mar 03 09:00:47 2010]Local/Demo///Error(1002097)
    Unable to load database [Basic]
    [Wed Mar 03 09:00:47 2010]Local/Demo///Error(1002097)
    Unable to load database []
    [Wed Mar 03 09:00:47 2010]Local/Demo///Error(1002097)
    Unable to load database []
    *Please note that I registered the IRUN class's main function as a global function instead of local to an application. I consistently end up screwing applications once I try using this java function in multiple applications.*
    Thanks!
    Arun

    I managed to fix this problem. The batch script which was being called from the Java class did not have an exit statement at the end. I included that and the problem with application crashing got resolved. It looks like maybe the script is locked in memory or something like that.
    The exact reason as to how this would affect .esm file in the database is still not clear to me. Any clarifications would be great.
    Thanks,
    Arun
    [email protected]

  • How to get TRIMMEAN  excel function in Essbase

    Hi,
    I am in Essbase 11.1.2, where we have a requirement to calculate avg of some value by following Excel function business use in Excel.
    IF(TRIMMEAN(AS13:AZ13,$BA$11)<0,0,TRIMMEAN(AS13:AZ13,$BA$11))
    just wanted to know if anyone use this in Essbase or any workaround to get this function value in Essbase.
    -KP

    You have to go through DBAG for more info on @XREF
    here is example of script we use
    SET UPDATECALC OFF;
    FIX(members in employee, members in entity)
    SET CREATENONMISSINGBLK ON;
    "Account_1" = @XREF(_Location alias, "PRODUCT");
    ENDFIX
    what we do is pull data from account_1 of databse 2 to database 1.
    you should specify location alias in database before executing this script.
    good luck.

  • Function in Essbase Add-In

    <p>In Excel, you can click on the fx that's beside the formula barto display the Insert Function window. There's a category called"Essbase Add-In" in the drop-down list box.</p><p> </p><p>Which directory would I paste my macro excel file, in order forthe macro function to display in this list?</p><p> </p><p>Thanks in advance.</p>

    Wouldn't HypQueryMembers do what you want?
    It sounds exactly like EssVGetMemberInfo, right down to the number 6 being the same generation.
    Regards,
    Cameron Lackpour

  • Problem with time series functions against Essbase

    Hello all,
    I'm having problems with displaying correct results when using AGO function in OBIEE. I'm using Essbase 9.3.1 and OBIEE 10.1.3.4.1. Logical column named MAGO1 is created in repository like this: IFNULL( AGO("Measure01", Time.Month, 1), 0). In Answers when I use columns Measure01,MAGO1,Time.Month with filter just on Time.Month column results are OK. When I put another filter, for example Dim1.Gen2,Dim1, MAGO1 returns zero as a result. But when I put Dim1.Gen2,Dim1 also as a column and as a filter results are OK. I don't want to have Dim1.Gen2,Dim1 as a column but just in a filter. Also hiding column is not an option. I want to have grouped results and not multiple rows for one month if I remove filter Dim1.Gen2,Dim1. Filter is selected on prompt in dashboard and can be some value from Dim1.Gen2,Dim1 or All Choices. Reason for this is that I'm using this answers report as a data source for BI Publisher so additional formatting on answers report isn't helpful.
    I am suspecting that something is wrong with hierarchy it time dimension or other dimensions. Or maybe MDX is not generated right ? If you need more details regarding my repository or configuration please feel free to ask. Any help is greatly appreciated.
    Thanks,
    D.

    I am using BI Publisher and Answers report as data source. Making changes like hiding column or displaying results as pivot table won't help in this case.
    Anyway I did discover something else. When I put in report logical columns with ago function they return correct results. But when I add additional logical column with todate function all logical columns with ago and todate function return zero as a result. Also this happens only when result is more than one row. If you have only one row, for example grand total level of dimension, than result is OK, but if you have more rows on a lower level than zero values appear.
    Some columns that are used in filter do not appear as columns in report. This is the main problem. If I put all columns that are filtered in report than the result is OK. But I don't want to do this because I want to have option to select values on dashboard prompt on different levels.
    Hope this narrows the problem.
    Thanks,
    D.

  • Error Using DataExport function in Essbase

    Hi there,
    I'm using Hyperion Essbase version 9.3.1.
    And rite now I'm trying to export data in Essbase by the new CalcScript function DataExport directly to SQL server.
    I have 11 dimensions in my Essbase application. I did create 10 fields in SQL server for storing members information and 12 other fields for periodic data. Just, the time when I export data, all the rows returned with only 7 fields for members information and 12 data fields for periodic data.
    Can anyone help? Please help!
    Best regards,
    Antony

    Antony,
    So when you use a calc script like the below:
    SET DATAEXPORTOPTIONS
         DataExportLevel ALL ;
         DataExportDynamicCalc OFF ;
         DataExportRelationalFile ON ;
         DataExportOverwriteFile ON ;
    DATAEXPORT "File" "," "b:\exports\jan.txt" "#MI";
    Your export works just as you want? (I realize you have lots of other logic, but for the sake of argument use the above).
    And then when you take the exact same code except that the DATAEXPORT command now looks like:
    SET DATAEXPORTOPTIONS
         DataExportLevel ALL ;
         DataExportDynamicCalc OFF ;
         DataExportRelationalFile ON ;
         DataExportOverwriteFile ON ;
    DATAEXPORT "DSN" "cur_sale" "newyork" "admin" "password";
    You don't get the same results?
    I get the same results regardless. Yes, one is written to a table as defined by the DSN and the other a text file but the contents are exactly the same.
    Are you seeing different rows/columns? If so, that would either suggest your table is somehow limiting what gets written to the RDBMS (it would be nice to think that Essbase would log this as an error/fail) or there is a bug in the export. I have not come across this issue.
    Regards,
    Cameron Lackpour

  • Steps to install Custom Defined Function in Essbase and Planning

    Hi,
    We want to write some CDF in Essbase which we can use in Calc Scripts in Essbase and Business Rule in Planning.
    Can someone plz share the steps describing which all files to update how to install and configure. Details will be helpful.
    Regards,
    GS

    By the name, with parameters you were defining :)
    For example,
    @JExportTo("file","c:/flat.txt",",","",
    @LIST(
    @NAME(@CURRMBR(Market)),
    @NAME(@CURRMBR(Product)),
    @NAME(@CURRMBR(measures)),
    @NAME(@CURRMBR(year))),
    @LIST(actual,budget,Variance))

  • Calc Function in Essbase

    Can some on explain the below expression what exactly it returns as a result.i don't know this function "@JNthMbr" and "@Name".
    I know that @Member function returns with the name of the member.
    (@ISMBR(@Member(@JNthMbr(@Name(@Descendants("Year")), 1))))

    What's in your Years dimension? FY10, FY11, FY12, etc? Or 2010, 2011, 2012? Or Jan, Mar, Feb? Or Jan FY10, Mar FY10, Apr FY10, etc?
    I am guessing that you have a Custom Defined Function (CDF) at play here with the @JNthMbr. I did a quick search at the samplecode.oracle.com Date CDF and don't see that function, so perhaps you have one custom written (they are called CDFs after all).
    @NAME converts a member name to a string which I'll bet the CDF requires. If you look at the 11.1.1.3 example, it even shows passing a member name to a CDF. See: http://download.oracle.com/docs/cd/E12825_01/epm.111/esb_techref/name.htm
    Once the CDF is done, it needs to convert that string back into a member name. That's what @MEMBER does. See: http://download.oracle.com/docs/cd/E12825_01/epm.111/esb_techref/member.htm
    And then there's an @ISMBR test to see what the member value is. I'm a little unclear why all of the trouble was gone through as the members of the dimension can just be tested like this: IF(@ISMBR(membername)) So why all the complexity? No one writes a CDF for fun (okay, some people do, but not many).
    Is the code figuring out a month based on a quarter? Or a Year Total? That's hard to guess without knowing what your Years hierarchy looks like.
    Regards,
    Cameron Lackpour
    Edited by: CL on Oct 7, 2010 5:49 AM
    Edited because I couldn't concentrate long enough to finish the @ISMBR sentence.

  • Ago function against Essbase

    Hi,
    I'm finding very big problems in using AGO function against a Essbase source (BIEE 11g & EPM 11.1.2).
    Any experiences on that?
    any feedback will be apreciated,
    Regards,
    Daniele

    Hi Peak,
    I'm not able to make it works, differents errors are generated:
    sometimes:
    SQOIMDXGeneratorHyperion.cpp
    others:
    [nQSError: 96002] Essbase Error: Syntax error in input MDX query on line 10 at token '[' (HY000)
    I'm building simple query on these cubes...
    I'll try to describe you better the problems asap...
    But I'm looking if I'm the only finding this issues (and is related to my environment) or if someone else found this kind of problem.
    Regards,
    Daniele

  • XREF FUNCTION IN ESSBASE

    Hi
    I am trying to utilize the functionality of the Xref function in one of the modules of my project.
    could anyone let me know if xref works fine if my target database resides on a different server and on a different enviorment than my Source database.
    if yes what performance issues could i be facing in the process for the same.
    Thanks
    NJ

    from docs: YES
    Data source: the database that is queried by the @XREF function. This database may be remote (that is, on a different machine than the data target).
    But never tried ...you should be first person :)

Maybe you are looking for

  • System image,Restore

    Back In late Nov I created a system image, today I restored that Image successfully, not because I needed to. I created a filehistory and created a storage space and used the storage space drive for filehistory after I created my system Image. Anyone

  • Can I partition an external drive and install 10.6.8 so I can run some older software?

    I have older software that won't run on my 21.5 iMac. Can I partition a 3TB Lacie external drive, then install 10.6.8 on it so I can use the older software?

  • PHP ldap_search against DS 5.2

    We are switching from NIS to LDAP using Sun One Directory server 5.2. I have to convert all our web PHP login scripts that are NIS based to LDAP. I'm having difficult time just trying to do simple ldap_search, always coming up with "No such object in

  • Someone please help me restore my iPod!

    I recently bought an I pod fifth-generation on Kijiji. When I got the iPod there was a passcode on it the old owner told me I could just hook it up to my computer and restore it. But when I got it home I restored it but it wanted the previous owners

  • How to restore my icloud backup and where can I find the setup assisant in my new ipad

    Dear Sir Can you help my on how to restore my icloud backup and where can I find the setup assisant in my new ipad? Thanks and Regards, Clare