Infix evaluator

I wrote a parser to take an infix expression such as 4+2/34-(3*4). The problem is that it can only deal with positive numbers, Ive been trying for ages to modify it so it can accept negative numbers ie -2*-2 = 4
Could anyone tell me the correct procedure for this as when my parser sees a negative sign it always mistakes it for a minus operator.
Thanks in advance
I can provide the code later if needed

JohnGraham wrote:
The basic structure is to:
1) hunt for unary minus operands and their arguments (i.e. '-' characters without a number or other evaluatable expression, so "*-4" would be a candidate, but "(/*something*/)-4" wouldn't...
2) resolve these in whatever way your parser does, and
3) carry on, knowing that all future '-' operators are binary.
How you carry out these steps depends highly on how your parser is implemented.This is much harder to code than reply #1.

Similar Messages

  • Infix to Postfix, and evaluation

    Hi,
    Right now I'm coding a program that transforms a string representing an infix expression (a+b) to a string result that represents the same expression but in postfix notation (a b +) and then evaluates it. The only difficulty is that I'm not using java, I'm requested to use PCSpim which is an assembly language. Could anybody help me by referrencing me to an algorithm, please note that assembly language is a low level language, therefore, structures are not defined, but can be simulated and registers are limited...
    Even better, if you know of any url that contains PCSpim codes, please let me know...
    thanks,
    Alessandro.

    The result was
    a 10k (that's another advantage of programming in
    assembly language) file which runs very fast. I
    recommend assembly language for operations that
    require speed! and Java for anything you wish!.That's true but what happens to portability. To move your program to some other platform you face writing a 10k assembly program (for a processor you may know nothing about). I think you should use assembly only as a last resort, and carefully consider if you really need that speed.

  • Logical infix expression to postfix error

    Hi,
    I've got a program which takes input at command line as an infix expressions and then aims to convert it to postfix for later evaluation . I carry this out using two stacks. My coding for this to happen is below( only parts i felt needed):
    private String postfix = "";
        private static Stack<Character> operatorStack = new Stack<Character>();
        private static Stack<Character> operandStack = new Stack<Character>();
                userEntry.trim();
                char[] temp = userEntry.toCharArray();
                for (int i = 0 ; i < temp.length ; i++) {
                    char a = temp;
    System.out.println(a);
    dump(temp);
    if(userEntry.startsWith("end")) {
    finished = true;
    System.out.println("Thank You for using Calculator");
    * dump. Places the input into a char array and push each
    * char to stack.
    * @param temp array of strings to be tokenized and
    * pushed ontop of stack
    private void dump(char[] temp)
    for(char c : temp) {
    Character C = new Character(c);
    String token;
    token = C.toString();
    System.out.println("Testing token "+token);
    //its a number just add to the postfix string
    if (Character.isDigit(C)) {
    postfix = postfix + "" + (Integer.parseInt(token));
    System.out.println("new infix"+ postfix);
    //its an operator so push it to operator stack
    else if (token.equals("(")) {
    operatorStack.push(C);
    System.out.println(operatorStack.peek());
    // pop everthing before the ")" until you hit an "(" , this will be the operands
    else if (token.equals(")")) {
    while ((operatorStack.peek()).charValue() != '(') {
    char ch = operatorStack.pop();
    postfix = postfix + " " + ch;
    System.out.println(operatorStack.empty()+"operator stack is empty");
    System.out.println("new postfix 2 "+postfix);
    System.out.println(operatorStack.pop()+"jus kicked somthin off");
    else if (token.equals(" ")){}
    //find the order of operators and put this in to the postfix script, the operators +-,/,- never make it on to the stack
    else {               
    System.out.println(operatorStack.empty()+"operator stack is empty");
    System.out.println(C);
    while (!(operatorStack.empty()) && !((operatorStack.peek()).equals('('))
    && ((setPrecedence(C)) <= (setPrecedence((operatorStack.peek()).charValue())))) {
    System.out.println("precedence test"+operatorStack.peek());
    operatorStack.push(C);
    postfix = postfix + " " + operatorStack.pop();
    System.out.println("just pushed operator");
    while (!operatorStack.empty()) {
    postfix = postfix + " " + operatorStack.pop();
    System.out.println("last postfix :"+postfix);
    public int setPrecedence(char x)
    if (x == '+'|| x == '-') {
    return 1;
    if (x == '*' || x == '/' || x == '%') {
    return 2;
    return 0;
    }if i was to enter at the command line ( 2 + 4 ) * 3 ( must have spaces)
    instead of the postfix conversion being "24+3* it results in "243".
    I've got various print statement in my code but  still can seem to figure out what am doing wrong. I believe the problem lies in my else block of statements.
    Example of entering an expression result :
    ( 2 * 4 ) * 3
    2
    4
    3
    Testing token (
    Testing token 
    Testing token 2
    new infix
    Testing token 
    Testing token *
    falseoperator stack is empty
    Testing token 
    Testing token 4
    new infix24
    Testing token 
    Testing token )
    falseoperator stack is empty
    new postfix 2 24
    (jus kicked somthin off
    Testing token 
    Testing token *
    trueoperator stack is empty
    Testing token 
    Testing token 3
    new infix243
    last postfix :243
    If you can see any reason why its producing this instead of the desired or any thing you disapprove of i would be  greatful if you would kindly say so.
    Thanks alot.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    * CORRECTED CODING INDENTION sorry* hopefully a little clearer.
    Hi,
    I've got a program which takes input at command line as an infix expressions and then aims to convert it to postfix for later evaluation . I carry this out using two stacks. My coding for this to happen is below( only parts i felt needed):
    private String postfix = "";
    private static Stack<Character> operatorStack = new Stack<Character>();
    private static Stack<Character> operandStack = new Stack<Character>();
                userEntry.trim();
                char[] temp = userEntry.toCharArray();
                for (int i = 0 ; i < temp.length ; i++) {
                    char a = temp;
    System.out.println(a);
    dump(temp);
    if (userEntry.startsWith("end")) {
    finished = true;
    System.out.println("Thank You for using Calculator");
    * dump. Places the input into a char array and push each
    * char to stack.
    * @param temp array of strings to be tokenized and
    * pushed ontop of stack
    private void dump(char[] temp)
    for(char c : temp) {
    Character C = new Character(c);
    String token;
    token = C.toString();
    System.out.println("Testing token "+token);
    //its a number just add to the postfix string
    if (Character.isDigit(C)) {
    postfix = postfix + "" + (Integer.parseInt(token));
    System.out.println("new infix"+ postfix);
    //its an operator so push it to operator stack
    else if (token.equals("(")) {
    operatorStack.push(C);
    System.out.println(operatorStack.peek());
    // pop everthing before the ")" until you hit an "(" , this will be the operands
    else if (token.equals(")")) {
    while ((operatorStack.peek()).charValue() != '(') {
    char ch = operatorStack.pop();
    postfix = postfix + " " + ch;
    System.out.println(operatorStack.empty()+"operator stack is empty");
    System.out.println("new postfix 2 "+postfix);
    System.out.println(operatorStack.pop()+"jus kicked somthin off");
    else if (token.equals(" ")) {
    //do nothing
    //find the order of operators and put this in to the postfix script, the operators +-,/,- never make it on to the stack
    else {               
    System.out.println(operatorStack.empty()+"operator stack is empty");
    System.out.println(C);
    while (!(operatorStack.empty()) && !((operatorStack.peek()).equals('('))
    && ((setPrecedence(C)) <= (setPrecedence((operatorStack.peek()).charValue())))) {
    System.out.println("precedence test"+operatorStack.peek());
    operatorStack.push(C);
    postfix = postfix + " " + operatorStack.pop();
    System.out.println("just pushed operator");
    while (!operatorStack.empty()) {
    postfix = postfix + " " + operatorStack.pop();
    System.out.println("last postfix :"+postfix);
    public int setPrecedence(char x)
    if (x == '+'|| x == '-') {
    return 1;
    if (x == '*' || x == '/' || x == '%') {
    return 2;
    return 0;
    }if i was to enter at the command line ( 2 + 4 ) * 3 ( must have spaces)
    instead of the postfix conversion being "24+3* it results in "243".
    I've got various print statement in my code but still can seem to figure out what am doing wrong. I believe the problem lies in my else block of statements.
    Example of entering an expression result :
    ( 2 * 4 ) * 3
    2
    4
    3
    Testing token (
    Testing token
    Testing token 2
    new infix
    Testing token
    Testing token *
    falseoperator stack is empty
    Testing token
    Testing token 4
    new infix24
    Testing token
    Testing token )
    falseoperator stack is empty
    new postfix 2 24
    (jus kicked somthin off
    Testing token
    Testing token *
    trueoperator stack is empty
    Testing token
    Testing token 3
    new infix243
    last postfix :243
    If you can see any reason why its producing this instead of the desired or any thing you disapprove of i would be greatful if you would kindly say so.
    Thanks alot.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Postfix Evaluation

    I am having trouble understanding why the PostfixEvaluator method in the class PostfixEvaluator is causing a number of problems; everything else works fine.
    import java.io.*;          
    import javax.swing.JOptionPane;
    class Stack
       private int maxSize;
       private char[] stackArray;
       private int top;
       public Stack(int s)       // Constructor of Stack
          maxSize = s;
          stackArray = new char[maxSize];
          top = -1;
       public void push(char j) {  // Puts item on top of stack
           stackArray[++top] = j; }
       public char pop(){         // Takes an item from the top of stack
       return stackArray[top--]; }
       public char peek(){        // Shows item at the top of the stack
       return stackArray[top]; }
       public boolean isEmpty(){  // Returns true if stack is empty
       return (top == -1); }
    class Converter                  // This class converts Infix input to Postfix output
       private Stack theStack;
       private String input;
       private String output = "";
       public Converter(String in) { // Constructor for the Converter class
          input = in;
          int stackSize = input.length();
          theStack = new Stack(stackSize);
       public String toPostFix()    // toPostFix method
          for(int j=0; j<input.length(); j++)     
             char ch = input.charAt(j);           
             switch(ch)
                case '+':              
                case '-':
                   gotOper(ch, 1);     
                   break;              
                case '*':              
                   gotOper(ch, 2);     
                   break;              
                case '(':              
                   theStack.push(ch);  
                   break;
                case ')':              
                   gotParen(ch);       
                   break;
                default:              
                   output = output + ch;
                   break;
                }  // end switch
             }  // end for
          while( !theStack.isEmpty() )    
             output = output + theStack.pop();
          return output;                   // Returns Postfix Answer to User
       public void gotOper(char opThis, int prec1) // Get Operator from entered Expression
          while( !theStack.isEmpty() )
             char opTop = theStack.pop();
             if( opTop == '(' )            // if it's a '(' (left parentheses)
                theStack.push(opTop);      // Push '(' into the stack
                break;
             else                          // If it isn't a left parentheses
                int prec2;                 //
                if(opTop=='+' || opTop=='-')  // Gets precedence of operator
                   prec2 = 1;     //
                else
              prec2 = 2;       // Assigns Precedence
                if(prec2 < prec1)          // Compares Precedence
                   theStack.push(opTop);  
                   break;
                else                      
                   output = output + opTop; 
      theStack.push(opThis);
       public void gotParen(char ch)
          while( !theStack.isEmpty() )
             char chx = theStack.pop();
             if( chx == '(' )         
                break;                
             else                      
                output = output + chx; 
    public class PostfixEvaluator
           StackArray stackArray = new StackArray();
           StringTokenizer tok;
           private int val1,val2;
           private int result;
        public PostfixEvaluator(String output)
        tok = new StringTokenizer(output);
         while(tok.hasMoreElements())
         String token = tok.nextToken();
         if(Numeral.isOperand(token))
         stack.push(token);
         else if(Numeral.isOperator(token))
         if(token.equals("+"))
         val1 = Integer.parseInt(stackArray.pop().toString());
         val2 = Integer.parseInt(stackArray.pop().toString());
         result = val1 + val2;
         stack.push(new Integer(result));
         else if(token.equals("-"))
         val1 = Integer.parseInt(stackArray.pop().toString());
         val2 = Integer.parseInt(stackArray.pop().toString());
         result = val2 - val1;
         stackArray.push(new Integer(result));
         else if(token.equals("*"))
         val1 = Integer.parseInt(stackArray.pop().toString());
         val2 = Integer.parseInt(stackArray.pop().toString());
         result = val1 * val2;
         stackArray.push(new Integer(result));
         else if(token.equals("/"))
         val1 = Integer.parseInt(stackArray.pop().toString());
         val2 = Integer.parseInt(stackArray.pop().toString());
         result = val2 / val1;
         stackArray.push(new Integer(result));
         public String getResult()
         return String.valueOf(stackArray.top());
    class Calculator
       public static void main(String[] args) throws IOException
          String input, output;
               input = JOptionPane.showInputDialog(null, "Enter an Infix Expression:"); // Enter an infix expression
             Converter docalculation = new Converter(input); // --> See Converter Class
              output = docalculation.toPostFix(); // Does Infix to Postfix Calculation
             JOptionPane.showMessageDialog(null, "The Postfix Expression is: " + output); // Outputs the postfix expression
             JOptionPane.showMessageDialog(null, "The evaluated expression is: " + getResult(output));
       }  Edited by: babypurin on Oct 14, 2009 10:37 PM

    I get the following compiling errors (I am having trouble interpreting what these error messages mean).
    Calculator.java:123: cannot find symbolsymbol : class StackArraylocation: class Converter.PostfixEvaluator     StackArray stackArray = new StackArray();     
    Calculator.java:124: cannot find symbolsymbol : class StringTokenizerlocation: class Converter.PostfixEvaluator     StringTokenizer tok;     
    Calculator.java:123: cannot find symbolsymbol : class StackArraylocation: class Converter.PostfixEvaluator     StackArray stackArray = new StackArray();     Calculator.java:131: cannot find symbolsymbol : class StringTokenizerlocation: class Converter.PostfixEvaluator tok = new StringTokenizer(output);
    Calculator.java:135: cannot find symbolsymbol : variable Numerallocation: class Converter.PostfixEvaluator     if(Numeral.isOperand(token))     
    Calculator.java:137: cannot find symbolsymbol : variable stacklocation: class Converter.PostfixEvaluator     stack.push(token);     
    Calculator.java:139: cannot find symbolsymbol : variable Numerallocation: class Converter.PostfixEvaluator     else if(Numeral.isOperator(token))     
    Calculator.java:146: cannot find symbolsymbol : variable stacklocation: class Converter.PostfixEvaluator     stack.push(new Integer(result));     
    Calculator.java:200: cannot find symbolsymbol : variable output2location: class Converter.Calculator     output2 = output.PostfixEvaluator(); // Calculates value of postfix expression     Calculator.java:200: cannot find symbolsymbol : method PostfixEvaluator()location: class java.lang.String     output2 = output.PostfixEvaluator(); // Calculates value of postfix expression     
    Calculator.java:204: cannot find symbolsymbol : variable output2location: class Converter.Calculator JOptionPane.showMessageDialog(null, "The evaluated expression is: " + output2);
    Calculator.java:188: inner classes cannot have static declarations public static void main(String[] args) throws IOException

  • Parsing/evaluating conditional statements

    I need some help developing an algorithm for parsing and evaluating conditional statements. I need to be able to handle variables, logical operators, relational operators, mathematical operators, and parentheses.
    For example:
    if ( (a+1 > b*5) and ((c +2) * 6 <= 5) )
    All the variables correspond to a number so the expression could be trivially converted to something like this:
    if ( (8+1 > 4*5) and ((6 +2) * 6 <= 5) )
    I am aware that infix expression can be converted to postfix expressions for easier evaluation, but I don't know exactly how this is done, nor do I know if this would be the best way to do it.
    If more information is needed let me know.
    Thanks in advance,
    Paul

    Thanks, this is very helpful information. I ended up coding it by converting to postfix already and have had good results, but I will look into the tree method when I get some time and see if it works better for me. Also if you know what method would typically yeild the best performace for evaluation of the expressions, let me know.
    Also, for anyone else that might want to do this I coded a simple stack class to get around creating objects for evaluating integer/boolean expressions, as long as its not a problem if exceptions are not thrown if the expression's logic is messed up.
    Thanks again,
    Paul
    public class IntStack
        private int[] stack;
        private int top;
        public IntStack(int maxSize)
            stack = new int[maxSize];
            top = 0;
        public void push(int value)
            top++;
            stack[top] = value;
        public int popInt()
            top--;
            return stack[top+1];
        public void push(boolean value)
            top++;
            if (value)
                stack[top] = 1;
            else
                stack[top] = 0;
        public boolean popBool()
            top--;
            return stack[top+1] == 1;
        public boolean isEmpty()
            return top == 0;
    }

  • Time Evaluation Re Run in Mid Month & Mid Mont Initialization !

    Hi There,
    i was trying to run Time evaluation for the period 01.04.2011 to 31/12/2011.
    from April, that is 01.04.4011 to 30.06.2011 Time evaluation was good, now time evaluation has to run from 01.07.2011 but time evaluation has repeated from 12.06.2011 to 11.07.2011 as Initialization period 07/2011, and the same scenario is repeated for the rest of the year..all periods are initiated on 12th of each month from 6th month that is 12.06.2011.
    i was been trying to rectify this issue but was not bale to solve it, could any one please look in to it and let me know how to solve it?
    your help is appreciated.
    Thanks
    Kumar

    Can you please regenerate Period Parameters for 2011 year in T-Code for OG00 for period parameter 01 and then give the hire date in the field Forced Recalculation as of run in PT60 and run  the time evaluation.
    Best Regards,

  • Classic report - Condition evaluated for every row

    APEX 4.2.2
    I am seeing something strange in a classic report region. A report started to fail at run-time with a strange error about bad syntax. When I run the page in debug mode, I see the following
    print column headings
    rows loop: 30 row(s)
    ...Execute Statement: begin wwv_flow.g_boolean := '' is not null;
    end;
    ......Result = false
    ...Execute Statement: begin wwv_flow.g_boolean := '' is not null;
    end;
    ......Result = false
    ...Execute Statement: begin wwv_flow.g_boolean := 'string with a embedded ' single quote' is not null;
    end;
    ......Result = true
    Looks like the APEX engine is evaluating a boolean expression after rendering and each and every row in the report. And for some strange reason, it is using a piece of data from my query's resultset and failing because of the bad syntax introduced due to the single-quote in the string.
    I have never seen this before. Any idea what is going on?
    Thanks

    Howdy Paul, sorry should have provided all the details. No, this is a standard generic column template. Ah, you are right, drat I should have looked closer. The template has use a condition to show either a highlighted row or normal one. Sorry for the false alarm, I can take it from here. Enjoy your flight :-)

  • Use of Time Evaluation to generate Absence Quota

    Hi,
    We are planning to use time evaluation to generate absence quota. At the moment we are using RPTQTA00 report to generate Absence Quota. We have negative time management and since, the project has already gone live i have very limited scope to change the basic settings for example we do not have any employee subgroup to identify part time employees, PT & FT are in one employee sub-groups. We have only one ESG & PSG for time recording, time quota etc. The base entitlement is defined for the FT employees and it is reduced propertionately based on the employement percentage in IT0007. Now we are going to adopt a change in design, and planning to have specific work-schedule for PT employees. In that case, we will not have the scope to maintain %age in IT0007 for part time employees but exact no of working hours will be used. It means that system will treat the PT emploees as FT while generating absence quota and output the FT absence entitlement. As i said earlier we can not differentiate PT employees from FT employees based on ESG or PSG, i can not create a separate quota selection rule for part time employees. Hence, we are moving from running RPTQTA00 report to time evaluation for absence quota generation purpose.
    Now can anybody please help finding a alternate solution for the above, if it is possible to do it through report RPTQTA00 or we have to adopt the time evaluation. In case we are going to generate absence quota through time evaluation, can we only generate absence quota and skip anything that is related to payroll.
    Any comments/suggestion/advise will be very helpful to us.
    Thanks.
    Sujit

    We are not able to generate absence quota for part-time employees as when we do that, system is treating PT employees as FT employees and the FT base entitlement is referred while calculating absence quota. i can not define separate absence entitlement for PT employees as we have only one ESG and PSG, and based on this quota selection group is defined. The QUOMO feature is defined based on work contract - employee sub-group (there is no separate emp sub-group for PT employees) - Pay Scale Group. We are having this problem as we have specific work schedule for PT employees now (Ex. we create 3 days work schedule with 15 hours: 4.5,4.5, 6 hours) and we are not maintaining employement percentage for them. So system is treating PT employee as FT employee with 100% employement percentage. Please let me know if you need any specific info to understand my issue.
    Thank you so much for the response.

  • Perform VENDOR EVALUATION for MORE THAN ONE VENDORS at a time

    Hello all,
    Please guide for any process where i can perform Vendor Evaluation for MORE THAN ONE vendors AT A TIME.
    At my location there are around thousand vendors, which are to be evaluated, and difficult to perform the evaluation process one-by-one.
    (ME61/ME62/ME63)
    Detailed replies with various possibilities would be highly appreciated.
    Thanks & Regards,
    Joy Ghosh

    The vendor evaluation for some thousand vendors at the same time has already been in SAP long before they developed LSMW. The purpose of LSMW is to load data from a legacy system, of course you can (mis-)use it for a lot other things.
    But you should not always use LSMW if you are to lazy to go thru the SAP standard menu to find a transaction like ME6G
    There you define a job that runs RM06LBAT report.
    You first have to define a selection variant for this report. this can be done in SE38 by entering the report name, select variant, clicking display, then entering a name for the variant and clicking Create.

  • [OIM 9.1.0.2] Access Policy being evaluated to an OIM user disabled.

    Hi Gurus,
    I have an Access Policy being evaluated and provisioning resource (AD) to an OIM user disabled.
    Any tip on what I should take a look?
    Thanks in advance.

    Hi all,
    I have configured out the XL.EvaluateMembershipForInactiveUser System Property as TRUE, but the membership rule does not get evaluated for disabled users. So the user still remain into the group. I have restarted the OIM.
    I need to active the Evaluate User Policies schedule task for this configuration be effective. Or should I do something more?
    Thanks a lot.

  • Error " In case of evaluated receipt settlement, please maintain tax code", during VI01

    Dear Team
    We have a scenario in our environment where for a delivery made for STO Purchase Order, we are trying to post shipping cost document for Shipping document.
    When we try to save the document, the system returns the error " In case of evaluated receipt settlement, please maintain tax code".
    We have checked in the system. The vendor to whom the PO has been raised is not maintained for Evaluated Receipt Settlement, and as this is a STO , no vendor info record has been maintained for the same.
    The issue has started to come for a new plant and transportation route, for other routes and plants we are still able to proceed successfully for creation of shipment costs
    Can this be an issue of master data maintanence that we may have missed during plant creation or transportation route creation
    Else, Kindly guide.

    Hi Tarunveer,
    Which Vendor are you mentioning: Plant Vendor of STO or Forwarding Agent.
    I am suggesting to check in LFM2 for Forwarding Agent.
    Same way, in the case of Invoice Tab in PO, (Which PO are you mentioning: STO or PO for Forwarding Agent?)
    Regards,
    MJ.

  • Evaluated Receipt Settelement - Automatic PO creation in GR

    Dear Experts,
    Please answer my querry -
    here in my scenario,
    Purchase order is created automatically, at the time of Goods receipt Posting.
    Now i want post invoices automatically (ERS) with the reference of Purchase Order/Goods receipt.
    settings made -
    1) XK01 - ERS Check Box
    now, in our case we are not creating PO, it is created automatically. but in display mode of PO it shows ERS check box is selected.
    But system is not posting an invoice.
    Please give me solution.
    Thanks in advance -

    Hi,
    Try ERS in MRRL not in MIRO
    In MRM1, mainatin condition record for Message Type "ERS"
    Also check in SPRO > MM > LIV > Evaluated Receipt Settlement (ERS) > ERS Invoice Numbering
    > Create Number Groups "XXXXX"
    > Assign ERS Invoice Number Ranges to Company Codes -> Here fo to "Addiitonal Data" of company code and maintain No. range as "01" in SAPERS field.
    > Create ERS Invoice Number Ranges -> Here for No. Range Group "XXXXX" mainatin No. Range for code "01"

  • Best practice for Logical OR pre-condition evaluation

    Greetings,
    I'm finding TS doesn't have basic features for decision making (imp) for execution. Any recommendations are welcomed and appreciated. Please see below scenario.
    I'd like to execute setup steps (custom step types) for a signal generator based upon the user selected "Test".
    To keep it simple for the signal generator let's say we have the following steps:
    Set Freq | Set PWR lvl | Set Modulation Type | Set Modulation ON/OFF | Set RF Power ON/OFF
    For User Selected Tests let's say we have Test A(0) | Test B(1) | Test C(2) (Test  A & C requires Modulation, B does not)
    Here's my issue:
    I can't get SET Freq | SET PWR lvl | Set RF Power ON/OFF to execute a pre-condition setup for evaluating Logical OR's. (i.e. locals.TestSelected ==0||1||2)
    Same for Set Modulation Type | Set Modulation ON/OFF (i.e locals.TestSelected ==0||2)
    Thanks in advance for any guidance provided.
    Chazzzmd78
    Solved!
    Go to Solution.

    Just want to clarify, there seems to be a misunderstanding about the difference between bitwise OR (i.e. the | operator) and logical OR (i.e. the || operator). Bitwise OR results in the combination of all of the bits which represent an integer stored as binary, while logical OR (i.e. what you really want in this case) results in a True, non-zero, value (usually 1) if either operand is non-zero.
    Also, the == operator has a higher precedence than either the bitwise OR or logical OR operators.
    So what this means:
    locals.TestSelected ==0||1||2
    is to give a result of True (i.e. 1) if either locals.TestSelected ==0, 1 is non-zero, or 2 is non-zero. Since 1 and 2 are always non-zero that expression will actually always result in a True value.
    Similarly, although the following will likely give you the behavior you want:
    (locals.TestSelected == 0) | (locals.TestSelected == 1) | (locals.TestSelected == 3)
    That's not really doing what you are probably thinking it does. It's actually getting the value True (i.e. 1) for each of the sub-expressions in parethesis and then bitwise OR'ing them together. Since the result for the == operand is always either 0 or 1, this ends up giving the same result as logical OR (i.e. the || operator), but what you really want in this case is logical OR and for other expressions using bitwise OR when you mean logical OR might give you incorrect results. So, you should really be using something like the following:
    Locals.TestSelected == 0 || locals.TestSelected == 1 || locals.TestSelected == 3
    The parenthesis don't really matter in this case (so can be left out, but also doesn't hurt anything so you can leave them in if you prefer) because the == operator has a higher precedence than the || operator so all of the == operations will be done first.
    Hope this helps clarify things,
    -Doug

  • [svn] 3045: Fix FB-13900: Expression Evaluator: 'is' and 'as' expressions return 'Target player does not support function calls'

    Revision: 3045
    Author: [email protected]
    Date: 2008-08-29 10:59:25 -0700 (Fri, 29 Aug 2008)
    Log Message:
    Fix FB-13900: Expression Evaluator: 'is' and 'as' expressions return 'Target player does not support function calls'
    Ticket Links:
    http://bugs.adobe.com/jira/browse/FB-13900
    Modified Paths:
    flex/sdk/trunk/modules/debugger/src/java/flash/tools/debugger/concrete/BinaryOp.java
    flex/sdk/trunk/modules/debugger/src/java/flash/tools/debugger/concrete/PlayerSession.java

    Revision: 3045
    Author: [email protected]
    Date: 2008-08-29 10:59:25 -0700 (Fri, 29 Aug 2008)
    Log Message:
    Fix FB-13900: Expression Evaluator: 'is' and 'as' expressions return 'Target player does not support function calls'
    Ticket Links:
    http://bugs.adobe.com/jira/browse/FB-13900
    Modified Paths:
    flex/sdk/trunk/modules/debugger/src/java/flash/tools/debugger/concrete/BinaryOp.java
    flex/sdk/trunk/modules/debugger/src/java/flash/tools/debugger/concrete/PlayerSession.java

  • Service Desk Enhancement with Forms & Survey - no data evaluation possible

    Hello,
    I implemented an additional form in the service desk (using the survey functionality)
    See details here: http://www.solutionmanagerexpert.com/article_printable.cfm?id=5621
    Creation was fine, I am able to see the additional form as extra tab in Service Desk Support Messages (transaction type SLFN).
    But evaluting the data does not work.
    According to the survey suite, no data is available - but I answered to the survey/provided input to the form.
    I saved the values, and looking into the appropriate tables (mentioned here: CRM Survey Evaluation Data Storage) give the impression that answers are there.
    But I cannot evaluate them...
    Does anybody have experience with this kind of service desk enhancement and knows how to get the data for evaluation?
    Regards,
    Jan

    Hi Shilpi,
      Could you please share  how did you achieve this..
    Regards.,
    Franklin.

Maybe you are looking for