Query Based on two Characteristics

Hi,
I want to build a query on a multiprovider that has two characteristics :
ZCYFLAG (posted values 'Y' or 'N')
ZPYFLAG (posted values 'Y' or 'N')
The query must must be restricted for ZCYFLAG = 'Y'  or ZPYFLAG = 'Y'.
(If I drag drop these characteristics in global restricstons and specify ZCYFLAG = 'Y'  , ZPYFLAG = 'Y'  , the query takes only AND values ).
Is there a possible work around?
Pointers will be of immense help.
Thanks & Regards,
Rahul R Nair

Hi,
If you put in Global it applicable to entire Query.
So You have to create 4 Selections with the restriction of the following condition in each selection.
1. ZCYFLAG Restrict with 'Y' ZPYFLAG restrict with 'Y'.
2. ZCYFLAG Restrict with 'Y' ZPYFLAG restrict with 'N'.
3. ZCYFLAG Restrict with 'N' ZPYFLAG restrict with 'Y'.
4. ZCYFLAG Restrict with 'N' ZPYFLAG restrict with 'N'.
After this create one formula for these restrictions and use condition OR in between these Restriction variables at any time only one restriction condition will be satisyfyed.
Regards,
Shiva.
Edited by: Shivu  Kumar on Sep 15, 2009 3:38 PM

Similar Messages

  • Query based on two views

    Hello ppl, I need your help.
    I got this query which is based on two views.
    View_1: x1, x2, x3, x4, day, xy
    View_2: y1, y2, y3, y4, day, xy
    By running a SELECT query on each view takes approx 2 minutes, yes there are lots of records.
    When I combine the query most of the time it times out. I think there is something wrong with my query.
    View_1 = View_2 on col xy and day, however I have to get the records from View_2 for the following day, i.e if day = 3 from View_1 and the record from View_2 should be coming from view_2
    at present my query is like this
    SELECT a.x1, a.x2, a.x3, a.x4, a.day, a.xy, b.y1, b.y2
    FROM view_1 a, view_2 b
    WHERE b.y2= 100
    AND a.xy = b.xy
    AND b.y1 = ( SELECT b.y1
    FROM view_1 a, view_2 b
    WHERE b.day = a.day + 1)
    ORDER BY a.x1
    This query gets called in a coldfusion page.
    P.S I can also ask the DBA to make me a new view based on the same columns as the query. Would that help with speed?

    I don't see any reason why my query shouldn't give
    you what you desire.
    View_1
    x1     x2     x3     x4     Day     XY
    2      3      23      32      3      2132
    3      3      2      3      4      2132
    4      3      43      32      5      2132
    View_2
    y1     y2     y3     y4     Day     XY
    4      100      13      32      3      2132
    5      100      4      3      4      2132
    7      100      43      32      5      2132
    5      100      23      12      6      2132
    Is it a coincidence that XY has the same value in your sample? Could it be different
    and at the same time participate in the desired result?
    SELECT     a.x1, a.x2, a.x3, a.x4, a.day, a.xy, b.y1, b.y2
    FROM     view_1 a
    ,     view_2 b
    WHERE     b.y2 = 100
    AND     a.xy = b.xy
    AND     b.day = a.day + 1
    ORDER BY a.x1
    >
    X1     X2     X3     X4     Day     XY     y1     y2
    2      3      23     32      3      2132      5      100
    3      3      2      3      4      2132      7      100
    4      3      43     32      5      2132      5      100
    According to the reply to my question above, it can be ok or not.
    That is why I proposd this (in case the reply were yes):
    SELECT a.x1, a.x2, a.x3, a.x4, a.day, a.xy, b.y1, b.y2
    FROM view_1 a, view_2 b, vew_1 c
    WHERE b.y2= 100
    AND a.xy = b.xy
    AND b.day = c.day + 1
    ORDER BY a.x1

  • L00 and L01 in BW Query based Universe for Characteristics

    Hi All,
    While creating a universe based upon an SAP BW query, the BW characteristics seem to be doubled as dimensions, with one group markeded L00 and the other as L01.
    Why are they doubled?
    Is one "better" than the other?
    For what purpose?
    They key value in L00 returns "all" and L01 returms the key, but all attributes seem to be the same.
    Thanks for your help,
    John Hawk

    Hi,
    From an OLAP point of view a characteristic is like a dimension, that means that it contains all the members (level L01) and the All member that aggregates the characteristic members (level L00);
    These metadata are provied by SAP BW when using OLAP drivers.
    For a characteristic, the level L00 is not necessary unless you want to use the All member.
    On the other hand, the level L00 is significant for hierarchies, hierarchy varaibles and structures because it contains members.
    We provide an option for the universe generation and the universe update that allows to generate or not the level L00.
    This option is available since BOE XI3.1 SP2.
    In SP3, we improved the L00 generataion to only impacts the characteristics and not hierarchies and structures.
    So the recommendation for characteristics is to not use L00.
    Regards,
    Didier

  • Exception aggregation based on two characteristic

    Hi Guys
    i have enhanced the datasource  i.e 2lis_12_vcitm for sales order qty
    now i have to get the unique qty based on order no and item no to devide it to get a ratio
    how can i do the exception aggregation to take one value based on two characteristics that is order no and item no
    Regards
    Amiya

    hi 
    Exception aggregation based on 1 characteristics i know very well but my requirement is different i have to get unique data based on two characteristics i.e
    order    item   qty
    100      10      5
    100      20      3
    100      10      5
    100      10      5
    100      20      3
    200     10       15
    200     10       15
    now i want to get 5 for order 100 and item 10
    and 3 fro 100 and 20
    i think by exception aggregation its not possible is there another way?

  • Compare two characteristics in Query

    Hi Experts,
    I have to compare two characteristics in Query fields like (A)Approved Level of Job(contain values like 01,02,03,04) and (B)Required Level of Job(contain values like 01,02,03,04).
    Now I have to do these calculations
    If A>B =1
    If A<B =0
    And also in other case
    If A=b  then value 1
    Of A =/= B then value 0
    Please let me know how I can achieve this.
    These values could be in A,B,C,D instead of 01,02,03,04 then in that case how I will calculate these comparison.
    Thanks
    Take care
    Vishal sharma

    Hi,
    i need the solution in this format on the comparison two characteristics in Query:
    0=false
    1=true
    Approved Level of Job(A)     Required Level of Job(B)      A=B         A not equal  B     A>B               A<B
         1                                                         3                                       0                         1                      0                 1
         4                                                         2                                       0                         1                      1                 0
         3                                                         3                                        1                         0                      1                 1
         5                                                         4                                       0                         1                      1                 0
         1                                                         2                                       1                         1                      0                 1
    count(A):5                        Count(B)5                                 sum 2                 sum 4           sum 3         sum 3
    so my CKF will be
    A>B/5 means 3/5=60%
    I also need to know how i am going to count A and B too.
    thanks
    take care
    vishal sharma

  • Dynamic filter on time characteristics on OLAP SAP BEX query based universe

    Dear all,
    I'm currently working on the integration between SAP NetWeaver BI 7.0 and SAP BusinessObjects XI 3.1 FP 1.5 via integration kit.
    I've built an OLAP universe on the top of a BW query based on a multiprovider that contains 10 infocubes.
    Everything works fine but I need to create a filter in the OLAP universe that allows to restrict data by current date (e.g. using TIME characteristic of Infocube such as 0CALDAY or 0CALMONTH). From that filter we could start creating other conditions to compare data to different time periods.
    I've already tried to use a SAP exit variable in  a BW query but this kind of object would restrict query data only by current date and for example it would be impossible to browse data by previous years (to bypass this problem we could use restricted key figures with different offsets but we have too many key figures in the query and the number of restrictions
    would rise exponentially). 
    In a relational DataBase we can do that using a "where condition" based on 'CURRENTDATE' (SQL DB2 syntax).
    Now, we need to apply the same logic but translated in MDX syntax. 
    Is it possible to enter a dynamic filter in the OLAP universe or just fixed or promt values ?
    Any advise?
    Thanks in advance.
    Best Regards.
    M.

    Hi Ingo,
    1) My question is: "How can I have to manage variable in BEX queries and in the UNIVERSE in order to obtain the maximum flexibility to create reports with measures on actual day (for example) without asking the user to promt a value ?"
    I want to use an unique BEX query to define an unique UNIVERSE. On this UNIVERSE I want to create many reports (actual day, previous day, and so on).
    If I restrict 0CALDAY with an EXIT variable then shall I be able to create a different restrictions on the same Universe based on 0CALDAY ?
    2) Another question is:
    Is it possible to insert an XML / MDX filter on the OLAP Universe with dynamic derivation of the system date ?
    For example:
    Instead of this:
    <FILTER KEY="[0FISCYEAR].[LEVEL01].[NAME]">
        <CONDITION OPERATORCONDITION="Equal">
            <CONSTANT CAPTION="Z12008"></CONSTANT>
        </CONDITION>
    </FILTER>
    Is it possible to insert a tag with a dynamic function to derive the system date ?
    Thanks in advance.
    Best Regards.

  • Combining two Characteristics in one column for a Bex query

    Hi experts,
    I'm reproducing a Bex query ver. 3.x, with a new query version 7.0.
    Within 3.x query there are two char as rows, where the first has a hierarchy.
    The char are Product(Books) and Volume(book's series), where Volume rapresents a detail of Product.
    When I execute this query, both char are combined and are showed in a single column, not in two distinct columns.
    *NODE 1*
    *--NODE PRODUCT 1A*
       *--NODE PRODUCT 1AA*
          *-- VOLUME 1AA*
          *-- VOLUME 1BB*
          *-- VOLUME 1CC*................
    Instead my new query 7.0 shows me the two char into two distinct columns, not in one like example above.
    Besides, both two version of the master data are exacly alike.
    I'd like to reproduce the first query scenario.
    How can I do?
    Thanks in advance.
    Claudia

    Hi Simon,
    yes, the original 3.5 query have the hierarchy switched on.
    Have you any idea?
    Thanks.

  • Filter a Query Based on the Output of Another Query

    Is it possible to run a query based on the put put of another query? I have two queries. One query is based on GL Line items and shows the account assignemnt of postings where a customer has had a debt raised and it been credited to an account assignment e.g. Order, Cost Centre or Profit Centre. The other query is on an AR cube and that shows payment made. I want to bring these together to show the owners of the various account assignments to what extent customers have actually paid the debts that have been raised and credited to them. This I do as the source document of the CO doscument matches the allocation of the ar document. So I have a query that shows the CO journal and another query that shows payments. But I only want to show the payments in the second query for documents displayed in the first query (which can be restricted by period and fiscal year and the particular account assignment).

    Hi,
    This can be acheived by usign a replacement path variable.
    Create replacement pathe variables for those the filter values in the second report nneds tobe restricted from the first.
    Then in the properties of the varioable say replce by query result and input the first query name in it.
    Use these variables in teh filter section of the second report.
    Make sure the characteristics for which you created the replacement path variables are in teh row section of the first Query.
    Now on executing the second query you will have it filtered based on teh values of the first Query.
    Hope this helps.
    Regards.
    Shafi.

  • Create hierarchy based on multiple characteristics

    Hello,
    I am working on a very non-standard income statement report in BI and am trying to come up with a good way to maintain it.  Each line item in the income statement is based on different characteristics.  For instance, the first line item might be a range of account numbers using 0GL_ACCOUNT and a single order using 0COORDER.  The second line item may be a particular Cost Center using 0COSTCENTER and a particular GL Account.  Right now, I am using a structure within the BEx query that defines each of the 1000+ lines.  The big problem is that this structure is used in multiple reports with slight variations.  Any time there is a change to the structure, I have to go to 8 different places to change it because the same structure is on multiple info providers.
    For other reports, we have set up hierarchies on certain characteristics (0GL_ACCOUNT, 0COSTCENTER, 0COORDER).  Would it be somehow possible to create an entirely custom hierarchy that would use mixed characteristics to come up with each value?  If this is not possible, can someone think of a way to have only one structure/hierarchy instead of 8?
    Thanks.
    Derrick

    Hi Samunder,
           There is a concept called Linking of universes which allow you to link two universes and the final universe acts as if it was a single universe.
           You can get more details on linking universes in the Designer guide. But, this method is not suggested as there are many limitations and performance issues.
           But if the user wants a single universe rather than two universes you can go for this.
    Regards,
    Sanjay

  • Exception aggregation with two characteristics

    hi:
    I need get the average value of a KF, based on the unique combinations of two characteristics.
    material and color are two characteristics.
    The base data is
    m1 c1 $
    m1 c2 $
    m1 c3 $
    m2 c4 $
    m2 c1 $
    Now there is 5 unique combination of mtl and color. but when I average the $ it is averaging it with dividing the $ sum by 4 as there is only 4 unique colors (with except.aggr. for color char). How can I make it to consider all the unique combinations of mtl and color and get the average even with duplicate colors?
    thanks.

    What is going to be record count for unique combination?
    If its going to be 1 then you can create a pre query which will give only unique combination (record count =1 using condition), further sum of those record counts will give you the total unique combinations.
    Further it can be used for averaging purpose w/o using exception aggregation.
    Hope it helps.
    Abhijeet

  • Include Button that executes PL/SQL procedure to SQL query based region

    I would like to add two columns to a SQL query region.
    These columns would not be sourced from the query, but rather would be used to execute a PL/SQL procedure.
    For example, I would like to have a manager approve or deny adding an additional employee to the department.
    There would be one button for APPROVE. And, one button for DENY.
    The PL/SQL procedure would execute to perform the required DML based upon the selected action (either APPROVE or DENY).
    A sample output would look like this:
    <APPROVE>, <DENY>, John Doe, Accountant
    <APPROVE>, <DENY>, Jane Doe, Accountant
    Is there any way to add a button to a SQL Query based report region where that button executes a stored proc? If so, what is the basic process for doing this?
    Thanks!
    -Reid

    Is there any way to add a button to a SQL Query based report region where that button executes a stored proc? If so, what is the basic process for doing this?Conditional page item? You can associate processes with buttons on a page

  • Additional i/o fields to infoset query based on PNPCE logical database

    Hi All,
    I have a requirement to add two additional input and output fields "job function" and "job family" to a infoset query based on logical database PNPCE. I am new to writing code in infset query and there are so many code areas in infoset query. I am confused where to write code and how to limit the output list based on the user selection to the additional fields "Job function" and "job family". have any one done this in the past?. is there sample code somewhere to do something similar to this?
    Your help will be much appreciated with points! (as per our community guidelines)
    Regards,
    Arul

    Hello Arul,
    Your question would be better answered if you post it in on of the Business Intelligence Forums. Please close this thread and goto:
    Expert Forums » Business Intelligence
    or
    /community
    Regards,
    Manny

  • Report Painter - Display two characteristics on one line in lead column

    I have a requirement to produce a Report Painter report to display values by Cost Centre and Cost Element.
    The requesting user wants to see the Cost Centre AND Cost Element keys displayed on each row of the report, to allow for manipulation in Excel.
    I have no problem grouping Cost Element within Cost Centre or vice-versa, but am not aware of any way of displaying both key values on each row in the lead column (or anywhere else).
    Has anybody done this?

    Hi Robin,
    the request is not unusual. However, report painter does not allow for two key columns or a key column combining two characteristics. You might consider using SAP Query (with table COEP or COSS/COSP for aggregates) if you do not want to resort to developing the report in ABAP.
    Regards
    Nikolas

  • Select One Choice attribute' LoV based on two bind variables, best practice

    Hello there,
    I am in the process of learning the ADF 11g, I have following requirement,
    A page must contain a list of school names which is needed to be fetched based on two parameters, the parameters are student information been inserted in the previous page.
    I have defined a read only view "SchoolNamesViewRO", it's query depends on two bind variables :stdDegree and stdCateg.
    added that RO View as a view accessor to the entity to which the name attribute belongs, and then add LoV for the name attribute using the ReadOnly view,
    added the name attribute as Select One Choice to page2,
    and now I need to pass the values of the bind variables of the ReadOnly view,
    the information needed to be passed as the bind variables is inserted in the previous page, I could have the data as bindings attribute values in the page2 definition
    I have implemented the next two appraoches but both resulted in an empty list :
    * added ExecuteWithParams Action to the bindings of the page and then defined an Invoke Action (set refresh condition) in the executable s, set the default values of the parameters to be the attributes values' input value,
    in the trace I code see that the binding fetches correct values as supposed , but the select list appears empty, does the this execution for the query considered to be connected to the list ?
    * added a method to the ReadOnly view Imp java class to set the bind variables, then I define it as a MethodAction in the bindings , and then create an Invoke action for it , also the select is empty,
    if the query been executed with the passed variables, then why the list is empty? is it reading data from another place than the page!
    and what is the best practice to implement that requirement?
    would the solution be : by setting the default value of the bind variables to be some kind of Expression!
    please notice that query execution had the bound variables ( I see in the trace) are set to the correct values.
    would you give some hints or redirect me to a useful link,
    Thanks in advance
    Regards,

    please give me any example using backing bean .for example
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1">
    <af:form id="f1">
    <af:selectOneChoice label="Label 1" id="soc1" binding="#{Af.l1}"
    autoSubmit="true">
    <af:selectItem label="A" value="1" id="si1"/>
    <af:selectItem label="B" value="2" id="si2"/>
    </af:selectOneChoice>
    <af:selectOneChoice label="Label 2" id="soc2" disabled="#{Af.l1=='2'}"
    partialTriggers="soc1">
    <af:selectItem label="C" value="3" id="si3"/>
    <af:selectItem label="D" value="4" id="si4"/>
    </af:selectOneChoice>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    package a;
    import oracle.adf.view.rich.component.rich.input.RichSelectOneChoice;
    public class A {
    private RichSelectOneChoice l1;
    public A() {
    public void setL1(RichSelectOneChoice l1) {
    this.l1 = l1;
    public RichSelectOneChoice getL1() {
    return l1;
    is there any mistake

  • How to increase performanceof query based on Infoset?

    How to increase the performance of a query based on a Infoset?
    As per designing of query, all the necessary fields are placed where they are required.

    Hi  Akshara ,
    To improve performanceof query try to remove unnecessary characteristics, attributes, or key figures ,Superfluous conditions or variables .Large InfoCubes and Complex hierarchies .Variables populated by user exits
    For characteristics specify either variables or restrictions .
    You can create indexes on DSO and Aggregates on cubes (if any).
    Please go through the links :
    http://help.sap.com/saphelp_crm40/helpdata/en/77/4a213cc534f20ae10000000a11402f/content.htm
    Re: Performance of query built on infoset
    Query performance issue - Infoset query
    Hope you will find this helpful.
    Regards,
    Jaya

Maybe you are looking for

  • 2 pricing procedures for the same sales area

    Hi Gurus.,               My client requirement is the client requires 2 pricing procedures for the combination of Same sales areaDEocument Pricing procedurecustomer pricing procedure in OVKK He doesnt want to use new sales area or new document pricin

  • IOS iWork how to change legend labels

    Hi. Having trouble with Numbers for iOS. I made a spreadsheet and placed a chart and connected the columns to display the information in the chart. I'd like to add a legend, but when I do, I get "untitled" for each color (or column) in the chart. I'v

  • Newest Flash Player

    Well you see i downloaded this new version and i dont use flash to put stuff on the internet i use it to veiw the internet i saw some topics over this already and that it is somthing with the internet explorer window. Can someone tell me what i have

  • Need query to find rows

    hi i need query to find out for one perticular row from parent table ,,which references how many rows in how many child tables , and child to child tables. in herirachy fashion. if anybody know please help me

  • Difference between class report and interactive report

    please give me the differences between  classical report and interactive report