Need multiple variables to select data based on OR condition not AND condit

Hello All,
We have a requirement where we want the user to enter a variable 1X.  Then based on this entry select from the InfoCube to check multiple fields where this value could potentially be.  If we put variables on each characteristic in the query and let them input the same value for each, the system tries to find a record where all characteristics have this value.  Our situation is that we don't know if field1, field2, field3 will have this value.  So an OR condition, not an AND needs to be generated.
We are stuck.  Has anyone tried this before?
Thanks!

You can create 3 restricted Key Figures.
RKF1 : KF restricted by var1 on Char A
RKF2 : KF restricted by var2 on Char B
RKF3 : KF restricted by var3 on Char C
Make var1, var2 and var3 as ready for input. Don't use variables in Free Characteristic

Similar Messages

  • Select data based on status priority

    ID     PRO_ID     PRO_OBJ_ID     TASK_ID     DEVELOPER_ID     STATUS
    121243     4940     37506     5250     6532     REJECTED
    122063     4940     37506     5250     6532     CLOSE
    138306     4940     37506     5250     6532     ACCEPTED
    138307     4940     37506     5250     6532     WIP
    Hi,
    From the above table i need to select data based on status any status that is prior to CLOSE or ACCEPTED it must display all the status any status that is after CLOSE or ACCEPTED we must not consider.
    In the above scenioro it must display only the first three status. after ACCEPTED it must not display any thing
    Please suggest me a query how to write.
    Thanks
    Sudhir.

    Try:
    SQL> with t as (
      2  select 121243 id, 4940 pro_id, 37506 pro_obj_id, 5250 task_id, 6532 developer_id, 'REJECTED' status from dual union all
      3  select 122063, 4940, 37506, 5250, 6532, 'CLOSE' from dual union all
      4  select 138306, 4940, 37506, 5250, 6532, 'ACCEPTED' from dual union all
      5  select 138307, 4940, 37506, 5250, 6532, 'WIP' from dual union all
      6  select 138308, 4940, 37506, 5250, 6532, 'ACCEPTED' from dual union all
      7  select 138309, 4940, 37506, 5250, 6532, 'REJECTED' from dual union all
      8  select 121243, 4940, 37777, 5250, 6532, 'REJECTED' from dual union all
      9  select 122063, 4940, 37777, 5250, 6532, 'CLOSE' from dual union all
    10  select 138306, 4940, 37777, 5250, 6532, 'ACCEPTED' from dual union all
    11  select 138307, 4940, 37777, 5250, 6532, 'WIP' from dual union all
    12  select 138308, 4940, 37777, 5250, 6532, 'ACCEPTED' from dual union all
    13  select 138309, 4940, 37777, 5250, 6532, 'WIP' from dual
    14  ) -- actual query starts here:
    15  select t1.id
    16  ,      t1.pro_id
    17  ,      t1.pro_obj_id
    18  ,      t1.task_id
    19  ,      t1.developer_id
    20  ,      t1.status
    21  from   t t1
    22  where id <= (select max(id)
    23               from   t t2
    24               where  t2.status in ( 'ACCEPTED', 'CLOSED' )
    25               and    t1.pro_id = t2.pro_id
    26               and    t1.pro_obj_id = t2.pro_obj_id
    27               and    t1.task_id = t2.task_id
    28               and    t1.developer_id = developer_id
    29               );
            ID     PRO_ID PRO_OBJ_ID    TASK_ID DEVELOPER_ID STATUS
        121243       4940      37506       5250         6532 REJECTED
        122063       4940      37506       5250         6532 CLOSE
        138306       4940      37506       5250         6532 ACCEPTED
        138307       4940      37506       5250         6532 WIP
        138308       4940      37506       5250         6532 ACCEPTED
        121243       4940      37777       5250         6532 REJECTED
        122063       4940      37777       5250         6532 CLOSE
        138306       4940      37777       5250         6532 ACCEPTED
        138307       4940      37777       5250         6532 WIP
        138308       4940      37777       5250         6532 ACCEPTED
    10 rows selected.If that doesn't work then please provide us some representative sample data again.

  • Get the COI date based on I base number and component number

    Hi Experts,
    I have get the COI date based on the Ibase number and component.
    Please suggest me is there any FM available.
    Thnx,
    Sam.

    Hi Sam,
    You mean to say u want to get the associated person to that Partner.
    Which we define as Role type in CRM.
    Say a person ABC is having a team lead XYZ , then you can use the table BUT050 and give the relation ship type key value
    Partner ABC must be associated with Team Lead XYZ with some BP Role.
    Ask it from your fucntional and use a select query to get that Team Lead name.
    Hope this helps

  • Is it possible to import data based on filter condition?

    HI All,
    Is it posisble to import data based on fillter condition? Suppose I have following data
    Name,City
    A,HYD
    B,HYD
    C,MUM
    D,DEL,
    E,DEL
    F,HYD
    Now I want to import only records where city is HYD, is it possible through import manager?
    Thanks
    Rajeev

    Hi Rajeev,
    You can filter records during import if one of the Matching field is of type Lookup.
    In your case if you create City as flat lookup table in MDM & maintain lookup values in DM(Just as an example), then you can import only records where city is HYD.
    Map Name & City, Then in Match Records tab select both the fields (Combination)
    then right click on it & select Filter.. option.
    Now new pop up will open where you be able to see ur Lookup table values, from there select HYD and Add
    Now in default Import Action, set Create Action for None/None (All other will be skip)
    This way you will import only HYD records.
    But this is possible only on Lookup fields & not foe Text fields
    Hope this will help you
    Thanks & Regards,
    Mahi

  • I need to host a Shared PDF on SharePoint. If it is on SharePoint can only one person comment at a time? I know documents have to be checked out when using SharePoint. I need multiple users to be able to comment in real time and see comments in real time.

    I need to host a Shared PDF on SharePoint 2010. If it is on SharePoint can only one person comment at a time? I know documents have to be checked out when using SharePoint. I need multiple users to be able to comment in real time and see comments in real time. Is this possible?

    try here:
    http://www.bbb.org
    File a complaint with them. Verizon will call you to fix the blunder.
    But remember it is always up to the customer to insure what they are getting and what it costs. Don't trust the word of a sales person who makes their living on getting that sale. Lies, deceit or false promises will be and have been used by sales people for thousands of years.
    Good Luck

  • SELECT data based on partitions

    I know we have PARTITION clause in SELECT statement.
    My requirement is i need to select data from Last two partitions in which data is available.
    If we know the name of the 2 partitions then we can select and UNION ALL.
    But In my case, i dont know the partitition names too,
    I need to find out the names of the partitions using any subquery and i need to select from that.
    May i know how can i achieve this?
    Thanks

    Maybe you could adjust the below (NOT TESTED !) if the meaning of the recent 2 partitions is somehow connected with partition_position within [url http://download.oracle.com/docs/cd/E11882_01/server.112/e25513/statviews_2108.htm#REFRN20281]all_tab_partitions as I don't have a database at hand to find out how partitions are being numbered.
    declare
      the_sql   varchar2(32000) := q'{ your sql here }'; -- assumed having a where clause
      the_table varchar2(30)    := 'your_table_name';
    begin
      for i in (select partition_name
                  from all_tab_partitions
                 where table_name = the_table
                   and partition_position <= 2  -- assumed ascending order for partition numbering
      for i in (select partition_name
                  from (select partition_name,row_number() over (order by partition_position desc) rn
                          from all_tab_partitions
                         where table_name = the_table
                 where rn <= 2  -- assumed descending order for partition numbering
      loop
        substr(the_sql,1,instr(the_sql,'where')) || ' partition (' || i.partition_name || ') ' ||
        substr(the_sql,instr(the_sql,'where')) || ' union all ';
      end loop;
      the_sql := 'select * from (' || substr(the_sql,1,instr(the_sql,' union all ',-1,1)) || ')';
      dbms_output(the_sql);
    end;Regards
    Etbin

  • Facing problem in selecting data based on the join s tatement ppls suggest

    hi
    cosider a sceneio as below
    there  are six tables    table1
                                    table2 
                                    table3       table4 
                                                               table5 table6
    join conditons between tables
    table1-lclic (primary key) = table2-lclic
    table1-lgreg = table3-lgreg (PK for table 3)
    table2-pobj = table4-pobj
    i have used join statment to join table 1 table 2table3
    i want to select data from table5
    table5-ccngn and table6-text
    now condion for validation is that
    table5-field1 is selected if table4-ctsex = table3-ctsty and tehre is no link between table 5 and table 3 o nly link is through table 4
    table4-ctsnum=table5-ctsnum (primary keys)
    can anyone suggest how to format the select statement
    regards
    Arora

    Hi Nishant,
    Using Table Joins for multiple tables would severely hamper the performance of the SAP system.
    Instead use individual select statements for each database table, and later reconcile all the internal tables.
    <b>Reward points, if helpful.</b>
    Regards,
    Atin

  • Select data based insert

    Hi,
    Is there a way to select data to select data wht is been inserted in time. means there are so many insert process keep happing In my application i need to select which is happend very recently.
    How to select such data please suggest
    If table name is "Contribution" .
    Please suggest
    Thanks
    Sudhir

    Hi ,
    You can include a column as inserted_time and keep the data type as date and default value is sysdate, now every time a record is being inserted the inserted_time field will get populated with value sysdate,
    now to query the latest record you can use like below
    select <column-names> from <table-name>
    order by inserted_time descin this way you can view which all record are inserted recently. I hope it is clear :)
    If you have any doubt then tell.
    regards

  • Select Data based on User Permissions

    Post Author: nomore
    CA Forum: General
    I've got a Crystal Infoview server which is becoming quite cluttered with reports.In a lot of instances, I will have 4 or 5 copies of the same report which are tailored to specifc users. For example a sales report which will show data based on a specific customer. I could create on report with a parameter where the user could just select the customer - but i dont want some people to be able to see specific customers. So at present i have a seperate report for each customer - and then set the report permissions to only allow specific users to run it.I attended a course a while back where they showed us how, hiding particular fields/data to certain users if they should
    not be allowed to view it - but for the life in me i cannot remember at
    all how they did it.  Any tips greatly appreciated.

    Post Author: V361
    CA Forum: General
    In the special fields section is CurrentCEUserName, not sure if this would work for you, because I have CR XI
    You could surpress based on the id logged in, but that would be a lot of work, 
    Perhaps you could create a "permissions" list in excel or in the database if possible, with a list of the reports that each ID can run, then based on the id, you populate the list....
    CurrentCEUserName inserts (in a formula) the name that was used to log on to the current session when using the Log On to BusinessObjects Enterprise dialog box.

  • Purchase order Delivery date based on PO doc no and PO item no

    hi all
    we have a  requirement to bring Purchase order delivery date in to our report .
    it is in EKET Table - field EINDT.
    Is it possible to get this PO Delivery date in to our data source 2lis_02_itm which has PO Doc no(EBELN) and PO item.no (EBELP).
    In EKET Table the primary key is based on 3 fields. PO Doc no(EBELN), PO Itm.no(EBLEP) and delivery schedule line counter (ETENR).
    In EKET Table the data is like
    PO.NO/PO itm no/ schline counter/delivery date
    1000/10/1/1-1-2011
    1000/10/2/5-1-2011
    1000/20/1/2-2-2011
    1000/20/2/2-2-2011
    1000/20/3/5-2-2011
    so on...
    IF i enhance my datasource and populate the delivery date based on EBELN and EBELP we get only 1 delivery date for all the different schedule lines which is wrong.
    I know there is a separate datasource for schedule line data for purchasing BUT IS IT POSSIBLE TO GET the delivery date based on the different schedules by using some ABAP CODE, SINCE in our datasource 2lis_02_itm we dont have ETENR( SCHEDULE LINE COUNTER FIELD).
    if we use the standard data source  (2lis_02_SCL )it is not fair to pull all that data since we only need 1 field from it.
    Please suggest
    Thanks & Regards.
    Krishna

    Hi Krishna,
    Even though you plan to write some ABAP code or do any processing for a combination of PO document no. and Item no. you will always get multiple records with different schedule line items and it is really impossible to take the delivery date without knowing schedule line item no.
    And even when you said PO delivery date, it is actually means delivery date of any of the schedule line only. If you want to write some ABAP logic then you will have to decide like whether you want to display the First line item date or the last line item date etc. But which is again not a good idea.
    I think you can go for schedule line extractor.
    Regards,
    Durgesh.

  • Need help in SQL , Subtract column based on the condition in the Row

    Hi all ,
    I’m new to Sql Queries; I have a requirement which involves Sql query,
    Can anyone tell the How to proceed or provide me Sql
    Here goes the requirement
    Current Table
    ID |-|Month|-|Data
    1|-|Jan-10|-|10.00
    2|-|Feb-10|-|20.00
    3|-|Mar-10|-|30.00
    4|-|Apr-10|-|50.00
    5|-|May-10|-|60.00
    6|-|Jun-10|-|70.00
    7|-|Jul-10|-|100.00
    8|-|Aug-10|-|110.00
    9|-|Sep-10|-|120.00
    10|-|Oct-10|-|140.00
    11|-|Nov-10|-|150.00
    12|-|Dec-10|-|170.00
    13|-|Jan-09|-|180.67
    14|-|Feb-09|-|194.67
    15|-|Mar-09|-|208.67
    16|-|Apr-09|-|222.67
    Format needed
    ID |-|Month|-|Data|-|Base on this condition
    1|-|Jan-10|-|10.00|-|Jan 10
    2|-|Feb-10|-|10.00|-|Feb10-Jan10
    3|-|Mar-10|-|10.00|-|Mar10 - Feb10
    4|-|Apr-10|-|20.00|-|Apr10 - Mar10
    5|-|May-10|-|10.00|-|May10 - Apr10
    6|-|Jun-10|-|10.00|-|Jun10 - May10
    7|-|Jul-10|-|30.00|-|Jul10 - Aug10
    8|-|Aug-10|-|10.00|-|Aug10 - Jul10
    9|-|Sep-10|-|10.00|-|Sep10 -Aug10
    10|-|Oct-10|-|20.00|-|Oct10 -Sep10
    11|-|Nov-10|-|10.00|-|Nov10 - Oct10
    12|-|Dec-10|-|20.00|-|Dec10 - Nov10
    13|-|Jan-09|-|10.67|-|Jan 09
    14|-|Feb-09|-|14.00|-|Feb09-Jan09
    15|-|Mar-09|-|14.00|-|Mar09 - Feb09
    16|-|Apr-09|-|14.00|-|Apr09 - Mar09
    Thanks in advance
    Astle

    Welcome to the forum!
    this?
    select id
         , mon
         , data
         , data - lag (data, 1, 0) over (partition by trunc (mon, 'yyyy')
                   order by mon)
      from test
    order by idas in
    SQL> with test as
      2  (
      3  select 1 id ,to_date ('Jan-10', 'Mon-rr') mon,10.00 data from dual union all
      4  select 2,to_date ('Feb-10', 'Mon-rr'),20.00 data from dual union all
      5  select 3,to_date ('Mar-10', 'Mon-rr'),30.00 data from dual union all
      6  select 4,to_date ('Apr-10', 'Mon-rr'),50.00 data from dual union all
      7  select 5,to_date ('May-10', 'Mon-rr'),60.00 data from dual union all
      8  select 6,to_date ('Jun-10', 'Mon-rr'),70.00 data from dual union all
      9  select 7,to_date ('Jul-10', 'Mon-rr'),100.00 data from dual union all
    10  select 8,to_date ('Aug-10', 'Mon-rr'),110.00 data from dual union all
    11  select 9,to_date ('Sep-10', 'Mon-rr'),120.00 data from dual union all
    12  select 10,to_date ('Oct-10', 'Mon-rr'),140.00 data from dual union all
    13  select 11,to_date ('Nov-10', 'Mon-rr'),150.00 data from dual union all
    14  select 12,to_date ('Dec-10', 'Mon-rr'),170.00 data from dual union all
    15  select 13,to_date ('Jan-09', 'Mon-rr'),180.67 data from dual union all
    16  select 14,to_date ('Feb-09', 'Mon-rr'),194.67 data from dual union all
    17  select 15,to_date ('Mar-09', 'Mon-rr'),208.67 data from dual union all
    18  select 16,to_date ('Apr-09', 'Mon-rr'),222.67 data from dual
    19  )
    20  select id
    21       , mon
    22       , data
    23       , data - lag (data, 1, 0) over (partition by trunc (mon, 'yyyy')
    24                 order by mon)
    25    from test
    26   order by id
    27  ;
            ID MON               DATA DATA-LAG(DATA,1,0)OVER(PARTITI
             1 1-1-2010            10                             10
             2 1-2-2010            20                             10
             3 1-3-2010            30                             10
             4 1-4-2010            50                             20
             5 1-5-2010            60                             10
             6 1-6-2010            70                             10
             7 1-7-2010           100                             30
             8 1-8-2010           110                             10
             9 1-9-2010           120                             10
            10 1-10-2010          140                             20
            11 1-11-2010          150                             10
            12 1-12-2010          170                             20
            13 1-1-2009        180,67                         180,67
            14 1-2-2009        194,67                             14
            15 1-3-2009        208,67                             14
            16 1-4-2009        222,67                             14
    16 rows selected

  • Writing in to multiple sheets in Excel file based on input condition

    Hi All Experts,
    i need to write in to multiple sheets in one Excel file output.
    is it possible with UTL_FILE ? or Any options there in Oracle to do this ?
    Can anyone please suggest me on this.
    Thanks,
    Ravi

    I have seen all of them they are all just simple SQL pulls from database in to Excel file..No, definitely not
    My requirement is i need to write in to one single Excel file with MULTIPLE sheets based on input condition-> [xml_spreadsheet|http://matzberger.de/oracle/spreadsheet-en.html]
    so for each parameter need to write into separate sheet in one Excel File..-> [xml_spreadsheet|http://matzberger.de/oracle/spreadsheet-en.html]
    I hope you understand my problem atleast now...I think I understood your problem at first sight.
    If you simply want to throw 2 queries at the package and get back an Excel file with 2 worksheets you just have to look at the first page of the [tutorial |http://matzberger.de/oracle/spreadsheet-tut-en.html]. Half way down the page there's an example.
    If you want a special formatting then you can do this too, it's described step by step.
    Regards
    Marcus

  • HELP ME ! I need to change my credicard data, because my card was stolen and the company give me another. H

    Good Afternoon,
    I live in Brazil and I have an account in Creative Cloud.
    How can I change my credicard data? My card was stolen and I blocked it.
    I have an anual account and I don't know how can i proceed.
    I need help.

    The Email address here in Forum does not have any CC registered to it, please let us know the Adobe ID under which it has been purchased for further assistance.
    Regards
    Rajshree

  • How to select data, based on a specified or preset date/time range

    Hi,
    I am trying to construct a requirement like this in java/jsp.
    I have a table consisting of registered users info. Have a expiration date for every user, which was captured or set when they originally registered.
    I have to select all those users who are expiring two weeks from now.
    For example. if the current date is 14th, I should get a list of users who expire between the midnight of 24th sunday to 30th saturday. this covers the whole last 7days in that range. And so on.
    So based on the current date, the last midnight sunday to midnight saturday of that two week's range should be selected.
    The input fields for this range on the userend should default to this range.
    And also the user should be able to specify their own range and be able to pull data.
    the result should be populated as viewable as well as a downloadable tab de-limited file for mass mailing.
    (ex. the table might be queried for user info like id, email, expiration date, fullname, and shown accordingly in the jsp)
    I know this is a longshot.. but if somebody can guide me will be good as I am new to this forum and as well as java.

    Well, I can start you off with this:
    Calendar now = Calendar.getInstance();
    // shift 2 weeks and back to Sunday
    Calendar start = Calendar.getInstance();
    start.add(Calendar.DATE, 14);
    end.set(Calendar.HOUR, 0);
    end.set(Calendar.MINUTE, 0);
    end.set(Calendar.SECOND, 0);
    end.set(Calendar.MILLISECOND, 0);
    while(start.get(Calendar.DAY_OF_WEEK) != Calendar.SUNDAY) {
    start.add(Calendar.DATE, -1);
    // shift 2 weeks and up to Saturday (following Sundat midnight, actually)
    Calendar end = Calendar.getInstance();
    end.add(Calendar.DATE, 14);
    end.set(Calendar.HOUR, 0);
    end.set(Calendar.MINUTE, 0);
    end.set(Calendar.SECOND, 0);
    end.set(Calendar.MILLISECOND, 0);
    while(end.get(Calendar.DAY_OF_WEEK) != Calendar.SUNDAY) {
    end.add(Calendar.DATE, -1);
    At this point, start is the first Sunday before the day 2 weeks from today and end is the first Sunday after the day 2 weeks from today, both at midnight. You could make end stop at Saturday and make the time 23:59:59:999, of course.
    If you ran it today, it should be 11/9 and 11/16.

  • Need Multiple Instances Of A Data Structure

    Is it possible to create multiple instances of a Queue or Stack within a for loop? Or any way for that matter?
    For the life of me, I can't figure out how to do this.
    If I need to build 3 queues, I'd like them to be named q0, q1, & q2. Is there some way to convert or cast the value of "i" to part of the queue's name? I know I can't do it the way I posted it below but it kind of shows what I'm trying to accomplish.
    int elements=Integer.parseInt(in.readLine());
    for(int i=0;i<elements;i++){
         Queue q+"i" = new Queue();
    }

    I tried an array of queues but I can't handle it
    correctly. I tried:
    Queue []q = new Queue[3]
    but when I try to fill up a one of the queues they
    always stay null. I tried something like:
    q[0].enqueue(object)
    but q[0] will never fill up. I dont think its my
    Queue class thats incorrect because if I have a stand
    alone queue I can fill it up and/or remove elements.You are right--the array has three null elements. Right after you call "new Queue[3]", do this (preferably in a loop, and passing constructor parameters as necessary):
    q[0] = new Queue();
    q[1] = new Queue();
    q[2] = new Queue();Then you can safely call:
    q[0].enqueue(object);Don't forget code tags (see button above posting box) when posting code, so that it gets formatted nicely.

Maybe you are looking for

  • How to write the code for a panel when using treeview?

    Hi, We are developing a new plug-in in Indesign as based on treeview. we have completed the design part, but we have some doubts in coding.. One dialog widget and three panels(General, fitting, Eventsandscripts). The .fr file: resource GeneralPanelWi

  • I have a problem resetting my itunes account password

    I have a problem resetting my itunes account password have loas the aswer to my secret password and my password to my email account, what to do? contact me at [email protected]

  • Backup (target) location on Thinkpad x61 ?

     Hi ! I'm using Thinkpad x61. I've just run the backup utility from ThinkVantage Productivity Center. After completion of the backup, my harddisk is only left 4% of disk space. I'd like to delete the backup file but I can't find the location of the b

  • High contrast stuck on 2012 R2

    Hi, after reboot the high contrast is on and can´t be turned off, i can change between the different high contrast themes but not turn it off. I have tried the workaround that work on 8.1 but that is not an option on server 2012 because the theme opt

  • Wrong document message in Photoshop cc

    My computer crashed so I had the motherboard replaced.  I had just prior to that downloaded adobe photoshop cc.  Now when I open it a message in a palette says cannot perform task wrong document.  It then opens, however I get the same message when tr