How to check if the member exists in essbase cube using IF cond.

Hello,
I have a requirement to validate certain accounts and if they exist or not and use them in calc. We have certain list of percent accounts which have some driver amounts. If the user selects the parent account, it should automatically calc with percent accounts to generate the values for all its children.
The issue is we have lots of accounts and lots of percent accounts, its not that all accounts have the percent accounts. thats the problem.
When I Fix at a high level of accounts, am getting this error which says that member doesnt exists and return empty member set.
Error executing formula for [Revcnt] (line 49): attempt to cross a null member in function [@X]
Its the same even if I use Set Emptymembersets ON;
The script is below,
FIX(@Relative({SelectAccount},0),
"Revcnt"(
IF(@ISMBR(@MEMBER(@CONCATENATE(@NAME(@CURRMBR("Account")),"%"))
Condition ;
ENDIF);
ENDFIX
Is there a command to validate if the member exists in the cube or not???
We are using 11.1.2.1 Essbase on Windows 64bit.

The silly question first:
Why not user dynamic calc for the members you need? When updating the structure, you create the formula. Your verification if a member exists will be done in, for example, a select statement that create the dimension.
Now the complex idea:
Is it possible in your application recreate the script every time you update the dimension?
My example:
Here we have a cube that change the account dimension very often. So the cube have an CalcScript that need to be updated every time the dimension changes.
For that purpose, we have a process that read the database and recreate the calc with the correct members.
I never tested that solution with calc manager, but i think it's less complex than recognize the member itself during calculation.

Similar Messages

  • How to check Whether the File is in Progress or used by some other resource

    Hi All,
    I am retrieving a file from the FTP server using Apache commons FTP.
    I need to check whether the file is fully retrieved or in progress.
    for now i can able to use the file which is partially retrieved. it is not throwing any file sharing exception or i am unable to find whether it is in progress.
    How to check whether the file is in progress ? or The file is accessed by some other resource ?
    Pls Help me.
    Thanks,
    J.Kathir

    Hi Vamsi,
    Explicitly such kind of requirement has not been catered and i dont think you would face a problem because any application that is writing to a file will open the file in the read only mode to any other simultaneous applications so i think your concerns although valid are already taken care off .
    In the remote case you still face a problem then as a work around. Tell the FTP administrator to set the property to maximum connections that can be made to ftp as one. I wonder if you have heard of the concept of FTP handle , basically the above workaround is based on that concept itself. This way only one application will be able to write.
    The file adapter will wait for its turn and then write the files.
    Regards
    joel
    Edited by: joel trinidade on Jun 26, 2009 11:06 AM

  • How to check if the path exists and if not, create it

    I'm trying to check if the path given by the user already exists. In case it doesn't, I'd like to create a folder with name given in the same directory.
    Let's say path_1: "C:\folder1" and path_2: "C:\folder2", and suppose that folder1 exists but folder2 doesn't. Then if the path given by the user is the path_1, then ok, nothing happens, but if it is the path_2, then the programm should realize that it doesn't exist in C:\ and should ask you whether you want to create it or not.
    I know how to do that for files, but not for folders!
    Thanks in advance

    hi guys,
    i`m new at this so im gonne prob. ask a noob`s question...
    i have the same issue as in the title.
    but when i run :
                                              int a,b,c,d,folderexist=-1;
                                             switch (event)
                                                       case EVENT_COMMIT:
                                                                                 GetCtrlVal (panelHandle, PANEL_NAME, name);
                                                                                 folderexist = GetFileAttrs (name, &a, &b, &c, &d);
                                                                                 if (folderexist==-1)
                                                                                           MakeDir (name);
                                                                                           sprintf...........
                                                                                 else.......
    if the folder do exists it works perfectly.
    if it doesnt - it breaks the run and gives me the message :
                          NON-FATAL RUN-TIME ERROR: "NewScap.c", line 317, col 27, thread id 0x00001B98: Library function error (return value == -1 [0xffffffff]).
    (and mark the getfileattrs line in blue)
    and when i check the "folderexits" value it shows 2!? not 1 not 0 not even -1, but 2...
    can somone please help ?
    thanks 
    Adi.

  • How to check if the table exists in teh database

    Hi,
    I am using MS Acess and how do i check using the query if the table already exist in the db?
    What is the exact query. Can any one help me.
    Thanks
    Deepti

    This will do it for you and print out the results using JDOM. - %
    package database;
    import org.jdom.Document;
    import org.jdom.Element;
    import org.jdom.output.XMLOutputter;
    import java.sql.Connection;
    import java.sql.DatabaseMetaData;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.ResultSetMetaData;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.ArrayList;
    import java.util.List;
    public class TableLister
       public static final String DRIVER = "sun.jdbc.odbc.JdbcOdbcDriver";
       public static final String DATABASE = "jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=C:\\Documents and Settings\\Michael\\My Documents\\Projects\\Java\\Forum\\data\\DataConnection.mdb";
       public static final String USERNAME = "admin";
       public static final String PASSWORD = "";
       public static void main(String[] args)
          Connection conn = null;
          ResultSet tables = null;
          String driver = "";
          try
             driver = ((args.length > 0) ? args[0] : DRIVER);
             String url = ((args.length > 1) ? args[1] : DATABASE);
             String username = ((args.length > 2) ? args[2] : USERNAME);
             String password = ((args.length > 3) ? args[3] : PASSWORD);
             Class.forName(driver);
             conn = DriverManager.getConnection(url, username, password);
             DatabaseMetaData meta = conn.getMetaData();
             // Bring back ALL tables and views, including SYSTEM tables.
             tables = meta.getTables(null, null, null, null);
             ResultSetMetaData rsmd = tables.getMetaData();
             int numColumns = rsmd.getColumnCount();
             List columnNames = new ArrayList();
             for (int j = 0; j < numColumns; ++j)
                columnNames.add(rsmd.getColumnName(j + 1));
             Element root = new Element("tables");
             int tableCount = 0;
             while (tables.next())
                Element table = new Element("table");
                table.setAttribute("id", Integer.toString(++tableCount));
                for (int j = 0; j < numColumns; ++j)
                   Element column = new Element((String) columnNames.get(j));
                   column.setText(tables.getString((String) columnNames.get(j)));
                   table.addContent(column);
                root.addContent(table);
             conn.close();
             Document doc = new Document(root);
             XMLOutputter outputter = new XMLOutputter("   ", true);
             System.out.println(outputter.outputString(doc));
          catch (ClassNotFoundException e)
             System.err.println("Couldn't load JDBC driver class " + driver);
             e.printStackTrace();
          catch (SQLException e)
             System.err.println("SQL state: " + e.getSQLState());
             System.err.println("SQL error: " + e.getErrorCode());
             e.printStackTrace();
          catch (Exception e)
             e.printStackTrace();
          finally
             close(tables);
             close(conn);
       public static void close(Connection c)
          try
             if (c != null)
                c.close();
          catch (SQLException e)
             e.printStackTrace();
       public static void close(Statement stmt)
          try
             if (stmt != null)
                stmt.close();
          catch (SQLException e)
             e.printStackTrace();
       public static void close(ResultSet result)
          try
             if (result != null)
                result.close();
          catch (SQLException e)
             e.printStackTrace();
    }

  • How to check for the sub folder in the document library Is already Exist using CSOM?

    Hi,
    My requirement is to create the  folder and sub folder in SharePoint document library. If already exist leave it or create the new folder and the subfolder in the Document library using client side object model
    I able to check for the parent folder.
    But cant able to check the subfolder in the document library.
    How to check for  the sub folder in the document library?
    Here is the code for the folder
    IsFolder alredy Exist.
    private
    string IsFolderExist(string InputFolderName)
    string retStatus = false.ToString();
    try
    ClientContext context =
    new ClientContext(Convert.ToString(ConfigurationManager.AppSettings["DocumentLibraryLink"]));
                context.Credentials =
    CredentialCache.DefaultCredentials;
    List list = context.Web.Lists.GetByTitle(Convert.ToString(ConfigurationManager.AppSettings["DocumentLibraryName"]));
    FieldCollection fields = list.Fields;
    CamlQuery camlQueryForItem =
    new CamlQuery();
                camlQueryForItem.ViewXml =
    string.Format(@"<View  Scope='RecursiveAll'>
    <Query>
                                            <Where>
    <Eq>
    <FieldRef Name='FileDirRef'/>
    <Value Type='Text'>{0}</Value>
                                                </Eq>
    </Where>
    </Query>
                                </View>",
    @"/sites/test/hcl/"
    + InputFolderName);
                Microsoft.SharePoint.Client.ListItemCollection listItems = list.GetItems(camlQueryForItem);
                context.Load(listItems);
                context.ExecuteQuery();
    if (listItems.Count > 0)
                    retStatus =
    true.ToString();
    else
                    retStatus =
    false.ToString();
    catch (Exception ex)
                retStatus =
    "X02";
    return retStatus;
    thanks
    Sundhar 

    Hi Sundhar,
    According to your description, you might want to check the existence of sub folder in a folder of a library using Client Object Model.
    Please take the code demo below for a try, it will check whether there is sub folder in a given folder:
    public static void createSubFolder(string siteUrl, string libName, string folderServerRelativeUrl)
    ClientContext clientContext = new ClientContext(siteUrl);
    List list = clientContext.Web.Lists.GetByTitle(libName);
    CamlQuery camlQuery = new CamlQuery();
    camlQuery.ViewXml =
    @"<View Scope='RecursiveAll'>
    <Query>
    <Where>
    <Eq>
    <FieldRef Name='FSObjType' />
    <Value Type='Integer'>1</Value>
    </Eq>
    </Where>
    </Query>
    </View>";
    //camlQuery.FolderServerRelativeUrl = "/Lib1/folder1";
    camlQuery.FolderServerRelativeUrl = folderServerRelativeUrl;
    ListItemCollection items = list.GetItems(camlQuery);
    clientContext.Load(items);
    clientContext.ExecuteQuery();
    Console.WriteLine(items.Count);
    if (0 == items.Count)
    //create sub folder here
    Best regards
    Patrick Liang
    TechNet Community Support

  • How to check whether a file exist in the program folder or not?

    Hi guys,
    how to check whether a file exist in the program folder or not? Let is say i recieve a file name from user then i want to know if the file is there not and act on that base.
    abdul

    Look at the class java.io.File and the .exists() method:
    http://java.sun.com/j2se/1.4/docs/api/java/io/File.html

  • How to check if a member is a base member

    Hi,
    I want to check in script logic if a member is a base member and only then create a record.
    Does sb know how to check if a member is a basemember with the WHEN/IS statement?
    Thanks!

    Hi,
    in the beginning, I once tried to write aggregated values using a script, just to find out what will happen. I modified the script and the dimension structure and managed to "destroy" the whole application by doing that somehow. The application worked normally until I decided to optimize it, then, I got an error saying sth. like "ID already exists..." (the ID from the aggraged value) and I couldnt use the cube any more - I guess combining data from the WB cube and the fact cube with both aggregated values and "fixed" values for the aggregated members was too much/created the inconsistencies... after that experience, I got heavily depressed and didnt test writing aggregated values any more... afterwards looking at it philosophically, the database can do several things to the children's values when their parent's value is changed to an arbitrary value and not in all scenarios, it is obvious for the machine how to keep everything consistent :P.
    Edited by: HPC-Berater on May 12, 2009 3:31 PM

  • Please help me how to check a material does existed group code in system (w

    Hi all,
    Please help me...
    I have inputted quantity for  tx MC 94  but when I input them into  tx MC94, I met  a message " Structure  not yet maintained for  this conbination characterstics". Step by step to show a error message as below:
    Step 1: Launch MC 94
    step 2: Enter Planning
    Step 3: Enter  Prod.Code. Material (ex: enter material code :0101010260008, this code is existed  Prod.Code )
    Step 4: Click on "Inactive Version " button
    ==> A error message is showed.
    Please help me how to check a material does existed group code in system (which table to  check  it)?
    How to record the message" Structure  not yet maintained for  this conbination characterstics" to catch up it in my program?
    Thank in advance.

    Karenloria,
    1. Check in MC8C, which Infostructure is used for Planning type "Planning" or the one you are entering in the intial screen of MC94.
    2. Using transaction MC63 for the infostructure identified in step 1, check the planning hierarchy maintained. If this product is not maintined maintain using MC62.
    You can also check using SE16 transction the current infostructe records(Plan) for the table name = infostructure identified in step 1.
    Regards,
    Prasobh

  • How to check if the directory is created using create or replace directory

    Hello,
    I have create a directory as below:
    Create or Replace Directory TEST_DIR AS 'C:\ABCD'
    How to check if the directory is created or not? Is there any query for that?
    Thanks in advance.
    PK

    This command does create a directory object inside the database. It does not mean that a directory is created outside the database (e.g. the file system).
    You can check if this oracle directory exists with:
    untested
    select * from user_directories;To check if the directory in the OS exists and if the database has the appropriate permissions to read/write to this directory you need to connect as user "oracle" (default installation) and try to get to this folder.
    Edited by: Sven W. on Jun 16, 2010 4:20 PM - Typo corrections

  • How to check if database/table exists in MYSQL

    I am writing a program which accesses databases in MYSQL, is there any way to check if the databases exists on the MYSQL server and if not create one && to check if a table exists and create one of if it does not

    OK, found out that as special permissions needed to create databases I assume it cannot be done via my app but how about Tables

  • How to check whether the Application Server directory exits or not

    Hi,
    I have a selection screen in which I give the Application server file name(UNIX file) as input. Here, I would like to check whether the Server directory exists or not.
    Let us say, the path I gave in the selection screen is /usr/sap/tmp/testfile.txt . Here, the file name is testfile.txt and the server directory is /usr/sap/tmp . I would like to check whether this directory /usr/sap/tmp exists in the server or not. I am not bothered about the file name as I am going to write data into the file. I am mainly concerned about whether the directory exists in the server or not. and one more thing... this is the Application Server path not the Local path.
    Can anyone help me on the same how to check whether the server directory exists or not.
    Thanks in advance.
    Best Regards,
    Pradeep.

    Also you can use the FM EPS_GET_DIRECTORY_LISTING for this purpose.
      Store the directory name
        l_dpath = p_file+0(l_no).
      Validate the directory of the application server
        CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING'
          EXPORTING
            dir_name               = l_dpath
          TABLES
            dir_list               = l_i_dlist
          EXCEPTIONS
            invalid_eps_subdir     = 1
            sapgparam_failed       = 2
            build_directory_failed = 3
            no_authorization       = 4
            read_directory_failed  = 5
            too_many_read_errors   = 6
            empty_directory_list   = 7
            OTHERS                 = 8.
      If any problem occurs with the directory then display proper
      error message
        IF sy-subrc <> 0.
        Display error message
          MESSAGE e018 WITH 'Problem with directory entered'(008).
        ENDIF. " sy-subrc <> 0
    Regards,
    Joy.

  • How to view all the users existing in a Client

    Hi
    Can any one help me, How to view all the users existing in a Client (Other than SM04 and AL08).
    I want to view not only the active users, but all existing users.
    Thanks in Advance
    Chandra

    Hi,
    Check table devaccess. to get all developers list
    Reward points if helpful.
    Regards,
    Mukul
    Edited by: Mukul Sharma on Jun 2, 2008 12:10 PM

  • Example of generating excel dynamically in ssis? geting error [Excel Destination [190]] Error: Opening a rowset for "Excel_Destination$" failed. Check that the object exists in the database.

    example of generating excel dynamically in ssis? geting error [Excel Destination [190]] Error: Opening a rowset for "Excel_Destination$" failed. Check that the object exists in the database.

    Hi Vijay
    Can you be little bit more specific, did you receive this error when you are designing this pacakge using BIDS
    Becuase when you are designing this pacakge in BIDS, you need to manaually create a excel sheet manually for the first time you run,
    are you creating excel sheet using execute sql task and excel connection with input from a variable?
    Did you receive this error in validation phase or execution phase ?
    Can you share your query to create table in excel ?
    http://sqljunkieshare.com/2012/02/28/how-to-create-and-map-excel-destination-dynamically-in-ssis/
    Use the above post

  • When trying to download yosemite it sais that i do not have enough memory. when i look at my memory use it shows that 111.00gb of space is used by movies but when i go th the movie folder it is empty. how can i remove the non existant movies.

    when trying to download yosemite it sais that i do not have enough memory. when i look at my memory use it shows that 111.00gb of space is used by movies but when i go th the movie folder it is empty. how can i remove the non existant movies.

    Freeing Up Space on The Hard Drive
      1. See Lion/Mountain Lion/Mavericks' Storage Display.
      2. You can remove data from your Home folder except for the /Home/Library/ folder.
      3. Visit The XLab FAQs and read the FAQ on freeing up space on your hard drive.
      4. Also see Freeing space on your Mac OS X startup disk.
      5. See Where did my Disk Space go?.
      6. See The Storage Display.
    You must Empty the Trash in order to recover the space they occupied on the hard drive.
    You should consider replacing the drive with a larger one. Check out OWC for drives, tutorials, and toolkits.
    Try using OmniDiskSweeper 1.8 or GrandPerspective to search your drive for large files and where they are located.
    You will need a minimum of 10-12 GBs of free space to install Yosemite, however, that is a bare minimum and should be at least twice that amount.

  • JavaScript: How to check if a file exists.

    Hello Everybody,
    Can you tell me how to check if a file exists using JavaScript and Internet Explorer.
    Browsing on this website I could read about the command "f.exists()" and it was necessary to include "java.io.*".
    Should I use this same command and should I include the same files? Or are there other files and other commands?
    Thanks in advance.

    sorry ya. there is no command to check whether a file exists using javascript. The following code says the object name and value. But it can't say whether the file exists in the harddisk or .. Javascript cannot access database and system resources. If the file exists or not can be checked through the application (ASP, CFML, ..) you are using.

Maybe you are looking for

  • Windows 8.1 upgrade issues on Satellite P870 - PSPLFA

    Hi there, For better or worse over the weekend I have downloaded windows 8.1 onto a toshiba laptop (p870 PSPLFA model) that was running windows 8. Video card is NVIDIA GeForce GT 630M 2GB with Optimus + Intel HD Graphics 4000 http://www.mytoshiba.com

  • How do I change my Facebook login details for the inbuilt Facebook in Mountain Lion?

    Just after i updated my iMac to 10.8.2 my friend signed in to Facebook and now the inbuilt facebook notifications etc come up as his and I cant find where to change these login details?

  • Publishing to mp4 almost doubles the file size

    I have been trying to find someone in the forum with a similar problem but with no success. I hope someone can help me. I have a Captivate 7 file that is 59 MB. The resulting mp4 file after publishing is 107 MB. When I publish the same file to swf it

  • Slow Query time with Function in Group By

    I have a PL/SQL function that computes status based on several inputs. When the function is run in a standard query without a group by, it is very fast. When i try to count or sum other columns in the select (thus requiring the Group By), my query re

  • Dreaded dotted gray lines - after rebuild

    Recently copied my iPhoto Library to my external hard drive about 3 times, as I added a few more photos (was trying to finish out my 08 library and start a new one). After the 2nd time, I think, I started getting the dotted gray lines to appear for a