Dimension Logic Error

Hi Gurus,
I wrriten a dimension logic for ACCT while validationg the logic I got below error.
failed to expand K2 function for dimension PACCT's memeber formula
MDX statement error :"Error occured when starting the parser :timeout d"
Pls give me your valuable suggestions.
Thanks,
Pallavi

Check your MDX parser in ABAP side.
Note 1032461 - MDX parser does not start

Similar Messages

  • Logical Error in Script Logic

    Hello Experts,
    Please provide your guidance for the following scenario.
    I need to calculate the 'Accumulated Depreciation' for every month, based on the amounts in the 'AccumDep' and the 'Depreciation' accounts.
    In other words, the value of the Accumulated Depreciation for the month of Feb should be equal to (Accumulated Depreciation in Jan + Depreciation in Jan), and so on.
    To accomplish this, I have written the following script logic.
    *WHEN ACCOUNT
    *IS AccumDep, Depreciation
         *FOR %MON% = 2009.FEB,2009.MAR,2009.APR
              *REC(FACTOR=1, ACCOUNT=AccumDep, TIME=%MON%)
         *NEXT
    *ENDWHEN
    *COMMIT
    The above logic was validated without any 'syntax' errors.  However, I do not see the desired results, as the Accumulated Depreciation is not getting updated every month.  The amount from FEB appears for MAR & APR also.
    Therefore, could you please review the above script and let me know if there are any 'logical' errors?
    All your guidance is greatly appreciated.  Thanks...

    Hi,
    You are not getting the desired result because you are trying to aggregate the depreciation and the accumulated depreciation of the same month and post the result again in the same month. Lets say the code is working for 2009.MAR. You are trying to add the depreciation and accumulated depreciation of 2009.MAR. However, you still dont have the acc depreciation of 2009.MAR. You basically need to take the acc depreciation of the previous month.
    You can try something like:
    *WHEN ACCOUNT
    *IS Depreciation
         *FOR %MON% = 2009.FEB,2009.MAR,2009.APR
              *REC(EXPRESSION = %VALUE% + ([ACCOUNT].[AccumDep],[TIME].Previous), ACCOUNT=AccumDep)
         *NEXT
    *ENDWHEN
    *COMMIT
    You can have a property called Previous to store the previous month of each period in the time dimension.
    Hope you got the idea.

  • Aggregation Rule in a Dimension Logical Table

    Hi!
    I have a Dimension Logical Table which is related (one-to-many) with several Fact Logical Tables.
    This Dimension has 1 logical column which has an aggregation defined:
    - Account Last Creation Date = Max(D_CUSTOMER_ACCOUNT.CREATION_DATE)
    When I use Answers to build a report using this Logical Columns the following error appears:
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 14026] Unable to navigate requested expression: IWS Client - Last Account Creation Date:[DAggr(ACCOUNT.IWS Client - Last Account Creation Date by [ ACCOUNT.TLC Account Warehouse Key Account Table] SB CUSTOMER ACCOUNT)]. Please fix the metadata consistency warnings. (HY000)
    SQL Issued: SELECT ACCOUNT."IWS Client - Last Account Creation Date" saw_0 FROM "VFPT - Upgrade Siebel"
    How can I workaround this issue?
    Thanks.

    Hi!
    My understanding is that you have set an aggregation (in the aggregation tab) to a mapped field.
    Wildmight is right, you can't use aggregation is dimension tables. Which makes sense.
    Instead, you can try to create a new logical field with the name of your choice, checking the "use existing logical columns as the source" check box and put your formula in it. At the right of the text box, there's a little button [...] that can help you building a correct formula.
    I hope this helps.
    Ced.

  • Hi Friends, I need some help on Dimension Logic....

    Iu2019m trying to implement a hybrid scenario on Dimension u201CCategoryu201D.  This should show me the u201CActualu201D scenario when the value of FCSTTIME property (of Hybrid member) is greater than the time selected member (base element), the opposite, show me the u201CBudgetu201D.  This allows to the customer to see a Full Year P&L, Balance, Etc.  I choose Dimension Logic, because these values (Actual, Budget, and Forecast) are stored in the database, and to avoid an unnecessary space used to store them again.  Take a look to these formulas,
    1) Iif([Time].currentmember<[Category].currentmember.properties("FCSTTIME"),[Category].[Actual],[Category].[Ppto])
    2) Iif([Category].currentmember.properties("FCSTTIME")>[Time].currentmember,[Actual],[Ppto])
    3)  Iif(Leaf([Time].CurrentMember),Iif(Value([Time].currentmember.Properties(u201CTIMEIDu201D))<Value([Category].currentmember.properties("FCSTTIME")),[Actual],[Ppto]),Null)
    4)  Iif(Leaf([Time].CurrentMember),Iif([Time].currentmember.Properties(u201CTIMEIDu201D)<[Category].currentmember.properties("FCSTTIME"),[Actual],[Ppto]),Null)
    All of these failu2026. The admin console show me an error message when I process the dimension choosing the option u201Cvalidate formula onlyu201D
    FCSTTIME and TIMEID properties, have dates in this format: for example 20080100, to represent 2008.Jan.
    Thanks for your valuable help...

    Hi,
    Check these links..
    http://help.sap.com/saphelp_erp2005/helpdata/en/ea/e9b7234c7211d189520000e829fbbd/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/d1/2e4114a61711d2b423006094b9d648/frameset.htm
    http://www.sap-img.com/sap-sd/sales-bom-implementation.htm
    http://www.sap-basis-abap.com/sappp007.htm
    Thanks
    vijay

  • Logical error in the query

    create table my_employee
    (id number(4)primary key,
    last_name varchar2(25),
    first_name varchar2(25),
    userid varchar2(8),
    salary number(9,2)
    I want to write an INSERT statement to MY_EMPLOYEE table . Concatenate the first letter of the first name and first seven characters of the last name to produce user ID using a single sql statement
    I wrote the query like this and i am getting logical error
    insert into my_employee
    values(&id,'&last_name','&first_name',substr('&&first_name',1,1)||substr('&last_name',1,7),&salary);
    SQL> insert into my_employee
    2 values(&id,'&last_name','&first_name',substr('&&first_name',1,1)||substr('&last_name',1,7),&sal
    ary);
    Enter value for id: 20
    Enter value for last_name: popopopp
    Enter value for last_name: qwertyyuu
    Enter value for salary: 300000
    old 2: values(&id,'&last_name','&first_name',substr('&&first_name',1,1)||substr('&last_name',1,7),
    new 2: values(20,'popopopp','o',substr('o',1,1)||substr('qwertyyuu',1,7),300000)
    1 row created.
    it is asking the last_name two times

    you can do it with a .sql script
    c:\my_emp.sql
    PROMPT
    PROMPT instering my_employees
    PROMPT
    ACCEPT ID NUMBER PROMPT 'ID ? : '
    ACCEPT FIRST_NAME CHAR PROMPT 'FIRST_NAME ?: '
    ACCEPT LAST_NAME CHAR PROMPT 'LAST_NAME ?: '
    ACCEPT SALARY NUMBER PROMPT 'SALARY ? : '
    insert into my_employee values(&id,'&last_name','&first_name',substr('&&first_name',1,1)||substr('&last_name',1,7),&salary);
    SELECT * FROM my_employee where id=&&id;
    and then from sqlplus @c:\my_emp.sql
    scott@ORCL> @C:\MY_EMP
    instering my_employees
    ID ? : 20
    FIRST_NAME ?: john
    LAST_NAME ?: papas
    SALARY ? : 1000
    old 1: insert into my_employee values(&id,'&last_name','&first_name',substr('&&first_name',1,1)||substr('&last_name',1,7),&salary)
    new 1: insert into my_employee values( 20,'papas','john',substr('john',1,1)||substr('papas',1,7), 1000)
    1 row created.
    old 1: SELECT * FROM my_employee where id=&&id
    new 1: SELECT * FROM my_employee where id= 20
    ID LAST_NAME FIRST_NAME USERID SALARY
    20 papas john jpapas 1000
    scott@ORCL>

  • ABAP LOGICAL ERRORS

    Expalin about ABAP Logical errors?
    Help me sending appropriate link to understand more.
    Moderator Message: Read the Rules of Engagement of this forum.
    Edited by: kishan P on Dec 27, 2011 9:50 PM

    Hi Vinay,
         You can't delete the ABAP Runtime errors. But  you can catch the errors using catch exception Statement.
    For Example,
    Class-based exceptions are handled in the following control structure:
    TRY.
      ...                       " TRY block (application coding)
    CATCH cx_... cx_... ...
        ...                     " CATCH block (exception handler)
    CATCH cx_... cx_... ...
        ...                     " CATCH block (exception handler)
      CLEANUP.
        ...                     " CLEANUP block (cleanup context)
    ENDTRY.
    Try This Sample Code,
    *--EXAMPLE FOR RUNTIME ERROR--
    *DATA : VALUE1 TYPE I.
    *VALUE1 = 1 / 0.        -
    >>>>>> IT MAKES RUN TIME ERROR.
    *WRITE : VALUE1.
    *-EXAMPLE FOR HOW TO CATCH THE ARITHMETIC ERROR AT THE RUN TIME USING SUBRC----
    DATA : VALUE1 TYPE I.
    CATCH SYSTEM-EXCEPTIONS ARITHMETIC_ERRORS = 1.
    VALUE1 = 1 / 0.
    WRITE : VALUE1.
    ENDCATCH.
    IF SY-SUBRC = 1.
    WRITE : ' IT MAKES ERROR'.
    ELSE.
    WRITE : VALUE1.
    ENDIF.
    Thanks,
    Reward If Helpful.

  • Newbie - JSP & bean shopping cart logic error?

    Hello,
    I am attempting to bulid a shopping cart facility on a JSP site that I am building.
    I am having difficulties adding an item to the basket.
    The page below (bookDetail.jsp) displays items for sale from a database. At the foot of the page, I have set up a hyperlink to add an item to a basket bean instance created in this page.
    What happens is the page will load correctly, when i hover the mouse over the hyperlink to add the item to the basket, the status bar shows the URL of the current page with the details of the book appended. This is what I want. But when I click the link, the page will only reload showing 20% of the content.
    Netbeans throws up no errors, neither does Tomcat, so I am assuming I have made a logical error somewhere.
    I have enclosed the Book class, and the ShoppingCart class for your reference.
    Any help would be really appreciated as I am at a loss here.
    Cheers.
    Edited highlights from bookDetail.jsp
    //page header importing 2 classes - Book and ShoppingCart
    <%@ page import="java.util.*, java.sql.*, com.shopengine.Book, com.shopengine.ShoppingCart" errorPage="errorpage.jsp" %>
    //declare variables to store data retrieved from database
    String rs_BookDetail_bookRef = null;
    String rs_BookDetail_bookTitle = null;
    String rs_BookDetail_author = null;
    String rs_BookDetail_price = null;
    //code that retrieves recordset data, displays it, and places it in variables shown above
    <%=(((rs_BookDetail_bookRef = rs_BookDetail.getString("book_ref"))==null || rs_BookDetail.wasNull())?"":rs_BookDetail_bookRef)%>
    <%=(((rs_BookDetail_author = rs_BookDetail.getString("author"))==null || rs_BookDetail.wasNull())?"":rs_BookDetail_author)%>
    <%=(((rs_BookDetail_bookTitle = rs_BookDetail.getString("book_title"))==null || rs_BookDetail.wasNull())?"":rs_BookDetail_bookTitle)%>
    <%=(((rs_BookDetail_price = rs_BookDetail.getString("price"))==null || rs_BookDetail.wasNull())?"":rs_BookDetail_price)%>
    //this link is to THIS PAGE to send data to server as request parameters in Key/Value pairs
    // this facilitates the add to basket function
    <a href="<%= response.encodeURL(bookDetail.jsp?title=
    "+rs_BookDetail_bookTitle+"
    &item_id=
    "+rs_BookDetail_bookRef +"
    &author="+rs_BookDetail_author +"
    &price=
    "+rs_BookDetail_price) %> ">
    <img src="images\addtobasket.gif" border="0" alt="Add To Basket"></a></td>
    // use a bean instance to store basket items
    <jsp:useBean id="basket" class="ShoppingCart" scope="session"/>
    <% String title = request.getParameter("title");
    if(title!=null)
    String item_id = request.getParameter("item_id");
    double price = Double.parseDouble(request.getParameter("price"));
    Book item = new Book(item_id, title, author, price);
    basket.addToBasket( item );
    %>
    ShoppingCart class that is used as a bean in bookDetail.jsp shown above
    package com.shopengine;
    //import packages
    import java.util.*;
    //does not declare explicit constructor which automatically creates a zero argument constructor
    //as this class will be instantiated as a bean
    public class ShoppingCart
    //using private instance variables as per JavaBean api
         private Vector basket;
         public ShoppingCart()
              basket = new Vector();
         }//close constructor
    //add object to vector
         public void addToBasket (Book book)
              basket.addElement(book);
         }//close addToBasket method
    //if strings are equal, delete object from vector
         public void deleteFromBasket (String foo)
    for(Enumeration enum = getBasketContents();
    enum.hasMoreElements();)
    //enumerate elements in vector
    Book item = (Book)enum.nextElement();
    //if BookRef is equal to Ref of item for deletion
    //then delete object from vector.
    if (item.getBookRef().equals(foo))
    basket.removeElement(item);
    break;
    }//close if statement
    }//close for loop
         }//close deleteFromBasket method
    //overwrite vector with new empty vector for next customer
         public void emptyBasket()
    basket = new Vector();
         }//close emptyBasket method
         //return size of vector to show how many items it contains
    public int getSizeOfBasket()
    return basket.size();
         }//close getSizeOfBasket method
    //return objects stored in Vector
         public Enumeration getBasketContents()
    return basket.elements();
         }//close getBasketContents method
         public double getTotalPrice()
    //collect book objects using getBasketContents method
    Enumeration enum = getBasketContents();
    //instantiate variable to accrue billng total for each enummeration
    double totalBillAmount;
    //instantiate object to store data for each enummeration
    Book item;
    //create a loop to add up the total cost of items in basket
    for (totalBillAmount=0.0D; enum.hasMoreElements(); totalBillAmount += item.getPrice())
    item = (Book)enum.nextElement();
    }//close for loop
    return totalBillAmount;
         }//close getTotalPrice method
    }//close shopping cart class
    Book Class that is used as an object model for items stored in basket
    package com.shopengine;
    import java.util.*;
    public class Book{
         //define variables
    private String bookRef, bookTitle, author;
         private double price;
    //define class
    public Book(String bookRef, String bookTitle, String author, double price)
    this.bookRef= bookRef;
    this.bookTitle=bookTitle;
    this.author=author;
    this.price=price;
    //create accessor methods
         public String getBookRef()
              return this.bookRef;
         public String getBookTitle()
              return this.bookTitle;
         public String getAuthor()
              return this.author;
         public double getPrice()
              return this.price;
    }//close class

    page will only reload showing 20% of the content.Im building some carts too and I had a similiar problem getting null values from the mysql database. Are you getting null values or are they just not showing up or what?
    On one of the carts I'm building I have a similiar class to yours called products that I cast onto a hashmap works alot better. Mine looks like this, maybe this is no help I don't know.......
    public class Product {
        /**An Item that is for sale.*/
          private String productID = "Missing";
          private String categoryID = "Missing";
          private String modelNumber = "Missing";
          private String modelName = "Missing";
          private String productImage = "Missing";
          private double unitCost;
          private String description = "Missing";
          public Product( 
                           String productID,
                           String categoryID,
                           String modelNumber,
                           String modelName,
                           String productImage,
                           double unitCost,
                           String description) {
                           setProductID(productID);
                           setCategoryID(categoryID);
                           setModelNumber(modelNumber);
                           setModelName(modelName);
                           setProductImage(productImage);
                           setUnitCost(unitCost);
                           setDescription(description);        
          public String getProductID(){
             return(productID);
          private void setProductID(String productID){
             this.productID = productID;
          public String getCategoryID(){
             return(categoryID);
          private void setCategoryID(String categoryID){
             this.categoryID = categoryID;
          public String getModelNumber(){
             return(modelNumber);
          private void setModelNumber(String modelNumber){
             this.modelNumber = modelNumber;
          public String getModelName(){
             return(modelName);
          private void setModelName(String modelName){
             this.modelName = modelName;
          public String getProductImage(){
             return(productImage);
          private void setProductImage(String productImage){
             this.productImage = productImage;
          public double getUnitCost(){
              return(unitCost);
          private void setUnitCost(double unitCost){
              this.unitCost = unitCost;
          public String getDescription(){
              return(description);
          private void setDescription(String description){
              this.description = description;

  • Identifying syntax and logical errors

    Hey guys,
    I'm new to java and I can't figure out this problem as I can't make JDK work with comand prompt for some reason and when trying to write the java in a web page it won't work.
    Can anyone tell me what the three syntax errors and one logical error in the following code is?
    public class Add
    public static void main(String[] args)
    double weight1 = 85.5
    double weight2 = 92.3
    double averWeight = weight1 + weight2 / 2;
    System.out.println("Average is " + aver);
    Any help would be very much appreciated.

    Ok. I'm new to Java. Thanks to the both of you for your help.You're welcome of course; here's a tip: type in these little exercises
    and try to compile them; carefully read what the compiler has to say
    about the possible errors. Note that the compiler is totally blind to
    most "logical errors".
    kind regards,
    Jos

  • Too many logical errors (in terms of business processes); maximum was 100

    hi friends !
    I'm using the direct input program RMDATIND for uploading the material master data. and i'm facing the error:
    "Too many logical errors (in terms of business processes); maximum was 100"
    thanks and regards,
    sachin soni

    Hi,
    If you checked in standard program,problem is occuring in the function module
    'MATERIAL_MAINTAIN_DARK'.

  • JFrames + Returning a Variable... Beginner's Logical Error

    Hi,
    I'm new to Java and programming in general. I'm trying to do something that seems pretty simple, but I'm making a logical error that is preventing my little program from working.
    All I'm trying to do is this... I've created a little JFrame that asks a user for a university's name, address, and the number of students in the university. All of this is within a class called InputWindowSmall. I just want to be able to return those Strings, univName, univAdress, univStudents, to my main program so I can put them into a different class.
    I've tried get methods, but that's silly, it doesn't work, it returns null because the program doesn't wait for the user's input.
    Does anyone have any suggestions?
    Also... I'm a terribly poor Object-Oriented-Thinker... If I'm doing anything that doesn't make sense in an Object-Oriented-Mindset, please point it out! I'd like to try and get better! Thanks!
    CODE
    InputWindowSmall
    package FinalProject;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import java.awt.GridLayout;
    import javax.swing.JTextField;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import javax.swing.JButton;
    /** Class Definition: Input Window - small input window that asks for University name and address*/
    public class InputWindowSmall extends JFrame
         private JLabel nameLabel;
         private JLabel addressLabel;
         private JLabel numberStudentsLabel;
         private JLabel whiteSpace;
         private JTextField nameField;
         private JTextField addressField;
         private JTextField numberStudentsField;
         private JButton okButton;
         private String univName;
         private String univAddress;
         private String univStudents;
         /** Constructor with extra parameters     */
         public InputWindowSmall(University univ)
              //Names title bar of window
              super("Welcome!");
              //Sets layout of window
              setLayout(new GridLayout(4,2));
              //Sets text for nameLabel and adds to window
              JLabel nameLabel = new JLabel("    University Name: ");
              add(nameLabel);
              //Sets and adds nameField to window
              nameField = new JTextField(10);
              add(nameField);
              //Sets text for addressLabel and adds to window
              JLabel addressLabel = new JLabel("    University Address: ");
              add(addressLabel);
              //Sets and adds addressField to window
              addressField = new JTextField(10);
              add(addressField);
              //Sets text for numberStudentsLabel and adds to window
              JLabel numberStudentsLabel = new JLabel("    Number of Students: ");
              add(numberStudentsLabel);
              //Sets and adds numberStudentsField to window
              numberStudentsField = new JTextField(10);
              add(numberStudentsField);
              //Sets and adds white space
              JLabel whiteSpace = new JLabel("         ");
              add(whiteSpace);
              //Sets and adds button
              okButton = new JButton("OK");
              add(okButton);
              //create new ButtonHandler for button event handling
              ButtonHandlerSmall handler = new ButtonHandlerSmall();
              okButton.addActionListener(handler);
         }//end InputWindowSmall
         private class ButtonHandlerSmall implements ActionListener
              public void actionPerformed(ActionEvent event)
                   String univName = nameField.getText();
                   String univAddress = addressField.getText();
                   String univStudents = numberStudentsField.getText();
              }//end actionPerformed
         }//end ButtonHandlerSmall
         public String getUniversityName()
              return univName;
         }//end getUniversityName
         public String getUniversityAddress()
              return univAddress;
         public String getUniversityNumberStudents()
              return univStudents;
    }//ProjectTest (contains main)
    /** Class Definition: ProjectTest - contains main*/
    package FinalProject;
    import javax.swing.JFrame;
    public class ProjectTest {
         public static void main(String args[])
              //Creates a new university
              University univ = new University();
              //Instantiates and sets up the initial small window which asks for university name, address, and # students
              InputWindowSmall inputWindowSmall = new InputWindowSmall(univ);
              inputWindowSmall.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              inputWindowSmall.setSize(350, 120);
              inputWindowSmall.setVisible(true);
              inputWindowSmall.setLocationRelativeTo(null);
              String univN = inputWindowSmall.getUniversityName();
              String univA = inputWindowSmall.getUniversityAddress();
              String univS = inputWindowSmall.getUniversityNumberStudents();
              System.out.println(univN);
              System.out.println(univA);
              System.out.println(univS);
         }//end main
    }Edited by: heathercmiller on Apr 28, 2008 5:57 AM
    Edited by: heathercmiller on Apr 28, 2008 5:58 AM

    Oh! ...Here is a somewhat important detail I forgot to mention...
    There's another class called University (I've included it below). The main part of the program instantiates an object of type University, and that object is passed to the InputWindowSmall class. In the end, I want those variables I mentioned above to be placed within the University object I created. ...And I've already passed a University object to InputWindowSmall... I'm just not entirely sure how to assign values to the variables within the University object while in a different class. ...Does that make any sense?
    University
    package FinalProject;
    import java.util.Arrays;
    /** Class Definition: University*/
    public class University extends ProjectTest implements TuitionGenerate 
         private String universityName;     /** refers to the name of the University     */
         private String address;               /** refers to the address of the University     */
         private Student studentList[];     /** an array of Student objects                    */
         /** Default Constructor */
         University()
              setuniversityName("University_of_Miami");
              setaddress("555_Coral_Gables_St.");               
         /** Constructor with parameters */
         University(String name,String add)
              setuniversityName(name);
              setaddress(add);
         /** Constructor with extra parameters */
         University(String name,String add, Student array[])
              setuniversityName(name);
              setaddress(add);
              setstudentList(array);
         /** method: gets universityName*/
         public String getuniversityName()
              return universityName;
         /** method: gets address*/
         public String getaddress()
              return address;
         /** method: gets studentList*/
         public Student[] getstudentList()
              return studentList;
         /** method: sets universityName*/
         public void setuniversityName(String name)
              universityName=name;
         /** method: sets address*/
         public void setaddress(String add)
              address=add;
         /** method: sets studentList*/
         public void setstudentList(Student array[])
              studentList=new Student[array.length];
              studentList=array;
         /** method: returns a string representation of universityName and address*/
         public String toString()
              String output="University Name: " + universityName + "\nAddress: " + address + "\n\n";
              return output;
         /** method: sorts the array of students alphbetically by last name*/
         public void studentSort()
              String temp[]=new String[studentList.length];
              for(int i=0;i<studentList.length;i++)
                   temp=studentList[i].getlastName();
              Arrays.sort(temp);
              Student temp2[]=new Student[studentList.length];
              for(int i=0;i<temp.length;i++)
                   for(int j=0;j<studentList.length;j++)
                        if(temp[i].equals(studentList[j].getlastName()))
                             temp2[i]=studentList[j];
                             break;
              studentList=temp2;               
         /** method: prints the list of students*/
         public void printStudentList()
              System.out.println("Students:\n");
              for(int i=0;i<studentList.length;i++)
                   System.out.println(studentList[i].toString());
         /** method: prints tuition from interface GenerateTuition*/
         public void printTuition()
              for(int i=0;i<studentList.length;i++)
                   System.out.println(studentList[i].toString());
                   System.out.println(" Tuition: $" + studentList[i].calTuition() + "0");
         /** method: gets tuition from calTuition method*/
         public double getTuition(Student x)
                   return x.calTuition();
    Edited by: heathercmiller on Apr 28, 2008 6:07 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Logic error in a class I wrote...help

    I wrote this class to filter a simplified version of Military time; basically it
    returns a true or false statement to whether a specified string contains
    the appropriate character sequence. My problem is that it seems to
    report false even if my time format is correct.
    example:
    correct time: "0700"
    incorrect time: "700" or invlalid characters "asdf "
    maybe you all could catch me logic error...my head is bust
    class SimpleMilitaryTime
         //Verify that their are only 4 characters in the string
         public boolean verifyLength(String time)
              int textFieldLength;
              boolean flag = true;
              textFieldLength = time.length();
              if (textFieldLength == 4)
                   flag = true;
              else
                   flag = false;
              return flag;
         }//end verify length
         //Method for comparing characters that can be used
         public boolean verifyNumerals( String time )
              boolean flag = true;
              int flagCounter = 0;
              char theChar;
    //testing characters to see if they match or dont
    //match the below lists of char numerals
    //If they don't, the flagcounter is increased by 
    //one and the flag is returned as false
    //because the flagcounter is greater than 0 
    //indicating that they are not all numerals but
    //some other sort of character
              for (int i = 0; i <= time.length(); i++)
                     theChar = (char)time.indexOf(i);
                   switch (theChar)
                        case '0':
                             break;
                        case '1':
                             break;
                        case '2':
                             break;
                        case '3':
                             break;
                        case '4':
                             break;
                        case '5':
                             break;
                        case '6':
                             break;
                        case '7':
                             break;
                        case '8':
                             break;
                        case '9':
                             break;
                        default:
                              flagCounter = flagCounter + 1;
                   }//end of switch
              }//end of for loop
              if (flagCounter < 0 )
                   flag = true;
              else
                   flag = false;
              return flag;
         }//End of Method
         //Method to determine numeral format
         public boolean verifyFormat( String time )
              boolean flag = true;
              boolean hrFlag = true;
              boolean minFlag = true;
              String hr, min;
              hr = time.substring(0, 1);
              min = time.substring(2, 3);
              hrFlag = verifyHrRange( hr );
              //return true if its in the hour range of 0 to 23
              minFlag = verifyMinRange( min );     
                                              //return true if its in the minutes range of 0 to 59
              //If hrFlag or minFlag is false then format does
                                               //not meet the Military Time Format
              if (hrFlag == false || minFlag == false)
                   flag = false;
              else
                   flag = true;
         return flag;
         }//end of Method
         //Verify the Range of Hr  between 0 and 23
         public boolean verifyHrRange( String hr )
              int hrTime;
              boolean flag = true;
              hrTime = Integer.parseInt( hr );
              if ( hrTime >= 0 && hrTime <= 23 )
                   flag = true;
              else
                   flag = false;
         return flag;
         }//End of Method
         //Verify the Range of Minutes  between 0 and 59
         public boolean verifyMinRange( String min )
              int minTime;
              boolean flag = true;
              minTime = Integer.parseInt( min );
              if ( minTime >= 0 && minTime <= 59 )
                   flag = true;
              else
                   flag = false;
         return flag;
         }//End of Method
         //Method validates total time content
         public boolean validateTime( String time )
              boolean flag = true;
              boolean flagLength = true;
              boolean flagNumerals = true;          
              boolean flagFormat = true;          
              flagLength = verifyLength( time );                         //Is the length  == to 4 characters long
              if( flagLength == true )
                   flagNumerals = verifyNumerals( time );               //Is the content made up of numerals
                   if( flagNumerals == true )
                        flagFormat = verifyFormat( time );               //Is the format within MilitaryTime Specs
                        if( flagFormat == true )
                             flag = true;
                        else
                             flag = false;                                             //IF one or all are FALSE then FLAG is set to false
                   else
                        flag = false;
              else
                   flag = false;
              //return status of test run
              return flag;               
         }//End of Method
    }//End of Class

    Interestingly enough, although both examples simplify the logic, I still
    recieve a "false" when testing it. Here is some more code that I use
    when a text field has lost focus. Right now the code is set to just test
    the input.
    The field is inialized to "1234". Once the field gains focus, it immediately sets to "false"...not sure why.?.? Even after resetting field
    to another 4 digit numeral sequence I still get a "false" return instead of
    verifying it as "true. " any ideas?
    here is the code for testing the MilitaryTime class:
    private class TextFieldListener extends FocusAdapter
         //method that listens losing focus of textfield
         public void focusLost( FocusEvent ev )
              boolean flag;
              String indFALSE, indTRUE;
              indFALSE = "FALSE";
              indTRUE = "TRUE";
              int strLength;
              flag = mt.isValidTime(sunMornStartTime_str); //mt is for MilitaryTime
              if (flag == false)
              sunMornStartTime.setText(new String(indFALSE));
              if (flag == true)
              sunMornStartTime.setText(new String(indTRUE));
         }//End of Method
    }//End of private class TextFieldAction

  • Logical error iExpenses

    There is a way to follow the details of each paguina Web within iExpenses, I have a logical error where I erased information already captured by pressing the button "Save" someone could mencionarme something.
    Thanks

    you can do it with a .sql script
    c:\my_emp.sql
    PROMPT
    PROMPT instering my_employees
    PROMPT
    ACCEPT ID NUMBER PROMPT 'ID ? : '
    ACCEPT FIRST_NAME CHAR PROMPT 'FIRST_NAME ?: '
    ACCEPT LAST_NAME CHAR PROMPT 'LAST_NAME ?: '
    ACCEPT SALARY NUMBER PROMPT 'SALARY ? : '
    insert into my_employee values(&id,'&last_name','&first_name',substr('&&first_name',1,1)||substr('&last_name',1,7),&salary);
    SELECT * FROM my_employee where id=&&id;
    and then from sqlplus @c:\my_emp.sql
    scott@ORCL> @C:\MY_EMP
    instering my_employees
    ID ? : 20
    FIRST_NAME ?: john
    LAST_NAME ?: papas
    SALARY ? : 1000
    old 1: insert into my_employee values(&id,'&last_name','&first_name',substr('&&first_name',1,1)||substr('&last_name',1,7),&salary)
    new 1: insert into my_employee values( 20,'papas','john',substr('john',1,1)||substr('papas',1,7), 1000)
    1 row created.
    old 1: SELECT * FROM my_employee where id=&&id
    new 1: SELECT * FROM my_employee where id= 20
    ID LAST_NAME FIRST_NAME USERID SALARY
    20 papas john jpapas 1000
    scott@ORCL>

  • Essbase Internal Logic Error [7333]

    We have a "backup" application to which we copy all of our applications' databases to every night.
    However now when we try to start the backup application we get one or more of the following errors in the log, and the app won't start:
    Unable to Allocate Aligned Memory for [pMemByte] in [adIndInitFree].
    Unable to Allocate Aligned Memory for [pTct->pTctFXBuffer] in [adTmgAllocateFXBuffer].
    Essbase Internal Logic Error [7333]
    RECEIVED ABNORMAL SHUTDOWN COMMAND - APPLICATION TERMINATING
    The other live applications that I'm copying from all start correctly. There is plenty of disk space and free memory on the server.
    I've read about other people getting these errors and tried the following:
    - Recreated the backup application (which cleared out any temporary files that might have been hanging around)
    - Validated all the other applications that I'm copying from
    It does seem to be a capacity issue because when I remove some of the larger databases from the backup application it does start. However I can't attribute the problem to an individual large database because when I copy each of them to the application by themselves then they're fine.
    I'd appreciate any ideas on what to try next... could this suggest that something's wrong with the memory chips on the server?
    Thanks
    Mark
    Update: I have used a workaround by putting half of the databases in one backup application and the other half in another application. Both of these applications start without a problem. Is there a maximum size of databases in an app? I am trying to add 21 databases with a combined .PAG file size of only 2.4GB.
    Edited by: MatMark on Nov 22, 2010 2:46 PM

    Thank you John, yes it appears to be the 2GB limit, however I'm a bit confused as to what I should be measuring that exceeds 2GB, you mentioned index cache (I assume these are IND) which total to only 140MB.
    The PAG files total to 3.7GB but these would have been greater than 2GB for a long time, before this problem started occurring.
    Anyway, case closed, I have to split these up into separate applications. Thanks for your help.

  • Probable Script Logic error

    Hi,
    I am trying to create a simple demo with the following business process:
    sales unit * sales price = total sales
    salesunit + inventory unit = produced unit
    produced unit * labor per unit = total hours
    for "sales unit x sales price = total sales", i have created a script logic called "sales.lgf" as follow:
    *xdim_memberset account = salesunit,salesprice
    *when account
    *is salesunit
      rec(account="totalsales",factor=-1(get(account="salesprice")))
    *endwhen
    *commit
    for "salesunit + inventory unit = produced unit", i am using dimension logic of salesunit + inventory unit in the formula column of produced unit
    for "produced unit x labor per unit = total hours", i have created another script logic called "production.lgf" as follow:
    *xdim_memberset account = producedunit,laborperunit
    *when account
    *is producedunit
      *rec(account="totalhrs",factor=(get(account="laborperunit")))
    *endwhen
    *commit
    in my default.lgf, i have *include sales and *include production
    The results are satisfactory for all of "totalsales" and "producedunit".
    But for "totalhrs", it appears as if some results are correct for some but wrong for the others.
    any idea on this?
    cheers

    Dimension formulas are evaluated in the cube, when you query that particular member on which you placed the formula. Aggregated members (parents) are pretty much the same story. (MSAS does some caching & pre-aggregation of things but don't get hung up on this; it's DB technical stuff.) The key point is, the result of a member formula isn't stored in the fact tables.
    The big performance gains come from minimizing the number of unnecessary commits -- not so much by minimizing the # of members in your xdim_memberset.
    In your first example, this still can be written in one commit. Think of the algebra in the second commit, and break down the components until you get to the source data that you have available before you start the calc.
    *xdim_memberset account = salesunit,salesprice,inventoryunit, laborperunit,laborcostperhour
    *when account
    *is salesprice
    *rec(account="totalsales",factor=-1*(get(account="salesunit")))
    *is salesunit, inventoryunit
    *rec(account="totalhrs",factor=-1*(get(account="laborperunit")))
    // not exactly intuitive, but it should work
    *rec(account="totallaborcost",factor=-1*(get(account="laborperunit")) * (get(account="laborcostperhr"))
    *endwhen
    *commit
    I wouldn't go through the effort of doing this when you first start writing SQL logic, because it makes it very hard to follow, and debug. If the logic takes 15 seconds to run with 2 commits, and it is legible, that's fine. Only if you find your logic takes 5 minutes or 30 minutes to run, then it's worth getting into this kind of optimization.
    It's also key to consider everything that you want to calculate in one batch, from start to finish. Sometimes by organizing things in certain orders, you can minimize the total number of commits, by expanding the source data region to include an extra 5% or 10 or 50% of records, beyond what you need in your calcs -- but this may be acceptable. The only real way to know is to test a few different approaches (on a reasonable set of production data, not dummy data in dev) and see which works better.

  • Essbase Internal logic error

    Hi,
    In one our job, after loading the data files we are running a calc on the database. But we got the following error. We are Essbase 6.5.1. This is a daily job where we load the data files & calc the database & in the past didn't run into any issues.
    Can someone help me understanding what went wrong here?
    [Sun Mar 01 22:17:59 2009]Local/Objectiv///Info(1008108)
    Essbase Internal Logic Error [7421]
    [Sun Mar 01 22:17:59 2009]Local/Objectiv///Info(1008106)
    Exception error log [D:\ESSBASE\app\Objectiv\log00003.xcp] is being created...
    [Sun Mar 01 22:18:00 2009]Local/Objectiv///Info(1008107)
    Exception error log completed -- please contact technical support and provide them with this file
    [Sun Mar 01 22:18:00 2009]Local/Objectiv///Info(1002089)
    RECEIVED ABNORMAL SHUTDOWN COMMAND - APPLICATION TERMINATING
    Appreciate your help
    Vamsi

    The exception file means that Essbase had a problem and basically the application crashed. Have you tried to see if the application will restart? If so, you might want to try to rerun your process, sometimes it's an intermittent thing. If not, look at the log in more detail and see what it was doing when it failed. Data load, calc script, etc to see it you can narrow down what it was doing.

Maybe you are looking for

  • DVD Tv Series to iTunes TV Programme

    I have managed to rip a TV series from DVD and have converted it to the right format to import into iTunes. But when i have imported it into iTunes it puts the files in the "Film" section rather than the "TV Program" section. This leaves me with 26 s

  • Tempo change delay! Why is Logic changing the tempo too late?

    Anyone a solution for this? My tempo change is set at e.g. 10.1.1.1 from 60 to 30 bpm. But logic is changing the tempo slightly delayed (about half a second too late.) It looks like logic is to slow to handle the tempo change on time: When I restart

  • Notification tab in UWL

    Hi, We have implemented portal for LSO. Booking/Cancellation of course participation everything is working fine. Now problem is after approval from the manager, the employee is not getting notification in his UWL. How resolve this issue. Please help

  • It can't read the chinese character in the search engine that I write on the Crystal Touch Penpower

    I use the Crystal Touch of Penpower to write Chinese into the Google search but it shows nothing in the search box.

  • Delete planned material (MM11 / MM12)

    Hello, I have following issue: A planned material was created via TCode MM11 or MM12 for a selected date in the future. Now this planned material is not longer required - so the material should/must be deleted. If there any way to do this? Offer SAP