Using a boolean formula in condition

Hi All,
In my report I've two prices, legal price and audit price.
Legal price is a Nav. att. in cube it is an attribute of material.
My requirement is to show only those records where audit price < legal price.
      First, I tried to achieve this by putting audit price in condition and creating a varriable for legal price, but it didn't do anything that condition shows all the records.
Then I've created a boolean formula called flag and put this condition in it. It shows me 0 and 1 correctly. But, when I create any condition based on this flag saying flag > 0 or flag = 1, or flag = 0; I got no record.
Can anyone pls. explain what I'm doing wrong or Bex. treat boolean formulas differently in conditions.
Regards
Tarun

Tarun,
   Try this.
   Create a calculated key figure = audit price - legal price.
Now create a condition on this new key figure like if value < 0 to display.
You can hide this field.
Hope it Helps
Srini

Similar Messages

  • Used of 362 & 363 Alternative formula for condition base value in Define Procedures (Tcode obyz)

    Dear
             what is the  used of 362 & 363 Alternative formula for condition base value in Define Procedures (Tcode obyz)

    362 is used for to pick base value to BASB condition type from MM pricing procedure
    363 is used for all sales tax {VAT (Inventory or set -off) & CST}.
    Tax Calculation on Freight - Different Scenarios
    Please  go through this  link  and  you will know  very well a bout  362 and  363  usage

  • Usage of formulas in conditions in BEx Query Designer

    Hi guys,
    does anybody of you guys know, if it's possible to use the results of formulas in conditions? I tried it, but the result of the query was "No applicable data found", but there are data for the selection.
    When I'm defining the condition with the key figure (no restricted or calculated key figure), then the query can be executed.
    In my case, I like to define a condition based on a formula result. The value should only be displayed, when the result is greater than 30.
    Any ideas or are there any bugy in the BEx Query Designer?
    Thanks a lot + best regards,
    Clemens

    Hi Clemens,
    I have created a condition in my own system based on formula and it works perfectly fine. Please check following points in your condition change mode,
    1) Condition is marked as Active.
    2) In the block "Evaluate condition below for" you will have to select "All characteristics in drilldown Independently". If you have selected combination of characteristics then you will have to maintain proper sequence otherwise your condition will not work.
    3) In the next block when you set the condition, click on new, in the first block select your Formula from dropdown and set the proper operator in your case you will have to select "Greater than" in the next column set the value of key figure and just trasnfer it.
    Now you are ready to use the condition.
    Regards,
    Durgesh.

  • Issue in using presentation variable as filter condition in the reports

    Hi,
    I have an issue in using presentation variable as filter condition in my reports the details are as follows:
    Details :
    We want to implement the Max and Min variables through Presentation variables only.we do not want to implement it through session variables in this case.
    We have two variables MIN and MAX to be used as Presentation Variables,for a column of the report (which is a quantity),so that the user wants to see the data for this column within a particular range.i.e the Min and the Max.This part has been implemented well . The issue is when the user wants to see the full data.In that case we will not pass any values to these two Presentation Variable or in other words we are not restricting the report data so we are not passing any value to the variables,this is when the report is throwing the error. we want to leave this variables blank in that case.but this is giving error.
    Please suggest how can I overcome this issue.
    Thanks in Advance.
    Regards,
    Praveen

    i think you have to use guided navigation for this. create two reports first is the one you are having currently and second is the one in which remove the presentation variable from the column formula. i.e. the same report with no aggregation applied.
    Now create a dummy report and make it return value only when the presentation variable value is not equal to max or min. guide the report to navigate between the first and second report based on the result of the dummy report.

  • How to Use a Boolean Vector To Index an Array

    Say I have an array A = [1 2 3 4 5 6 7 8 9 10].
    I also have a boolean array B = [1 1 0 0 0 0 0 0 0 1].
    I want to use the boolean array B to pick out elements in A, creating a new array C = [1 2 10]. In MATLAB, I would just type C = A(B).
    I'm scratching my head trying to figure out how to do this. One solution would be to run through a for loop, querying B(i), and deleting A(i) if B(i) = 1. But this would change the size of A, so that the second time I did this, my index would be wrong.
    Anyone know a clean way of doing this?
    BONUS: If I have a 2D AA, with multiple columns, it would be nice to use B to pick out multiple columns of AA (in MATLAB, this would be CC = AA(:,B).
    Solved!
    Go to Solution.

    This can be done with auto-indexing with conditional tunnels.  The same approach could easily be applied to a 2D array, as well:

  • Use of boolean variables in BPEL switch statements

    I have a workflow with a single boolean input parameter:
    <element name="input" type="boolean"/>
    I wish to use a switch statement within the workflow, based on the value of that boolean parameter.
    When I use the following XPath expression:
    bpws:getVariableData("input","payload","/tns:BooleanRequest/tns:input")
    I get the correct functionality, although I get the following BPEL compiler warning:
    " [bpelc] [Warning ORABPEL-10078]: return value of this expression may not be a boolean
    [bpelc] [Description]: in line 35 of "C:\eclipse\workspace\Boolean\Boolean.bpel", xpath expression "bpws:getVariableData("input","payload","/tns:BooleanRequest/tns:input")" used in <switch> may not return boolean type value, the xpath engine would automatically try to convert the return value to boolean..
    [bpelc] [Potential fix]: Please use one of the built-in boolean functions from xpath http://www.w3.org/TR/xpath#section-Boolean-Functions to convert the return value to boolean.."
    However, the boolean functions referenced do not appear to be relevant to a variable which is already of a boolean type. If I attempt to use the boolean() function in my XPath expression, I get rid of the compiler error, but the workflow now does not work as required.
    How can I get rid of the compiler warning and still get the required functionality, and/or am I doing the wrong thing?
    I am currently running on JBoss, with BPEL release 2.1.2 [build #1226].
    Thanks for any help or ideas.

    Hi Marlon,
    Thanks for that - I guess we have to accept the vagaries of XPath and the absence of type-checking for variables.
    I hadn't fully understood until I started investigating that I can assign ANY string to variable of type xsd:boolean, which has been the cause of some of the confusion for me - whether that value is then considered true or false depends on how you write your test condition.
    I tried with your condition, and it didn't seem to work (evaluated to true if the variable data was the string "true()", but otherwise it seemed to always evaluate to false.
    I also tried the following:
    condition="bpws:getVariableData('booleanVariable')=true()"
    but that evaluates to true for any string of length > 0.
    The only one I can get to consistently work is:
    condition="bpws:getVariableData('booleanVariable')=string(true())"
    although that means that variable data of "TRUE" will evaluate to false (may well be the correct behaviour, depending on how you're setting the boolean variable in the first place).

  • Alternative formula for condition base value in cross-application

    Hi,
    I need inputs regarding an issue as:-
    In "TAXINJ" Tax pricing procedure, for a ZXXX  excise related condition type the alternate condition base value (Alternative formula for condition base value) must be of  YXXX condition type of MM Purchase pricing Procedure.
    How to acheive Alternative formula for condition base value in cross-application area as both condition type belongs to different Application area i.e.  ZXXX belongs to TX and YXXX belongs to M.
    One way or only way is thro' routine but I do not know How it works? 
    Thanking you.
    Prashant

    routine is only the best way for u in this case
    u will have to use subtot may be 6 or 4 in MM pricing procedure
    and write a routien in Tax procedure, i n that u will have to write a code where in ur sustem will featch this value in sub total and act a a base for ur cond type in Tax proc for ue condition type.
    what is your excat requirement
    there might be other work around that can help u around
    hope this works
    or write t routines one in MM and Other in Tax proc for ur issues

  • Pricing Condition type controls- Formula and condition records

    Hello experts
    I have one question in pricing.
    Is it possible to determine the value of a single condition type by means of the maintained condition records vs a formula depending on the scenario?
    Eg- In my case for the requirement is:-
    If in my sales order the item category is X or Y then i need to use the condition records to determine the value of the condition type  say ZCON but if the item category is Z then i need to use a custom formula?
    Can this scenario be achieved using only one condition type with the appropriate formula or do i have to maintain separate condition types to achieve it?
    Thanks for your inputs.

    I believe it can be achieved with the single condition type. Since the routine assigned in the Requirement in pricing procedure controls the system's access to condition records...create a new VOFM routine which should check the item category and if satisfied, the condition records will be accessed.
    If the requirement fails and a value is not determined, the routine in the alternate calculation type should handle the calculation (based on PR00 value etc.,) and determining the value for this condition type. If not possible this way, should be able to handle this requirement through a userexit.
    Your condition type should be configured allowing both automatic and manual entries.
    This is just a wild guess.

  • Modify MVGR4 in formula for condition value

    Hello everyone,
    I want to modify komp-mvgr4 in a formula for condition value. Changes in komp structure are not saved, any idea which field I have to modify?
    Many thanks!
    Andreas

    Sure. I have a new formula for a condition value which checks a lot of things to calculate the condition value. The result can also be zero. In all other cases than zero, I want to set an additional flag on the position to show that the condition is used. For this I choosed the material group 4. Now I have to modify the materialgroup 4 MVGR4 in the formula, if I change komp-mvgr4 is does not save the changes...
    Andreas

  • Parsing Boolean Formula

    Hey guys, i'm having some trouble with a program i've been working on. Im a bit of a newbie so do forgive me if I seem as though i'm being a bit thick. I'm trying to split a boolean formula into it's sub formulas and parse the results into an array. For example, with the formula a&(a&b) i would have 'a' and 'a&b' store in the array and with the formula a&(a&b)&(b&c) I would have 'a', 'a&b' and 'b&c' I've been trying at it for a while now but don't seem to be getting anywhere. Code I have so far is:
    import java.io.*;
    public class ReadString
         public static void main (String[] args)
              String[][] myArray = new String[40][4];
              System.out.print("Please enter a formula: ");
              BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
              String inputtedFormula = null;
              try
                   inputtedFormula = br.readLine();
              catch (IOException ioe)
                   System.out.println("IO error trying to read your formula!");
                   System.exit(1);
              myArray[0][0] = inputtedFormula;
              Loopy(myArray);
         public static void Loopy (String myArray[][])
              int countStart = 0;
              int countEnd = 0;
              String formula = myArray[0][0];
              int stringLength = formula.length();
              int stringPosition = stringLength;
              for(;stringPosition>=0;stringPosition--)
    I know I need to run through the formula and keep track of open and closed brackets and also keep track of start and end positions of these brackets so the code knows which sections to parse separately but I just can't figure it out and pretty much feel like i've hit a brick wall. Any help will be much appreciated.

    How very helpful, thanks for that. I have been researching but so far everything i've found is either too rigid or not complex enough. I've tried using stringTokenizer and streamTokenizer but couldn't get the results i needed. All i could do was remove the brackets and take what's between but i need the program to recognise the operators and i don't really know how to do this

  • Is it possible to use a DateDiff formula within a single field?

    Post Author: EarthMover
    CA Forum: Formula
    I have a field that lists transaction times for the signing on and off of maintenance tickets.
    My problem is that since both the sign-on and the sign-off are in the same field, I don't have the
    option of using the DateDiff formula like I normally would ex: DateDiff ("Interval",startDatetime, endDateTime).
    Because the start-date and end-date are in the same field, the formula returns no value.  To combat this
    I believe that an IF/THEN/ELSE statement would work, if I made one for the start-date and one for the end-date.
    My transaction field is using a DateTime format ex: 10/28/2007  11:58:07.  I tried making the IF portion of the statement
    dependant on another field that tells me if they've signed off or on ex: ACDN or ACUP, both of these are examples of someone
    signing on to a ticket,  and signing off of a ticket results in: COMP.  Based on this information I believe it should be possible to create
    a conditional statement to return to the information I require. I've attached an example of what I see, at the bottom.
    I've only been using Crystal for a couple of weeks now, so I'm still learning, any help would be greatly appreciated.
    PROBLEM DESC TEXT    COND   TRANSACTION TIME
    NEED RAILING FIXED       ACUP    10/25/2007   12:43:16AM
    NEED RAILING FIXED       COMP   10/25/2007   2:35:22PM

    Post Author: yangster
    CA Forum: Formula
    well this is what i can think of off the top of my head to deal with your problemyou are going to need create a variable for both begin and end date and this will have to be evaluated at the group footer levelHere is the sample data i will be working withID     Condition  TimeABC  ACUP     10/25/2007ABC  COMP    10/26/2007DEF  ACUP      10/25/2007DEF  COMP     10/27/2007create a group on the unique id, this will seperate ABC from DEFnext create the formulas to strip out the begin and end dates@begin_date_init (place in group id header)whileprintingrecords;datetimevar begin_date := datetime(0000, 00, 00, 00, 00, 00)@begin_date_eval (place in detail section)whileprintingrecords;datetimevar begin_date;if left(condition, 2) = "AC" then begin_date := time@begin_date_display (place in group id footer)whileprintingrecords;datetimevar begin_date;begin_date;the end date is identical except the if statement will be if condition = COMP then end_date := timeafter you've dropped these formulas in their appropriate places in the reportsupress the detail and group header sectionsyou will see that you will see something along the lines ofABC  10/25/2007  10/26/2007DEF  10/25/2007   10/27/2007so its just a matter of creating a simple formula to calculate the diff between your 2 variables@date_diffdatediff("d", @begin_date_display, @end_date_display)this should do what you are trying to do, the layout may be different then you have pictured so you can play with it but its a starting pointswell i'm off to whistler for some R&R if this doesn't work i'm sure someone else here can try to help you figure out something that works

  • Formula node, condition

    I want to use conditional expressions such as
    if () then
    statement
    else
    end if
    in the formula node, but there were error messages "unassigned output".
    I followed Ankita's suggestion to use
    if (x<5)
    y=4;
    z=8;
    else
    y=8;
    z=4;
    but there were same error messages(I tried "end if;" also.).
    Thanks.

    Which version of LabVIEW are you using? Any chance it is earlier than 6.0?
    If so, then Ankita's suggestions probably won't work, because there were major changes in Formula Node behavior. I recall that every variable introduced in pre-6.0 formula nodes had to be explicitly added as either an input terminal or an output terminal on the formula node. Furthermore, those older formula nodes used a different style for conditional syntax. It's all documented in the manuals or help documentation that shipped with your LabVIEW version, whatever that may be.
    More to the point, I suggest that you abandon the formula node for simple conditionals like this and just use a case statement. You can wire your x variable into a less-than node, then wire the output of that into a case statement selector. You can very often avoid formula nodes by using case statements or even the "Select" node on the Comparison palette.
    My two cents,
    John

  • How I tie the formula with conditions type?

    Hi,
    Than create the formula with tcode O3I7:
    1) how I tie the formula with conditions type?
    2) how I tie the conditions type with the formula with Calculation Schema?
    help me, please.
    thanks
    Edited by: celeste ziantoni on Feb 5, 2008 6:45 PM

    Hello,
    Pricing formula is created using transaction VOFM. It is tied to the condition types in Pricing Procedure definition in Alternate Calculation Type column. For Pricing procedure, the menu path is SPRO->Materials Management->Purchasing->Conditions->Define Price Determination Process->Define Calculation Schema.
    Thanks,
    Venu

  • BEx Query Formula Descriptions -- Conditional Formula

    My question is in regards to the description that is returned from a formula within a structure.  The data I'm expecting is based on (for example) "fiscal year."  I have a text variable setup that returns the result of the "fiscal year" to be displayed as the column description.
    However if no data is returned for the current fiscal year, I then want to display the data for the previous fiscal year.
    I have a formula setup that uses a conditional statement.  It is setup as described below:
    <b>Formula Description</b>
    --  If data is returned based on fiscal year "2008" then use that data.
    --  Else use the data based on fiscal year "2007"
    <b>Issue</b>
    -- I use a text variable that is based on 0FISCYEAR called <b>0T_FYEAR</b>
    -- When the query is run, the data returned is correct --> (2007 data if there is no 2008 data)
    -- The text variable is also used as the formula "description" which is set to "0T_FYEAR" so if there was 2008 data, the text variable would say "2008" and if not it would say "2007."
    The problem resides in the text variable which is used as the formula description.  It is displaying the technical name of the text variable (&0T_FYEAR&) instead of "2008" or "2007."
    Has anyone else had this occur?  I would expect that if the data coming back is correctly based on 2008 or 2007, then the text variable used for the formula description would also be set to "2007" or "2008" based on my formula condition.
    Any help would be greatly appreciated and of course points will be awarded!
    Kevin

    Thanks for the quick response Pallavi...
    That logic seems completely backwards to me...is there a reason BEx is trying to populate the text variable values BEFORE knowing what data is actually being returned? 
    Also, my next obvious question:  Is there a way to get these variables populated with the correct value?  Can I force it to populate AFTER the formula has been executed so BEx knows which value to assign?
    What i'm trying to do is have a Year-Over-Year (last 3 years) comparison for the past 3 fiscal quarters.  So I would compare the current quarter numbers (Qtr 1) YoY Q1/2008, Q1/2007, Q1/2006 with the previous quarter...but the previous quarter is Q4 of 2007 (not 2008).  So I cant do the same 2008, 2007, 2006 comparison.  I was hoping to move the years back one for a 2007, 2006, 2005 comparison --> Thus the need for the conditional statement. 
    I hope that helps explain.  Any insight at all would be greatly appreciated.
    Kevin
    Message was edited by:
            Kevin Susko

  • Errors trying to apply a Boolean expression for conditional text

    I have been trying to create some Boolean expressions to filter conditional text, with mixed results. The Boolean expression is three conditions separated by ORs followed by four conditions preceded by AND NOTs. When I apply the expression, FrameMaker exhibits and error and has to quit. The numbers in the error message are:
    9004, 4908044, 6134440, 5459515
    The hidden log file appears to be nothing more than a stack dump.
    Do the numbers listed above indicate anything?
    Are there any known limitations on how long a Boolean expression can or should be? One expression with one fewer OR worked.
    Does there need to be a space between an AND and a NOT? The builder does add one, so I assume it is not necessary.
    Does anyone have some general rules of thumb when working with Boolean expressions for conditional text?
    Thanks,
    Van

    Van,
    The error values are meaningless to users. However, please do send the logfiles to the [email protected] address.
    As far as conditionals go, the general rules are that conditon names must be quoted and that if your ar using the NOT, it must run together with the AND or OR, e.g. ANDNOT ORNOT.
    There's an articel in the Developer Connection on using the boolean operators at http://www.adobe.com/devnet/framemaker/articles/fm8_single_sourcing.html
    Perhaps if you posted the condition that caused the crash, someone might be able to spot an error.

Maybe you are looking for