Infix Calculator (i/o problems)

Greets all. My assignment is to write a program which evaluates an infix expression. I have no problem with this part, but how do I read the user input and know what each character is? I have this so far:
StringTokenizer tokenizer = new StringTokenizer(the_expression);
while (tokenizer.hasMoreTokens())
String token = tokenizer.nextToken(); // the token to examine
double number = 0.0; // the number to push
char an_operator; // the operator to push
// if the first character is a digit, the whole thing must be
if (Character.isDigit(token.charAt(0)))
number = Double.parseDouble(token);
System.out.println(number);
else if (token.charAt(0) == RIGHT_PAREN)
System.out.println("there was a paren.");
else
an_operator = token.charAt(0);
System.out.println(an_operator + " is an operator.");
I don't know what the hell I'm doing. Maybe someone has a better way of reading the input and pushing numbers into a number stack and operators into an operators stack. TIA.

Try using a StringBuffer instead of the Tokenizer. The tokenizer is used to seperate text from a special character in a string.
You actually want to parse through the entire thing.
read about stringbuffer in the java api reference

Similar Messages

  • Creating an Infix Calculator using Stacks

    Hi, I am writing code that parses an infix expression input from the user (seperated by white spaces).
    I have to use stacklist class. using stringtokenizer to parse the expression.
    have to ignore left paren, push operators into opStack push operands into numStack and when right paren occurs pop numbers and combine with operator at top of stack.
    I have created this code,but for some reason it gives me the error "
    InfixCalulator2.java:30: cannot find symbol
    symbol : method push(java.lang.String)
    location: class java.util.ArrayList
    opStack.push(sx); "
    Am i using the push an pop Stack method correctly??
    Thanks!!
        class InfixCalulator2{
           private static void main(String[] args){
             String inputline = "(1 + 3)";
             ArrayList opStack = new ArrayList();
             ArrayList numStack = new ArrayList();
                   int parenCount = 0;
               StringTokenizer st = new StringTokenizer(inputline, " ", false);
             String sx = st.nextToken();
             while (st.hasMoreTokens()) {
                sx = st.nextToken();
                if (sx.equals("(")) {
                   parenCount++;
                else if ( (sx.equals("+")) || (sx.equals("-"))
                   || (sx.equals("*")) || (sx.equals("/")) ) {
                   opStack.push(sx); //here is where it starts givign me error for push, same with pop
                else if (sx.equals(")")) {
                   parenCount--;
                   double num2 = ((Double)numStack.pop()).doubleValue();
                   double num1 = ((Double)numStack.pop()).doubleValue();
                   String op = (String)opStack.pop();
                   double result = 0.0d;
                   if (op.equals("+")) {
                      result = num1 + num2;
                   else if (op.equals("-")) {
                      result = num1 - num2;
                   else if (op.equals("*")) {
                      result = num1 * num2;
                   else if (op.equals("/")) {
                      result = num1 / num2;
                   numStack.push(new Double(result));
                System.out.println("Result of computation: " + ((Double)numStack.pop()).doubleValue());
       }

    By the way, youll really learn a lot if you take
    pragmatic steps to
    solving your problems. One example would be actually
    reading
    your error messages (theres a reason they dont just
    read "BROKEN!").
    InfixCalulator2.java:30: cannot find symbol
    symbol : method push(java.lang.String)
    location: class java.util.ArrayListThat error message is saying CAN NOT FIND SYMBOL
    METHOD
    "PUSH()" IN ARRAYLIST.
    Notice how ArrayList does NOT have a push() or pop()
    method
    but the List implementation Stack does:
    http://java.sun.com/j2se/1.4.2/docs/api/java/util/Stac
    k.htmlthanks, stupid mistake....

  • Erlang Calculator IVR Port Problem

    Hi to all,
    in this days i've tried to search the " Erlang Calculator" for uccx in Cisci website but i can't find it!
    I have uccx 7.0(1) and in some case of intensive traffic, uccx stops to work (i can hear the free tone but the application doen't answer) and i can hear the uccx voice that tells me that "there are some problem in the system.....".
    I think that this happend because i have not enough IVR port, so i would like to calulate it in the worst case that happened in this days. I'll try to find the worst case with "Traffic Analysis Report".
    Someone can tell me where i can find "erlang calulator" and if this problem can be cause by number of IVR ports?
    Thanks a lot!

    Hi Aaron,
    i see that in these days of high pick of call, there are several of
    ABORTED    ------   com.cisco.app.ApplicationTimeoutException
    REJECTED --------  Reject: Remote Timeout  ( a lot!!!)
    REJECTED ------   Reject: Channels Busy
    While in days where i have a regular flow of call, i have not call rejected or aborted.
    Do you think that it can be a problem of IVR port or another problem. Of sure it happen only when there are a lot of call!
    Thank a lot for the support!

  • Selection on Global Calculated Key Figure problem

    Hi all,
    I've got a Calculated key figure, made up of 2 key figures and 2 restricted key figures, saved to a homogenous multiprovider (Customer Sales).  this works fine as is. 
    However, when you create a selection in BEx QD, that limits the CKF further by Distribution channel, and view the result, the result seems to be multiplied by a value to the effect of 2.8???
    If you view the CKF by itself its fine (though not limited to what it needs to be).
    As an example.
    Say sales for a distribution channel was 1 million dollars.  Sales overall was 2 million dollars.  If i drag in my CKF (and have NO characteristics), it comes up with 2 million dollars.
    If i limit it to 1 sales office, no issues, I get that sales office's value.  However, if i limit it to a distribution channel, i get roughly 2.8 million dollars.
    Any ideas?  I can't see the logic in this.  Perhaps someone knows of the issue/has seen a note or something regarding this, cos its got me scratchin my head?
    Cheers

    Hi Pierre,
    I appreciate the fast reply.  This thing is driving me nuts!
    Ok so when you refer to the CKF are you referring to the global CKF on the multiprovider or the CKF i have on the report that is restricted (basically a local RKF)?
    I've had a look through there and have found the calculation tab, but can't really say i've found "Calculate according to current formula".
    What i see are:
    a dropdown list headed "calculate results as..." (nothing defined)
    another dropdown list called "calculate Single Values as..."  (nothing defined)
    a tick box called cumulated (unticked)
    another tickbox called "also apply to results" (unticked)
    another dropdown listbox called "calculation direction" (default setting)
    Underneath all that is a tickbox called "use precalculated value" (unticked).
    is it something under all that that i need to change?
    Do i change the global CKF or the local RKF?
    Thanks for the assist.

  • YTD Dyna Calc calculation without DTS, problem whith other Dyn.Calc members

    Hello,
    I guess my problem is a very classic one :
    I want to use a specific dimension member to calculate Year to date (and not DTS for severals reasons).
    That's not the first time I'm doing this but I've a problem when I cross two Dynamic Calc members :
    I've too much data (i.e incorrect data value).
    I'm working with a classic Time Periods Dimensions. 12 Months in Never share/Addition. and Quarter and Semester in Dynamic Calc/Addition.
    and a dimension View with have One member "monthly" (which means "not cumulated"). And one member YTD in Dynamic Calc.
    I've tried these two formulas for the YTD member :
    @ACCUM("monthly", @CURRMBRRANGE ("Time", GEN, @CURGEN("Time"), , 0));
    @ACCUM("monthly", @RELATIVE("YearTotal", @GEN(@CURRMBR("Time"))));
    In "monthly" all is okay (Months, Quarters, Semesters)
    If I cross months (M01, M02 ...) with YTD it's okay.
    If I cross Quarters or Semesters with YTD (that is to say two Dynamic Calc), I've two much data (i.e data is incorrect). But I don't understand why.
    Is someone can explain what's happening or how to "workaround" it ?
    Best regards

    I've put my YTD member in "Two Pass Calc", and it seems to work better.
    I think my problem the evaluation order of my two pass calc :
    my dimension View (with YTD) is evaluated before my Time Dimension.
    But I don't understand why ??
    Because if the Evaluation order is always the same even if I changer the order of my dimensions in the outline or if I change the Evaluation order in Planning ??
    Is someone have an idea ?
    Thanks

  • Problems!:  calculated fields in Adobe Forms using the ISR/PCR framework.

    Hi there,
    I have made an Adobe form in the ISR framework. Everybody who is familiar with these forms in the framework knows that the adobe form is embedded in a standard webdynpro which consist of a roadmap with three steps.
    Step 1: Fill out the form
    Step 2: Check and fill the form
    Step 3: Submit the form. After submit the form can be send to a manager or can be directly processed in SAP HR.
    Problem 1:
    When I test the adobe form and fill in a number in a field and click on next everything goes fine. But when I click on previous step the value which I filled in before is gone and put to 0,00.
    Problem 2:
    Also another problem is that calculated fields, do not show directly when clicking on next step. When you click on next step and then previous step, then you see the value of the calculated field.
    Problem 3:
    Also another problem is with the calendar function. When I fill in a date by hand and click on next the BADI behind the form sees 00-00-0000. When I use the calendar function everything goes well.
    Who can help me with these 3 problems.
    Greetings.
    Message was edited by: Sandhya Banwarie

    Hi Phil,
       Interesting - I have a similar issue.  We want to use the Request for Transfer scenario in ERP 2005, but it has not been developed in Adobe forms by SAP yet (it isn't available in 2004 either)!  So, we have decided to use the old JSP PCRs instead.
    Your issue is probably because you're using the same 2005 iviews to create your PCRs.  The 2005 PCR iviews are written in WebDynpro, and appear to assume that each one will be an Adobe form!  If you assign the old PCR iviews to your manager (give them the old MSS role under Migrated Content->EP5.0... in the pcd if you have it installed), you will be able to create a PCR with the JSP forms (regardless of the "Entry in Web" setting in QISRSCENARIO).
    The next issue is the approval.  In 2005, transaction SWFVISU has task TS50000075 configured as Java Webdynpro.  You'll need to change that to iView, and specify ID = com.sap.pct.hcm.isrdispatcher.default.  I'm following the UWL item type guide for this at:
    http://help.sap.com/saphelp_nw04s/helpdata/en/b1/cc1357eead454bb144face4a66be7d/content.htm
    Having said this, my approval is not working!  The item type has clearly changed, because the workitem name is no longer a hyperlink (rather annoying), but when I hit the "Launch Task Page" button (default name I think) I get the error:
    "Unable to perform action because the system returned an invalid URL"
    I can't see this "invalid url" anywhere in the logs, so I can't see where it is getting it from, or what path, etc I'm meant to put!  In your old system, what did you have as the "Server for ISR call" under "Additional Data for Scenario" in QISRSCENARIO?  Also, what did you have in the "URL" box that appears under the Additional Data for Scenario button when you change the Entry Type to JSP?
    Many thanks,
    Russell.

  • Using a different Plan Version in WIP calculation

    Hi experts.
    I am using version 97 as plan in a wip calculation. The problem is that to recognize plan incomings my system uses version 0 and in the result analysis they always appear as 0 because the version the system is taking to recover the planned incomings is 97 and it is empty.
    Is there any standard way to make it take version 97 only for costs?.
    Thanks.
    Alex

    yes. this is true, the predicates are not preserved, I found that out after posting. ok, Im really thinking bug here, I'll explain further.
    Im outside of prod time so can run the mview. the plan is pretty big so not going to post just yet, its just behavioural at this stage.
    explain for QUERY, = plan good.
    create table t1 as QUERY = plan good.
    insert to table as QUERY = plan good
    create mview as QUERY = plan bad. Not just timings are bad, the plan has completely changed. I stop the mview creation at this stage. good old ctrl+c.
    the only thing thats different is Im running MVIEW create. So I hit my ADDM again, can see the bad plan and bad timings. So I get the SQL_ID from the ADDM for the bad plan and run a 10053 on it using the 11.2 sqldiag dump. Im hoping to see why its choosing the bad path
    execute DBMS_SQLDIAG.DUMP_TRACE(p_sql_id=>'576wpd5g73q9c', p_child_number=>0, p_component=>'Compiler', p_file_id=>'BAD1');
    edit my BAD1 10053 trace file and I see...the plan is GOOD. Its estimated 2 seconds to run for the SQL_ID thats actually bad when running.
    This is why Im thinking bug.

  • How to use Dynamic date calculation in some transactions.

    Hello everyone.
    I have to create some dynamic variants using the dynamic date calculation. The problem is that in some transactions it´s not possible to use some variables that can round a value. For example: in transaction /SAPAPO/MC90, I need to fix 3 months in the horizon like this: From date: 01.01.2009  To date 31.03.2009. The current month is 01.01.2009. Next month the current month will be february, so the horizon would be 01.02.2009 to 30.04.2009.
    In 5.1 version, it´s impossible to fix the months, because the options that appear in the match code are:
    Current Date
    Current date +/- ??? days
    current date +/- ??? work days
    First day of current month
    nth working day of current month
    First day of next month
    First day of previous month
    Last day of previous month
    Last Day of the Current Month
    Does anybody knows how to do this? This is happening in other transactions to.
    Thanks a lot
    Regards
    Angela

    I am not sure where you are looking for..but here is what I can do it in MC90 Tcode:
    1. when you try to save the variant, in the variant screen check the two boxes under "Current date" field for Selection Variables attributes "L"
    2. Then click on Selection variables option and click on the "D" variable so that it turns to green
    3. Drop down in the first current date field, select "Current +/- ??? days. here if you want to start from today's date maintain 0 days
    4. In the second Current date field maintain 90 days in "Current +/- ??? days.
    5. save it
    please let me know if I misunderstod the issue

  • Problem on node 1

    Dear Experts,
    We have 2 partitions on our BI Dev system (0 and 1 in the same box), when we tried to add container to the tablespace that resides on those partitions, it resulted error (we forgot the error message) on partition 1, however there is no problem when adding container in a single partition tablespace (partition 0).
    The Message showed up as follows when doing db2start and db2stop:
    11/03/2009 14:39:20     1   0   SQL1390C  The environment variable DB2INSTANCE is not defined or is invalid.
    11/03/2009 14:39:21     1   0   SQL1390C  The environment variable DB2INSTANCE is not defined or is invalid.
    11/03/2009 14:39:22     1   0   SQL1390C  The environment variable DB2INSTANCE is not defined or is invalid.
    11/03/2009 14:39:26     0   0   SQL1064N  DB2STOP processing was successful.
    11/03/2009 14:39:26     2   0   SQL1064N  DB2STOP processing was successful.
    SQL6033W  Stop command processing was attempted on "3" node(s).  "2" node(s) were successfully stopped.  "0" node(s) were already stopped.  "1" node(s) could not be stopped.
    DB2START:
    11/03/2009 14:40:07     1   0   SQL1390C  The environment variable DB2INSTANCE is not defined or is invalid.
    11/03/2009 14:40:18     0   0   SQL1063N  DB2START processing was successful.
    11/03/2009 14:40:19     2   0   SQL1063N  DB2START processing was successful.
    SQL6032W  Start command processing was attempted on "3" node(s).  "2" node(s) were successfully started.  "0" node(s) were already started.  "1" node(s) could not be started.
    Node 2 was created using sapinst and can not be removed by running the following command:
    db2 stop dbm drop dbpartitionnum 2
    SQL6076W  Warning! This command will remove all database files on the node for
    this instance.  Before continuing, ensure that there is no user data on this
    node by running the DROP NODE VERIFY command.
    Do you want to continue ? (y/n) y
    SQL6032W  Start command processing was attempted on "3" node(s).  "2" node(s)
    were successfully started.  "0" node(s) were already started.  "1" node(s)
    could not be started.
    In ST04, there is no data and errors are generated when doing transaction, such as display tablespaces etc, the errors are (for example):
    Error loading database configuration.
    An error occurred when processing system BID
    Function DB6_PM_1ST4 failed with return code = Error when calculating data
    SQL1229N  The current transaction has been rolled back because of a system error.  SQLSTATE=40504
    An error occurred when processing system BID
    Function DB6_PM_TBSCONFIG1 failed with return code = Error when calculating data
    The problem was begun after doing the upgrade to 9.7, we have no problem of adding container in multipartition tablespace in 9.5.
    Please assist me to fix the problem asap, since the system will be used for training shortly.
    Regards,
    Rudi

    Hi Marcel,
    Yes, we understood and already done adding the partition using sapinst, using DB2CC was my experience before i am aware that sapinst is SAP's tool to add partition.
    Currently, we started adding partition using sapinst and always stuck in UPDATE DATABASE REGISTRY phase, the error written in the sapinst.log is:
    ERROR 2009-11-05 14:26:15.833
    MDB-01999  Error occured, first error is: <SQL1471N  Cannot connect to database "BID" on node "1" because the database on>
    INFO[E] 2009-11-05 14:26:15.833
    MUT-03025  Caught ESAPinstException in Modulecall: Error occured, first error is: <SQL1471N  Cannot connect to database "BID" on node "1" because the database on>.
    ERROR 2009-11-05 14:26:15.865
    FCO-00011  The step UpdateCfg with step key |NW_DB6_DB_ADDPART|ind|ind|ind|ind|0|0|NW_DB6_UpdateDbCfg|ind|ind|ind|ind|15|0|UpdateCfg was executed with status ERROR ( Last error reported by the step :Error occured, first error is: <SQL1471N  Cannot connect to database "BID" on node "1" because the database on>).
    There is no problem on DB2 side as you can see below:
    E:\db2\db2bid\db2_software\BIN>db2nlist
    List of nodes for instance "DB2BID" is as follows:
    Node: "0" Host: "dbbidevwin" Machine: "dbbidevwin" Port: "0"
    Node: "1" Host: "dbbidevwin" Machine: "dbbidevwin" Port: "1"
    E:\db2\db2bid\db2_software\BIN>db2 connect to BID
       Database Connection Information
    Database server        = DB2/NT64 9.7.0
    SQL authorization ID   = DB2BID
    Local database alias   = BID
    Node 1 already created and can be displayed via DB2CC and CLP, but it can not connect to SAP, here is the log from trans.log:
    4 ETW000  [dev trc     ,00000]  Supported features:                                                       12  0.320294
    4 ETW000  [dev trc     ,00000]  ..retrieving configuration parameters                                     14  0.320308
    4 ETW000  [dev trc     ,00000]  ..done                                                                   427  0.320735
    4 ETW000  [dev trc     ,00000]  Running with UTF-8 Unicode                                                14  0.320749
    4 ETW000  [dev trc     ,00000]  Thu Nov 05 14:31:25 2009                                              240167  0.560916
    4 ETW000  [dev trc     ,00000]  Running with CLI driver.                                                  78  0.560994
    4 ETW000  [dev trc     ,00000]  DB2 client driver version '09.07.0000'                                200498  0.761492
    4 ETW000  [dev trc     ,00000]  Connected to DB server type 'DB2/NT64'                                   776  0.762268
    4 ETW000  [dev trc     ,00000]  Connected to DB server version '09.07.0000'                               30  0.762298
    4 ETW000  [dev trc     ,00000]  Connected to 'BID' as 'SAPBID' schema 'SAPBID' o.k.                    15072  0.777370
    4 ETW000  [dev trc     ,00000]  Connected: con_hdl=0 ; appl_hdl=91; appl_id="10.2.1.54.24513.091105073125"
    4 ETW000                                                                                134  0.777504
    4 ETW000  [dev trc     ,00000]  Database code page is ok.                                                 60  0.777564
    4 ETW000  [dev trc     ,00000]  *** ERROR in DB6Fetch[dbdb6.c, 3675] CON = 0 (BEGIN)                  403945  1.181509
    4 ETW000  [dev trc     ,00000]  &+     DbSlConnectDB6( SQLFetch ): [IBM][CLI Driver][DB2/NT64] SQL1471N  Cannot connect to database "BID" on node "1" bec
    4 ETW000                                                                                41  1.181550
    4 ETW000  [dev trc     ,00000]  &+     ause the database on this node is not synchronized with catalog node.  SQLSTATE=08004                            
    4 ETW000                                                                                24  1.181574
    4 ETW000  [dev trc     ,00000]  &+                                                                               
    4 ETW000                                                                                100  1.181674
    4 ETW000  [dev trc     ,00000]  &+     SELECT COUNT(*) FROM TABLE( DB_GET_CFG() ) AS X WHERE DBPARTITIONNUM = CURRENT DBPARTITIONNUM AND NAME = 'db_colln
    4 ETW000                                                                                34  1.181708
    4 ETW000  [dev trc     ,00000]  &+     ame' AND VALUE = 'IDENTITY_16BIT'                                                                               
    4 ETW000                                                                                32  1.181740
    4 ETW000  [dev trc     ,00000]  &+       cursor type=NO_HOLD, isolation=UR, cc_release=YES, optlevel=5, degree=1, buffer_lobs=YES, op_type=40, reopt=0  
    4 ETW000                                                                                40  1.181780
    4 ETW000  [dev trc     ,00000]  &+                                                                               
    4 ETW000                                                                                91  1.181871
    4 ETW000  [dev trc     ,00000]  &+     Output SQLDA:                                                                               
    4 ETW000                                                                                25  1.181896
    4 ETW000  [dev trc     ,00000]  &+                        1 CT=LONG            T=INTEGER         L=4     P=4     S=0   
    4 ETW000                                                                                24  1.181920
    4 ETW000  [dev trc     ,00000]  &+                                                                               
    4 ETW000                                                                                44  1.181964
    4 ETW000  [dev trc     ,00000]  &+                                                                               
    4 ETW000                                                                                25  1.181989
    4 ETW000  [dev trc     ,00000]  *** ERROR in DB6Fetch[dbdb6.c, 3675] (END)                                15  1.182004
    4 ETW000  [dev trc     ,00000]  Could not check DB2 collating sequence.                                   47  1.182051
    4 ETW000  [dev trc     ,00000]  Disconnected from 'BID'                                                27172  1.209223
    4 ETW000  [dev trc     ,00000]  Disconnected: con_hdl=0 ; appl_hdl=91; appl_id="10.2.1.54.24513.091105073125"
    4 ETW000                                                                                27  1.209250
    2EETW169 no connect possible: "DBMS = DB6                              --- DB2DBDFT = 'BID'"
    We suspect with this error: SQL1471N  Cannot connect to database "BID" on node "1" because the database on this node is not synchronized with catalog node.
    db2 => list dbpartitionnums
    DATABASE PARTITION NUMBER
                               0
      1 record(s) selected.
    Please advise.
    Regards,
    Rudi

  • How to put decimal points in your calculator for mac only on Xcode.

    I need help. I created an app for calculating division, multiplication, addition & Subtraction. But everytime I divide 5 / 4, I get 1 without a remainder. The calculator app in OS X has a remainder when I calculated the division problem. I searched on the internet for help, but all of them are iOS tutorials. HELP!!!!!!

    OK. But someday I'll be able to get these decimals in the calculator so that 5 divided 4 doesn't say 1, but says 1.1 (1.3 in the Calculator app in OS X.) Here's the code once again:
    - (IBAction) getSum:(id)sender;
        int addend1, addend2, sum;
        addend1 = [mathField1 doubleValue];
        addend2 = [mathField2 doubleValue];
        sum = addend1 + addend2;
        [mathAns setDoubleValue:sum];
    - (IBAction) getDiff:(id)sender;
        int minu, subtrah, diff;
        minu = [mathField1 doubleValue];
        subtrah = [mathField2 doubleValue];
        diff = minu - subtrah;
        [mathAns setDoubleValue:diff];
    - (IBAction) getPro:(id)sender;
        int mulcand, mulpiler, pro;
        mulcand = [mathField1 doubleValue];
        mulpiler = [mathField2 doubleValue];
        pro = mulcand * mulpiler;
        [mathAns setDoubleValue:pro];
    - (IBAction) getQuote:(id)sender;
        int numer, denom, quote;
        numer = [mathField1 doubleValue];
        denom = [mathField2 doubleValue];
        quote = numer / denom;
        [mathAns setDoubleValue:quote];
    If this question has been answered, then I'll continue my Xcode development. If not, i'll have to throw my project in the trash. Leave me a suggestion.

  • Problem linking GL balances to GL lines

    Hi,
    A customer wants a crosstab report showing the movements of GL accounts with the beginning and ending balances per period, with the sum of the accounted period as a data point. The various accounts are then mapped to consolidation accounts using a 'CASE' calculation. The problem is not all accounts are used in any given period, so beginning and ending balances only appear for the account combinations on the worksheet instead of the cumulative beginning/ending balance of all accounts reported on. Because the customer wants to reconcile this report every period with the balances of the previous period this is not going to retrieve the correct data. Has anyone had to create this sort of report before and may have a solution for this?
    Regards,
    Arthur

    Hi,
    You will have to drive your report from a folder that returns all the accounts that you require in the report. Sometimes it is useful to create folder which is a join between the accounts and the periods table so that it returns a matrix of all possible combinations. You can then join this folder to the GL balances using an outer join on the detail so that all combinations are returned in the report.
    Rod West

  • 2 pass calculation on dimension

    I am using DB2 Olap Server 8.1 (Hyperion Essbase Application Manager version 6.5). I have the folowing problem: I am using a formula on a memember of a dense dimension (is not the accounts dimension) and I must use 2 pass calculation. The problem is that the 2 pass calc is not working, and the results of the calculation performs only one pass. I had tested this and it worked ok with the previous version DB2 Olap Server 7.2. Why is it not working now with the new version?

    not sure why it might have worked in the past, but a two pass stored member only gets that second pass if it is in fact tagged an account dimension.Why not make it a dynamic calc? No second pass will be required. The retrieval time will not be noticeable since it's on a dense dimension. orplace the member name at the end of your calc script with a ; after it. This will in effect perform a second pass on that member. hj

  • Excise Problem - 2nd Stage Dealer !!

    Hi,
    Our client buys material directly from factories or from vendors.
    Case1.) when they buy from factory then excise calculation has no problem.
    Case2.) when they buy from 1st stage dealer or 2nd stage dealer then excise calculation has a problem. the dealer increases the price of item after adjusting his profits and passes on the original excise to our client. when making a PO excise gets calculated on the 2nd stage dealer price ... but it shud not happen tht way... it shud be the same as passed on from the factory to the 1st stage dealer and then to 2nd stage dealer. though we have maintained "manual excise" condition in pricing procedure still there is a mismatch during MIRO.
    Any suggestions ???
    TAXINJ Procedure is being followed

    In Migo 105 u can capture&/ Post excise invoice.
    Use manual excise cond. in pricing
    or
    in j1iex use mrp tick
    in Delear case u will have to maintain all the details as per raw material case
    only diffence is in the % of bed ecess and secess put 0 instade of 16 2 and 1
    at the time of po u know that u vendor will give u material at say 100 Rs increse of excise which u dont now and 4 % vat on it
    So u r po will loke like 100 basic
    bed 0
    ecess0
    scess 0
    vat 4
    total 104
    now whe u do GR
    u come to know u have 8 bed 1.6 ecess 0.8 sccess
    at the time of gr in Excise tab value
    put the excise base as 100-8-1.6-0.8 = 89.6
    and in bed 8
    ecess 1.6
    secess0.8
    and in header tab of excise in miscellaneous tab tick MRP indicator
    save ur part one and 2 posted
    then do the miro
    on item line it will show 100 as amount change it to 89.6
    click on calculate tax
    and ur excate payment of rs 104 will be done to vendor
    this the the correct process of Delear case
    Hope this is help full
    Reward if usefull
    Refer
    Reservation deletion after specified period

  • Alternative units preference calculation

    Hi,
    over the main transaction vx99 I can join in the part preference calculation.
    now the problem is that the calculation allways shot down with the error :
    No alternative unit of measure specified.
    In know what an alternative units is and where I should put in. But we dont need
    an alternative it is in every constallation the unit piece.
    any idea what can I do to solve this error ??
    thx and regards
    Oliver

    Hai
    Alternative Unit of Measure will be maintained in Material Master data.
    MM02 - Select any material - Enter
    Inside master u will find a Icon at the top Additional Data
    In that select Unit of measure.
    I think the problem is While ur using Vx99 ur using different unit which is not maintained in the base unit of measure.
    If ur problem solved give me points.
    Subramanian.Ramasamy

  • Calculator Exit Button

    I'm a total beginner in Java, i use Eclipse to develop my codes.
    First of all I'm dutch so sorry for my crappy English.
    This is what i have:
    package org.oefening.rekentoestel;
    import java.awt.*;
    import java.applet.*;
    import java.awt.event.*;
    public class Rekenmachine1 extends Applet
        // Maakt nieuwe tekstvelden aan
        TextField invoervak1, invoervak2, resultaat;
        // Maakt nieuwe buttons aan
        Button keer, plus, delen, procent, aftrekken, afsluiten;
        // Zegt dat getal 1, 2 en het resultaatgetal double moeten zijn, dus ook achter de ",".
        double invoergetal1, invoergetal2, resultaatgetal;
        public void init()
        // Maakt de tekstvelden aaan   
        invoervak1 = new TextField(12);
        invoervak2 = new TextField(12);
        resultaat = new TextField(12);
        // Voegt de maalbutton toe, met actionlistener om het getal te onthouden.
        keer = new Button( "x" );
        keer.addActionListener( new maalHandler() );
        // Voegt de plusbutton toe, met actionlistener om het getal te onthouden.
        plus = new Button( "+" );
        plus.addActionListener( new plusHandler() );
        // Voegt de deelbutton toe, met actionlistener om het getal te onthouden.
        delen = new Button( "/" );
        delen.addActionListener( new delenHandler() );
        // Voegt de aftrekbutton toe, met actionlistener om het getal te onthouden.
        aftrekken = new Button( "-" );
        aftrekken.addActionListener( new aftrekkenHandler() );
        //Voegt de procentbutton toe, met actionlistener om het getal te onthouden.
        procent = new Button("%");
        procent.addActionListener( new procentHandler());
        // Voegt de Afsluitbutton toe, met actionperformed om het programma af te sluiten.
        afsluiten = new Button("Afsluiten");
        afsluiten.addActionListener ( new afsluitenHandler() );
        // De volgorde waarin de tekstvelden en buttons komen te staan.
        add(invoervak1);
        add(invoervak2);
        add(keer);
        add(plus);
        add(delen);
        add(procent);
        add(aftrekken);
        add(resultaat);
        add(afsluiten);
        class afsluitenHandler implements ActionListener
            public void actionPerformed(ActionListener e)     
                  System.exit(0);
    // ActionListener wordt toegevoegd in deze class.
    class maalHandler implements ActionListener
        // Als je op de maalbutton klikt wordt het antwoord van getal1 * getal2
         // weergegeven in het resultaat tekstveld
        public void actionPerformed(ActionEvent e)
            String invoer1 = invoervak1.getText();
            invoergetal1 = Double.parseDouble(invoer1); //parseDouble zet string om naar Double.
            String invoer2 = invoervak2.getText();
            invoergetal2 = Double.parseDouble(invoer2); //parseDouble zet string om naar Double.
            resultaatgetal = invoergetal1 * invoergetal2; // De berekening
            resultaat.setText("" + resultaatgetal);
    class procentHandler implements ActionListener
         public void actionPerformed(ActionEvent e)
         String invoer1= invoervak1.getText();
         invoergetal1 = Double.parseDouble(invoer1);
         String invoer2 = invoervak2.getText();
         invoergetal2 = Double.parseDouble(invoer2);
         resultaatgetal = invoergetal1 / invoergetal2 * 100;
         resultaat.setText("" + resultaatgetal);
    class plusHandler implements ActionListener
         // Als je op de plusbutton klikt wordt het antwoord van getal1+getal2
         // weergegeven in het resultaat tekstveld.
        public void actionPerformed(ActionEvent e)
            String invoer1 = invoervak1.getText();
            invoergetal1 = Double.parseDouble(invoer1); //parseDouble zet string om naar Double.
            String invoer2 = invoervak2.getText();
            invoergetal2 = Double.parseDouble(invoer2); //parseDouble zet string om naar Double.
            resultaatgetal = invoergetal1 + invoergetal2; // De berekening
            resultaat.setText("" + resultaatgetal);
    class delenHandler implements ActionListener
         // Als je op de deelbutton klikt wordt het antwoord van getal1/getal2
         // weergegeven in het resultaat tekstveld.
        public void actionPerformed(ActionEvent e)
            String invoer1 = invoervak1.getText();
            invoergetal1 = Double.parseDouble(invoer1); //parseDouble zet string om naar Double.
            String invoer2 = invoervak2.getText();
            invoergetal2 = Double.parseDouble(invoer2); //parseDouble zet string om naar Double.
            resultaatgetal = invoergetal1 / invoergetal2;// De berekening
            resultaat.setText("" + resultaatgetal);
    class aftrekkenHandler implements ActionListener
         // Als je op de minbutton klikt wordt het antwoord van getal1-getal2
         // weergegeven in het resultaat tekstveld.
        public void actionPerformed(ActionEvent e)
            String invoer1 = invoervak1.getText();
            invoergetal1 = Double.parseDouble(invoer1); //parseDouble zet string om naar Double.
            String invoer2 = invoervak2.getText();
            invoergetal2 = Double.parseDouble(invoer2); //parseDouble zet string om naar Double.
            resultaatgetal = invoergetal1 - invoergetal2; // De berekening
            resultaat.setText("" + resultaatgetal);
    }I know, it's a very crappy calculator.
    The problem is the exit button, it doesn't work at all.
    Any solutions?

    I now want to make my calculator to have just one textarea.
    The calculator has 3 now, one for input 1, input 2 and the output (result).
    So, i want to bring that down to just one textarea for input and output.
    Code:
    package org.rekenmachine;
    import java.awt.*;
    import java.applet.*;
    import java.awt.event.*;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    public class Rekenmachine extends JFrame
        // Maakt nieuwe tekstvelden aan
        TextField invoervak1, invoervak2, resultaat;
         // Maakt nieuwe buttons aan
        Button keer, plus, delen, procent, aftrekken, afsluiten;
        // Zegt dat getal 1, 2 en het resultaatgetal double moeten zijn, dus ook achter de ",".
        double invoergetal1, invoergetal2, resultaatgetal;
        public Rekenmachine() {
            super.setLayout(new GridLayout(3,3));
            super.setSize(220,150);
            super.setBackground(Color.blue);
            // the code from your init method
            super.setVisible(true); // display "this" frame
            super.setResizable(true);
    public static void main(String[] args) {
      new Rekenmachine(); // instantiate a Rekenmachine
        // Maakt de tekstvelden aaan   
        invoervak1 = new TextField(12);
        invoervak1.setBackground(Color.black);
        invoervak1.setForeground(Color.white);
        invoervak2 = new TextField(12);
        invoervak2.setBackground(Color.black);
        invoervak2.setForeground(Color.white);
        resultaat = new TextField(12);
        resultaat.setBackground(Color.black);
        resultaat.setText("Resultaat");
        resultaat.setForeground(Color.white);
        // Voegt de maalbutton toe, met actionlistener om het getal te onthouden.
        keer = new Button( "x" );
        keer.addActionListener( new maalHandler() );
        keer.setBounds(new Rectangle(90, 58, 100, 80));
        // Voegt de plusbutton toe, met actionlistener om het getal te onthouden.
        plus = new Button( "+" );
        plus.addActionListener( new plusHandler() );
        // Voegt de deelbutton toe, met actionlistener om het getal te onthouden.
        delen = new Button( "/" );
        delen.addActionListener( new delenHandler() );
        // Voegt de aftrekbutton toe, met actionlistener om het getal te onthouden.
        aftrekken = new Button( "-" );
        aftrekken.addActionListener( new aftrekkenHandler() );
        //Voegt de procentbutton toe, met actionlistener om het getal te onthouden.
        procent = new Button("%");
        procent.addActionListener( new procentHandler());
        // Voegt de Afsluitbutton toe, met actionperformed om het programma af te sluiten.
        afsluiten = new Button("Afsluiten");
        afsluiten.addActionListener ( new afsluitenHandler() );
        // De volgorde waarin de tekstvelden en buttons komen te staan.
        add(invoervak1);
        add(invoervak2);
        add(resultaat);
        add(keer);
        add(plus);
        add(delen);
        add(procent);
        add(aftrekken);
        add(afsluiten);
        class afsluitenHandler implements ActionListener
            public void actionPerformed(ActionEvent e)     
                  System.exit(0);
    // ActionListener wordt toegevoegd in deze class.
    class maalHandler implements ActionListener
        // Als je op de maalbutton klikt wordt het antwoord van getal1 * getal2
         // weergegeven in het resultaat tekstveld
        public void actionPerformed(ActionEvent e)
            String invoer1 = invoervak1.getText();
            invoergetal1 = Double.parseDouble(invoer1); //parseDouble zet string om naar Double.
            String invoer2 = invoervak2.getText();
            invoergetal2 = Double.parseDouble(invoer2); //parseDouble zet string om naar Double.
            resultaatgetal = invoergetal1 * invoergetal2; // De berekening
            resultaat.setText("" + resultaatgetal);
    class procentHandler implements ActionListener
         public void actionPerformed(ActionEvent e)
         String invoer1= invoervak1.getText();
         invoergetal1 = Double.parseDouble(invoer1);
         String invoer2 = invoervak2.getText();
         invoergetal2 = Double.parseDouble(invoer2);
         resultaatgetal = invoergetal1 / invoergetal2 * 100;
         resultaat.setText("" + resultaatgetal);
    class plusHandler implements ActionListener
         // Als je op de plusbutton klikt wordt het antwoord van getal1+getal2
         // weergegeven in het resultaat tekstveld.
        public void actionPerformed(ActionEvent e)
            String invoer1 = invoervak1.getText();
            invoergetal1 = Double.parseDouble(invoer1); //parseDouble zet string om naar Double.
            String invoer2 = invoervak2.getText();
            invoergetal2 = Double.parseDouble(invoer2); //parseDouble zet string om naar Double.
            resultaatgetal = invoergetal1 + invoergetal2; // De berekening
            resultaat.setText("" + resultaatgetal);
    class delenHandler implements ActionListener
         // Als je op de deelbutton klikt wordt het antwoord van getal1/getal2
         // weergegeven in het resultaat tekstveld.
        public void actionPerformed(ActionEvent e)
            String invoer1 = invoervak1.getText();
            invoergetal1 = Double.parseDouble(invoer1); //parseDouble zet string om naar Double.
            String invoer2 = invoervak2.getText();
            invoergetal2 = Double.parseDouble(invoer2); //parseDouble zet string om naar Double.
            resultaatgetal = invoergetal1 / invoergetal2;// De berekening
            resultaat.setText("" + resultaatgetal);
    class aftrekkenHandler implements ActionListener
         // Als je op de minbutton klikt wordt het antwoord van getal1-getal2
         // weergegeven in het resultaat tekstveld.
        public void actionPerformed(ActionEvent e)
            String invoer1 = invoervak1.getText();
            invoergetal1 = Double.parseDouble(invoer1); //parseDouble zet string om naar Double.
            String invoer2 = invoervak2.getText();
            invoergetal2 = Double.parseDouble(invoer2); //parseDouble zet string om naar Double.
            resultaatgetal = invoergetal1 - invoergetal2; // De berekening
            resultaat.setText("" + resultaatgetal);
    }

Maybe you are looking for

  • Subsequent update of record, long time to appear in Journalized View

    Hi, I'm running some integration tests that do an insert into a source table, commits the insert, updates that record, commits the update. The cscn numbers are widely spaced, for example, the insert is 69997742 and the update is 70000579. I have a sc

  • Iphone 4 not recognized in Windows and won't charge

    My iPhone 4 suddenly stopped charging via ANY charge medium, connected directly to USB port with adapter, via an iHome-like stereo, nor will it work in a wall charger. Also, neither a Mac (10.7) nor will a Win 7 computer with updated iTunes recognize

  • LOCAL CHURCH COMPUTER 'ON THE BLINK'    PLEASE GIVE US ASSISTANCE

    OUR COMPUTER SYSTEM SEEMS TO HAVE A 'BUG' - ON A GIVEN DAY, THE COMPUTER SCREEN LOOSES OUR WORK, AND THEN I FIND THIS MESSAGE, DISPLAYED IN A WORDFILE, WITHIN AN ICON. HERE IS THE MESSAGE: PLEASE ASSIST WITH INFORMATION. THANK YOU MUCH. MRS. D. BOGGS

  • Is there any report that can show tax rates per tax code per state

    Hello Gurus, I checked all standard SAP reports and they only list taxes based on the documents created. I am trying to develop a list of tax rates that are based on each tax code per state. Can some one suggest me how I can go about this.

  • DW8 wants to add code to play mp4 file

    When I open a file linking to an mp4 movie DW asks permission to add the code in red.   With or without the added code, the page plays on my computer but online it takes five minutes!  It seems the 55 meg file has to load completely before it starts.