Creating a condition in a query

Hello
Is it possible to create a condition on the results rather then the single value?  
Example:
Customer  Material  Qty
   10001      AAA       1
   10001      BBB       1
   10001      CCC       1 
   results                   3
   10002      AAA       1
   10002      BBB       1 
   results                   2
   10003      AAA       1
   results                   1
overall results           6
I want to display only the customers that have a total qty higher then 1?  But if i write the condition and say greater then 1, the report comes up blank because it looks at each row individually.  I tried playing around with the different options on the conditions but none of them seem to get what i'm trying to do.  After the condition is written, i would like the query to look like this.
Customer  Material  Qty
   10001      AAA       1
   10001      BBB       1
   10001      CCC       1 
   results                   3
   10002      AAA       1
   10002      BBB       1 
   results                   2
overall results           5
And dismiss customer 1003, since the total is only 1. 
Any help would be greatly appreciated
Thanks
Steve

Hi,
U can create a condition ona the results also..
U have an option
showing that one should change the "calculate results as.." to summation.
Hope this helps u..
Best Regards,
VVenkat...

Similar Messages

  • How to insert 2 conditions in a Query

    Hi ,
    How can i apply 2 conditions to a query
    First i need to apply a condition X to query and then i need to apply condition Y to the  results which are based on condition X
    How can i acheve this

    Hi
    We can create multiple condition in one query
    When ever u select condition on tab it shows two options Chenge condition and new condition
    If we have 2 comndition in one query it works with AND function .
    If we have all applicable condition in one condition then it works with OR functionality.
    Assign points

  • Trying to create a condition on a BW Universe

    Hi experts,
    I'm trying to create a condition on a BW-Query Universe just like below:
    <EXPRESSION>  IIF([0HALFYEAR1].[LEVEL01].[[20HALFYEAR1]].[Value] = 1 , [Measures].[DAAP8LRPLLYPPU417LVN5XS2Z]-[Measures].[DAAP8LRPLLXY17S9W2G13IDT7] , [Measures].[DAAP8LRPLLYPPU417LVN5XS2Z]-[Measures].[DAAP8LRPLLXY17S9W2G13IDT7]) </EXPRESSION>
    i've searched a lot till get this code, but it still giving me an error when I try to execute.
    Does anyone can please help me?
    Thanks,
    Gui Boscolo from BRZ.

    Hi David,
    Thanks for your answer, I've made the ajustments you have mention, but I'm still getting erros when i'm running a report with an object that contain this 'code':
    <EXPRESSION>  IIF(@Select(SemestreL01 Semestre Chave) = "1" , @Select(Variáveis de CálculoMontante Projetado Sem1) - @Select(ÍndicesSaldo Aplicado) , @Select(Variáveis de CálculoMontante Projetado Sem2) - @Select(ÍndicesSaldo Aplicado)) </EXPRESSION>
    As you notice, now I'm using the @select function, the quotes are in the value of HALFYEAR01 ((@Select(SemestreL01 Semestre Chave) = "1") and removing the IFF function, the expression works.
    The problem, is We need to have this IFF function at BO, because we're trying to complement a expression on BW that cannot be changed!! That's my problem at all!
    Thanks again!

  • 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.

  • How to create a condition based on a select that retrieve dynamically a LOV

    Hi all, I need to create a condition based on a select that retrieve dynamically a LOV.
    So, the condition have to be:
    inventory_item_id NOT IN (SELECT inventory_item_id FROM apps.mtl_system_items_kfv WHERE concatenated_segments = 'GENERAL_FAULTS_IPTV')
    I need to create a LOV based on this select without making any join with the folder which contains the field inventory_item_id, because otherwise I have the contradiction:
    and o124757.INVENTORY_ITEM_ID = o118741.INVENTORY_ITEM_ID -- join between the main custom folder (o118741) and the LOV custom folder (o124757)
    and o118741.INVENTORY_ITEM_ID NOT IN (o124757.INVENTORY_ITEM_ID) -- condition
    These two condition together don't show any data, obviously....This means also, that I can't use a calculated field, because if I want to see this field, I have to create a join, another time, with the main custom folder.
    I tried to create a LOV on the Administrator, but when I create the condition I have to check manually the values....and if in the future this LOV will increase I need every time to re-check all the values.....instead I need that the inventory_item_id have to be NOT IN dinamically in the list of values retrieved by the select.
    Anybody has inplemented something similar ??
    Thanks in advance
    Alex

    Hi alex,
    SELECT incidents.INVENTORY_ITEM_ID,
    pcodes.PROBLEM_NAME
    FROM apps.cs_incidents_all_b incidents,apps.jtf_rs_problem_codes_v pcodes
    WHERE incidents.category_id IN (SELECT category_id
    FROM mtl_categories_kfv
    WHERE concatenated_segments = 'IPTV')
    AND incidents.PROBLEM_CODE = pcodes.PROBLEM_CODE
    where incidents.INVENTORY_ITEM_ID NOT IN SELECT inventory_item_id
    FROM apps.mtl_system_items_kfv
    WHERE concatenated_segments = 'GENERAL_FAULTS_IPTV'
    You want to add this condition to the first query it holds good for this scenerio.All the items which are NOT IN will be retrieved.Here you are selecting other than "General_faults_iptv"
    But again your trying to select in the second query where you want "General_faults_iptv"
    SELECT inventory_item_id
    FROM apps.mtl_system_items_kfv
    WHERE concatenated_segments = 'GENERAL_FAULTS_IPTV'
    If you carefully go through what your doing,you will understand.In the above explantion ,there will be no records generated.First query your saying NOT IN and again your saying for the same IN,how will records retrieve its meaningless.
    I dont know what you want to get from second query.I would suggest you to do is dont use the second query and just use the first query and you will get.Here is the query and this will give you result.
    SELECT incidents.INVENTORY_ITEM_ID,
    pcodes.PROBLEM_NAME
    FROM apps.cs_incidents_all_b incidents,apps.jtf_rs_problem_codes_v pcodes
    WHERE incidents.category_id IN (SELECT category_id
    FROM mtl_categories_kfv
    WHERE concatenated_segments = 'IPTV')
    AND incidents.PROBLEM_CODE = pcodes.PROBLEM_CODE
    AND incidents.INVENTORY_ITEM_ID NOT IN SELECT inventory_item_id
    FROM apps.mtl_system_items_kfv
    WHERE concatenated_segments = 'GENERAL_FAULTS_IPTV'
    Regards,
    Kranthi.

  • Multiple Conditions in a Query

    Hi,
    I have one Characteristic and 3 KeyFigures (mentioned below in quotes) in a Query and I would like to have following Conditions built in the query:
    1. Top N Condition on "Net Sales"
    2. Only display "Costs" > 0
    3. Only display "Quantities" > 10
    For some reason, it is not working as desired whether I combine them in one Condition or create 3 different Conditions in the Query. Does anyone have any idea?
    Thanks
    Srini

    Hi Srini,
    What exactly is wrong?
    In case of three separate conditions try to activate the 1st one, then the 2nd one, and finally - the 3rd one.
    If on one of these steps you'll get a message about non applicability, then your conditions conflict with each other.
    See examples of using conditions here:
    http://help.sap.com/saphelp_nw04s/helpdata/en/0b/f584409db95537e10000000a1550b0/frameset.htm
    Best regards,
    Eugene

  • How to create greater_or_equal condition for file_io storage

    Dear experts,
    Please tell me the how to create greater_or_equal condition for query in file_io as RationalOperatorType.GREATER_OR_EQUAL is not supported for file_IO storage.
    thanks n regards,
    Kapoorchand.

    Hi,
    not sure if I got you correctly, but in
    com.sap.ip.me.api.persist.query.RelationalOperatorType
    There is no condition available that you are looking for. Why do you not work with
    public interface Condition
    Represents a condition for a query. This can either be a single condition, as FIELD = VALUE and / or a composite condition, as ( ( FIELD1 = VALUE1 OR FIELD2 = VALUE2 ) AND FIELDE 3 <> VALUE3 ).
    Hope this helps!
    Regards,
    Oliver

  • How to create a transport request with query and only with its structure.

    HI guru,
                how to create a transport request with query and only with its structure.transport request should not  include any other query items like ( variables, conditions...etc)
    thanks in advance.
    venkata

    Hi,
    Goto RSA1 and then Transport Connection -> In SAP Transports select Object Types-> Query Elements -> Then select Query->Give Technical name of the query and then select for transfer. In the right side you can choose the components which you wanted to transport.
    Regards,
    anil

  • Conditions on a Query using Nav. Attr. (quick reply is very appreciated).

    Hi experts,
    I have a problem here with a query using both conditions and navigation attributes.
    The problem is as follow:
    I created a query with ZPRDGRP (product group), ZPRDTYPE (product type), ZPRDVAR (product variant) and 0MATERIAL (material), 0EXTMATLGRP (external material group) on the row side.
    On the column side, I have several restricted Key Figures:
    PriceA, PriceB and Quantity.
    The 0EXTMATLGRP is a <u>navigation attribute</u> of the 0MATERIAL.
    I created a conditions whereby I only want to see the materials with PriceA=0.
    But everytime I tried to run the query on the web, I always get this error message:
    "Termination message sent
    ABEND RSBOLAP (000): Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION
      MSGV1: SAPMSSY1
      MSGV3: UNCAUGHT_EXCEPTION"
    The error message always occurs everytime I include the 0EXTMATGRP on my rows. If I remove this, then my query will work fine. But I need to include this 0EXTMATGRP on my query.
    Furthermore, this error message just occurs if I run the query on the web, but if I just run it on the analyzer, then it also just work totally fine.
    Has anyone encounter this problem before? Is this a bug? How to solve this problem?
    Thank you a lot in advance!
    Fen.

    Hi all, I have found a solution for this one.
    I think it should be a bug, since if I included the Product Size characteristics in it (even though I hide it), then the query will work fine.

  • Conditions on a query

    Hello,
    I am working on BW3.5.
    Problem: When I create conditions on a query.I am not able see the check boxes for selecting the characteristics.
    Regards,
    Siva

    Hi,
    It could be anything your GUI version (upgrade that) or authorizations. Try on some other machine or some other user id and you should be able to figure it out.
    Regards
    Vikash

  • Nested Conditions in a Query or Priority setting

    Hi all
    Would anyone know whether it would be possible to do nested conditions or set the priority of conditions in a query?
    My problem is that I have two conditions, A and B. Both are optional, however, if both are entered together I want condition A to take effect before condition B.
    Example:
    Condition A is amount received (range)
    Condition B is Top N customers
    When both are entered together, I want to see the top N customers within the specified amount range.
    Currently, both conditions are together, meaning that if my specified range does not encompass the top N customers, I do not get any data retrieved.
    Any help on this would be appreciated and points awarded.
    Thanks in advance
    Nicholas

    I have exact same question that Nicholas Chia asked last year. Does anybody have any suggestions to achieve this?
    Here is the example scenario:
    CHAR          KF
    ABC          10
    BCD          -5
    CDE          0
    DEF          4
    EFG          6
    FGH          2
    IJK          -8
    Condition 1: Top 5
    Condition 2: Key figure <> 0
    I expect to see the results like this:
    CHAR          KF
    ABC          10
    BCD          -5
    DEF          4
    EFG          6
    FGH          2
    But, BEx outputs like this:
    CHAR          KF
    ABC          10
    DEF          4
    EFG          6
    FGH          2
    I think BEx is first applying the Top N condition. Takes the resulting data and then applies KF <> 0 condition.
    Is there a way to achieve the results the way we like (first apply condition 2 and then the condition 1). Creating the conditions in different order have no effect.

  • Creating a condition on a SAP BW BEx structure

    Hi,
    I'm trying to create a condition / filter in a universe that is built over a SAP BW BEx query that is using a structure and I can't work out how to do this properly.
    I see in the XI 3.0 OLAP universe documentation a reference to structures as follows:
    "Stuctures defined in the BW Query that are based on characteristics are
    included in the universe as single-dimension objects with the elements of
    the structure as dimension members."
    A sample of my BEx structure which is named "P&L Lines" is as follows:
    Gross Sales Value
    Discounts
    Invoiced Sales
    Std Material Cost
    In the universe the Class is "P&L Lines" and there is an object also named "P&L Lines". The properites of this object in the "Select" area shows [D431JNHSA9FQ901I1YLHH9WBR]
    A simple example of what I have been testing is to include only "Gross Sales Value".
    In the universe I have set a condition as follows:
    <FILTER KEY
    "[D431JNHSA9FQ901I1YLHH9WBR]">
    <CONDITION
    OPERATORCONDITION="InList">
    <CONSTANT CAPTION="Gross Sales Value">
    </CONDITION>
    </FILTER>
    This parses ok but it has no affect when I run the webi report.
    Any help would be appreciated.
    Mark P

    Hi Prado,
    Please refer the link for detailed steps:
    http://scn.sap.com/docs/DOC-53352#__RefHeading__742_705700879
    Thanks Much,
    Abhishek

  • Creating a conditional index? How to suggest a new feature?

    How can I suggest a new feature in Oracle?
    Imagine a table of service requests to be processed, where a column named STATUS can be: 'N': New, 'C': Canceled or 'P': Processed. This will result in a biased distribution where 'P' will represent more than 99% of rows.
    I know that Oracle accept indexes created using functions and I can create an index on decode(STATUS,'P',null,STATUS) to make index small. But it will not help a query on STATUS = 'N' condition.
    I would like to create a conditional index like:
    create index idx01 on service_requests (status) where status <> 'P';
    In this example, only status 'N' and 'C' will be indexed resulting in a very small index that can resolve filters like STATUS = 'N'.
    Or this:
    create index idx01 on some_tables (column1 including null values); to resolve COLUMN1 is NULL
    Is there a way to suggest new features like this?

    How can I suggest a new feature in Oracle?
    Imagine a table of service requests to be processed, where a column named STATUS can be: 'N': New, 'C': Canceled or 'P': Processed. This will result in a biased distribution where 'P' will represent more than 99% of rows.
    I know that Oracle accept indexes created using functions and I can create an index on decode(STATUS,'P',null,STATUS) to make index small. But it will not help a query on STATUS = 'N' condition.
    I would like to create a conditional index like:
    create index idx01 on service_requests (status) where status <> 'P';
    In this example, only status 'N' and 'C' will be indexed resulting in a very small index that can resolve filters like STATUS = 'N'.
    Or this:
    create index idx01 on some_tables (column1 including null values); to resolve COLUMN1 is NULL
    Is there a way to suggest new features like this?
    A new feature isn't needed. Oracle provides the equivalent of that 'conditional index' by allowing you to create, and index, VIRTUAL columns.
    This code uses a VIRTUAL column and then creates an index on it.
    drop table test_status
    create table test_status (col1 number,
         status varchar2(1),
         special_status generated always as (decode(STATUS,'P',null,STATUS)
    create index idx01 on test_status (special_status)

  • Options in Assignment of Condition in BEX Query Designer

    Hi Experts,
      I am trying to define a condition in BEX Query Designer.
    I defined my condition and bit confused with Characterstic Assignment
    What Happens if is select 9What is the difference)
    1) All Characterstic in the Drilldown Independtly
    2)Most Detailed  Characterstic Along the Rows
    3)Most Detailed Characterstic Along Columns and
    4)Individual Chars and Chars.Combinations
    Thanks

    hi,
    chk the link
    Query creation
    http://help.sap.com/saphelp_nw70/helpdata/EN/f1/0a5625e09411d2acb90000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/EN/42/d21c1f46076bb2e10000000a1553f6/content.htm
    Ramesh

  • Problem with Conditions in a Query

    Hello All,
                 I have the following Condition in My Query.
    Applied Amount Equals to 0.   When I run the Query I receive a message 'No Records Exists with the given conditions'.   But when I remove the condition and place 'Applied Amount' in the Columns Section I see there are numerous records that Have 'Applied Amount' as 0.   What might be the problem?
    Thanks

    Hi,
    Check out the zero suppression in your BEx analyser and also make sure that when you have defined conditions then you have to select only Applied Amount Charecteristic rather than all the charecteristics.
    Hope tis helps...
    Assign points if it helps..
    Thanks,
    Gattu.

Maybe you are looking for