Query - Filter several characteristics by one variable

Hi Experts,
I'm facing the following situation in my current project:
I have several characteristics named Formula ID for each cost component in the cube.
Formula ID - Base Price
Formula ID - Additives
Formula ID - Differential
Formula ID - Transportation
Etc
I need to create a single variable that is going to appear in the selection screen, where the user will be able to type a value. Then the query will search this value in all the characteristics below during query runtime.
I was thinking in formula variable. Is it applicable in this case? If so, do I need to use customer exit together?
Is there any other way to do it?
Thanks!!!
Helder

I am not sure if formula variable would help coz. therein again, u can give only one ref characteristic.
You can do this with customer exit provided the data type is same for all the char.
Create restriction for one of the chars as you would do normally (create a variable. processing type - manual input. eg. for base_price)
For the other char, create a variables of processing type customer exit (ready for input should not be checked); and write the below code for each of them.
READ TABLE i_t_var_range WITH KEY iobjnm = 'BASE_PRICE' INTO l_s_var_range_dt.
    IF I_STEP = 2.
      l_s_range-low          = l_s_var_range_dt-low.
      l_s_range-high          = l_s_var_range_dt-high.
      l_s_range-sign          = l_s_var_range_dt-sign.
      l_s_range-option          = l_s_var_range_dt-option.
      APPEND l_s_range TO e_t_range.
    ENDIF.
In the above code, ZV_ADDITIVES is the customer exit variable for 'additives'.
Write similar code for the other 2 char.
When the query executes, only the variable for base_price would be prompted. the other variables would take the value from the base_price variable.
Hope this helps!
~ Arun KK

Similar Messages

  • How can I use a variable in webi query filter

    I created a webi report using the fiscal year/month(period) field as a filter to show a window of 18 periods.  The report works just as requested using a between filter on fiscal period with prompts for both the start and ending periods.  Now I'd like to calculate the start period based on what was entered in the prompt for the ending period (e.g. enter 201106 for the TO prompt on the between statement and have the FROM statement filled in as 201001.)  I can create variables in the report to display both the user response to the ending period prompt and the calculated starting period, but I cannot figure out how to incorporate that calculated starting date into the FROM side of the between query filter.
    Any suggestions? 
    Thanks,
    Doug
    Sorry I got my froms and to's mixed up in the first draft. Edited by: Doug Roswold on Mar 4, 2011 6:27 PM

    Let me understand what you want to do.  You don't want to use two prompts, just one, insn't it?
    I mean, instead of:
    Filter area:
    Date between "From prompt" to "To Prompt"
    You want something like:.
    Filter area:
    Date between Variable  to "To Prompt"
    if I'm not wrong that's not possible to achieve in Webi Query  Panel.
    Can you modify your universe? The only way to achieve it is modifying your universe, creating your formula in the universe and assigning it to an object, so you can use this new object in your filter area like this:
    Date between MyUniverseObject  to "To Prompt"
    Edited by: PadawanGirl on Mar 4, 2011 8:15 PM

  • Use Yesterday as variable for Query Filter

    Post Author: rrburton
    CA Forum: WebIntelligence Reporting
    I want to have a query filter that refers to the previous day.  In regular SQL I would use something like "= trunc(sysdate)-1".  I don't see any option for doing it this way in web intelligence, the closest it comes is selecting object and then assigning the Beginning of Last Week item from the System Date table.  What am I missing?

    Post Author: rrburton
    CA Forum: WebIntelligence Reporting
    Nevermind - I figured it out just now.  It isn't very intuitive.  In the Objects and Variables dialog in the SystemDate table there are a bunch of items like 1 day, 2 days, etc. and you select one of those and then in the code it looks like:
    WHERE   PKG_NTD_CONV.TO_ORCL_DATE(TROUBLE_TICKET_ARCHIVE.CREATE_DATE)  =  ( sysdate )-1
    It should say something like 1 day ago, 2 days ago, etc.

  • How to call a Query from widget which has mandatory variables/filter values

    Dear Gurus,
        I want to show data from BI query (BEX) in Wedget, which has variable/ Filter as input parameter.     Please tell me how add these parameters while calling query throgh web service.
    Regards,
    Aslam Khan

    Hi Aslam,
    Kindly refer to Page Number 49 u2013 23rd Point and Page 50 and 51 in the SAPEnterpriseWidgetDevelopmentGuide.pdf u2013 Which explains how to pass the Import / input Parameters.
    You can also refer these links u2013 [How to pass more than one value in RfcRequest ?;
    [how to bind an input field with an rfc input;
    Hope it helpsu2026
    Regards,
    Shilpa B.V

  • InfoView - Query Filter for date variable of previous week

    I am trying to automate the process to generate a report for the previous week's data.  Right now I just prompt the user to enter in the start & end date/times, but I would like to somehow automate the date filtering using a Query Filter.
    In particular, the report will be generated every Thursday at 12:35 PM, and it needs to filter only the date field between the date's of the previous Thursday @ 1:31 PM, and the current Thursday @ 12:30 PM.
    I know there is a way to do this using an offset or something like that, but I'm a bit of a newbie to InfoView....so any help is greatly appreciated.  Sorry if the explanation is confusing.
    Thanks so much,
    Nick

    Hi,
    You can create two objects on universe level or first database level then add in the universe based the sysdate.
    Then go to  webi  query and  replace the prompt value by these objects and from next time when ever user refresh this report will run  without any prompt.Same thing in the scheduled report.
    Thanks,
    Amit

  • Input ready query with free characteristics

    Hi All,
    Is it possible to include characteristics restricted with variables in free charatceristics panel to make input ready query?
    I am trying to create input ready query with above practice but unable to make query as input ready.
    If I include characteristics restricted with variables in rows or filter then it is working fine. .ie. I am able to input entries at runtime of query.
    Kindly help me out to find the solution as I have to include characteristics in free characteristics panel.

    Hi,
    Any cell in an input query can only be input ready if it corresponds to only one value of each characteristic in the underlying aggregation level. If you have free characteristics in your input query, you will need to restrict them to single value at query runtime to make the query input-ready. Note that putting a characteristic in rows automatically restricts it to one value.

  • Bex Query Filter Page in BSP - Urgent Please...

    I have seen many threads about Bex query in BSP, but can any one tell me how can i display the default Bex Query Filter page in BSP.
    I created a query in Bex Query Designer and added few filters and when i execute i get a popup where i can enter the input values for which the report would be generated, can i get the same functionality or similar functionality if i have the same Bex query in BSP.
    Also apart from the filters specified in the Bex, all the columns displayed in the report appears in the filter section how can get the same functionality BSP.
    Note: I do not want to use Bex Web Application Designer
    Please tell me the steps for the same.
    Atleast please give me the steps at a high level. Please...

    Hi,
    1.  Create a CKF, inside the CKF window create a new Formula Variable --> Right click in left side window on var and say create new Variable
    2.  Create new variable of replacement path type and reference Characteristic as the TO DATE value which you want to be max.
    3.  Now drag this new created var to CKF and save.
    4. Now create condition with follwoing deatils:
    Key Figure              Operator     Value
    Max Date(CKF)       TOP N          1
    Save and execute your query. This will give you max value for the To Date field.
    Hope it works .
    Regards
    Raj Rai

  • "Select All" option in Multiselect Query Filter

    Hi,
    Is there a way to select all values in a multiselect filter option in a query. currently i have created a variable or a mandatory filter which allows me to select all values one by one and then move it to right side, but its very painful option in certain cases where in i need to select all values. Is there a way where in one can select all values with a single click in Query Filter in Web Analyzer.
    Thanks
    Akila. R

    Hi,
    You can give range values in the Query designer.
    You can include variable selection where user can enter the selections with their own selections.
    Let us know if you still have any issues.
    Reg
    Pra

  • Display only one variable in the header and not column in WAD

    Hi All,
    my requirement is to be able to display only one variable in the report output header and hide the others. I am able to display all by using the INFO FIELD ITEM and saying variable display ON - but the requirement is very specific for only one variable display.
    how can i achieve this ?
    Thanks,
    Shweta

    Hi,
    You can insert a text item and Turn off the others or Hide these from Filter pane I have done that and then use that query for your WAD.
    Steps:
    1. Uncheck all the variables from your Design item in Analyzer.
    2. Insert a New Text Item and check the Variable you want to display.
    3. Go back and run the Query.
    Even you can change the position in the Query and Save as a workbook.Let me know ,if this works.
    ~AK

  • A hierachy with several characteristics in Integrated Planning

    Hi gurus!
    Have you been able to implement an input-ready query with a hierarchy for several characteristics in row area?
    I have two characteristics, 0SEM_POSIT and 0ACCOUNT and the requirement is that plan figures should be posted to 0SEM_POSIT but history data should be read from different 0ACCOUNT values for different companies even if they use the same template to plan their values. I have added 0SEM_POSIT as an external hierarchy characteristic to 0ACCOUNT info-object and created a hierarchy for 0ACCOUNT in which hierarchy nodes are defined as 0SEM_POSIT values.
    However, if I use an aggregation level in my query, which has characteristic 0SEM_POSIT, hierarchy nodes are not input-ready (unless I use disaggregation, which is not possible if I want to post to 0SEM_POSIT).
    Am I missing something or is it simply impossible to configure such a multidimensional query with a hierarchy? I didn't find any solution for this in SAP documentation.
    Greatful for your answers, points guaranteed for helpful messages!
    Sari

    Thank you Gregor for you reply!
    I tested 0ACCOUNT hierarchy with different kind of aggregation levels and 0SEM_POSIT as external hierarchy nodes and noticed that it was not possible to make nodes postable in a way that the values would have posted to 0SEM_POSIT. Finally i found also sap documentation telling me the same, so I decided to change my course with this:)
    I have used disaggregation in many layouts, but it didn't fit here, because of several reasons. The main reason is, that several 'companies' (they all have their own comp_code in sap) use this layout. They all have different characteristic relationships between 0ACCOUNT and 0SEM_POSIT even if they use same 0ACCOUNT values. If I had used 0ACCOUNT hierarchy in my layout (different hierarchy for different 0COMP_CODE), I could have defined different accounts for each company to a hierarchy node in their own 0ACCOUNT hierarchy. The users should not have been able to see 0ACCOUNT-level though, which would have meant that the analysis item could not have been activated for navigation (only hierachy nodes would have been visible and 0ACCOUNT level would have been hided). Even if there would have been disaggregation, the users would not have known about it. The problem is, that disaggregation takes time and I think the users would not have been pleased to wait for refresh especially when they would not have known a disaggregation takes place.
    Another problem would have been, that there is only one way to define the disaggregation in a query column. My requirement is that user is able to choose between two different ways to disaggregate planned values to lower organisation level (according to last year budget or actual data). That means that I have to have two planning functions in my layout for the user to choose for.
    I desided to create characteristic relationship based on user exit. I will use 0SEM_POSIT as row characteristic in higher organisational levels to plan for. To derive the right 0SEM_POSIT to each 0ACCOUNT value in profit center level, characteristic relationship source characteristics are profit_ctr (which I can use for determining what the company is) and 0ACCOUNT and target characteristic is 0SEM_POSIT. I created a DSO to load different 0SEM_POSIT values for each account for different companies. I read the values from dso table when deriving 0SEM_POSIT.
    Points assigned to your kind answer, Gregor!
    Sari

  • BEx not refreshing data on all embedded queries:One variable, one variant:

    Good day
    I have the following challenge. I have created a BEx workbook and inserted one query multiple times into this workbook. I have removed the result area of each query to a separate sheet to enable the use of different filter values and to use some excel formatting to change fonts, colours etc.
    I have created a ocalday variable selection to this query. The data must be displayed for the last day of each month for a period of 12 months from a certain ocalday. I created and saved a variant for this, adding the last ocalday of each month from 2009/05/31 to 2010/04/30 in the selection option of the variable, thus it looks like this in the variable selection of single values:
    2009/05/31
    2009/06/30
    2009/07/31
    Etc
    Etc
    I have ticked the option u201Crefresh queries when opening workbooku201D in the properties of the query and applied it to all. When the user opens the workbook, the users must select the variant on the variable selection screen and refresh all the queries.
    Now, my challenge comes in where only one query is refreshed with the required dates. All the other results cannot be found and it displays the last date in the variant (ie. 2009/04/30). You need to go and refresh each query separately, using the same variant. This is time consuming as some workbooks have > 50 queries.
    Thus, one query embedded multiple times, one variable, one variantu2026u2026
    Why does the variant not apply to all the embedded queries when data is refreshed?
    Your expert assistance will be appreciated.
    Have a nice day
    Cj

    Hi,
    When you have multiple queries in the workbook which have variables with that,refreshing the workbook,will prompt you the variable screen where you can enter the variables which can take effect in all the queries.
    Go to Workbook Settings->General tab->Check Refresh workbook on Open->Go to Variables tab->Check Process Varaibles on Refresh and Display Duplicate Variables Only Once.Save and reopen the workbook.
    Now it will prompt for variable screen where you ca enter the variable values which is common for all the queries.
    The data will be shown in all the ANalysis items based on the variables entered for the queries.
    Rgds,
    Murali
    Edited by: MuraliKrishnan E on Sep 10, 2009 2:21 PM

  • Query Filter Function?

    when I make a report, I want it to chose the date in "Query Filters` place. this option is going to be between and i am going to chose one of them by myself and the other is going to be chosen 4 months before which I chose. for example, I chose june as a filter, it should give me the february automatically based on my function.  this kind of function  can be written filter which is in  "Query Filters"?????? whenever I write =currentMonth() in filter place, It brings up the data based on the last month.

    Hello,
    Your post is a little difficult to understand, but it sounds like you want to do something like go back, for example 4 months from the date you enter in a prompt when running the report? So if you enter June 1, you want to see data between Feb 1 and June 1?
    You can easily create such an object in your Universe with DateAdd function. That can then be used in query filter. I don't think you can create such a filter on the fly in query filter in Webi. You can on the report as a variable, but not sure that would help.
    Thanks!

  • Bex query. Select single values in variable time out.

    I have created a variable on characteristic 0profit_ctr which works fine for all queries on all Infoproviders except for one.  With this particular Infoprovider, which is a DSO when the option to show u201CSingle Valuesu201D is selected in the variable screen the query just hangs and eventually time-outs. I have tried including the DSO in a mult-provider but still have the same issue. The variable works on other DSOu2019s with exactly the same settings. This DSO has less data than the other DSOu2019s which work fine.
    I know that 0profit_ctr is compounded with 0co_area which I have tried restricting with no change in the result.
    I would be grateful of any ideas.
    Thanks
    Jenny

    Hi Durgesh.
    I checked the settings and although they were the same as other infoproviders I changed the query filter value to use the values in the master data table and this has solved my problem.
    Thanks for your tip.
    Regards
    Jenny

  • Is it possible to create input ready query with free characteristics ?

    Hi All,
    Is it possible to include characteristics restricted with variables in free charatceristics panel to make input ready query?
    I am trying to create input ready query with above practice but unable to make query as input ready.
    I have created input ready query on aggregation level. If I include characteristics restricted with variables in rows or filter then it is working fine. .ie. I am able to input entries at runtime of query.
    Kindly help me out to find the solution as I have to include characteristics in free characteristics panel.

    Hi Tilak,
    Thanks for reply.
    As per my knowledge, Every characteristics which is included at aggregation level should be included in either rows or filter level in query designer.
    But as per my business requirement I have to include the characteristics restricted with variables( in default values only) in free characteristics. But the problem is if I do so the query runs in display mode not in input mode.
    So kindly help me if you have any solution for above scenario.
    ---Shamkant

  • One Variable 2 Restricted key figures on 2 different Dimensions

    Hi all,
    Here is my problem:
    I have a cube based on SD sales items. I want to calculate 2 retricted key figures on the 0net_value retricted by a date.
    The first key would be restricted by the installation date, and the second one by the cancellation date.
    Those two dates are set using a user input.
    When I try to do this here the error message I get:
    "Variable ZD_CSDATE is used in both (structure) element EL099Z0TL38F14TMC6AL7XKQD, and element EN4ZFAZEYGZ36B06JU04297W5 for various characteristics (0CANC_DATE, 0UCINSTDATE). This is not permitted as the characteristic is required for the F4 value help structure."
    I created 2 variables set by customer exit, this solve the problem but is not convenient at all. So who could use one and only one variable or how can create a variable by copy of another one?
    Thanks
    Matthieu

    <FONT FACE = "Tahoma", Font Color = "Blue">
    Hi
    <Br>
    I am sure you can make more than one Restricted Key Figures which are restricted to same variable value for some Characteristic.  And secondly there is no easy copy and paste option to create 2 Customer Exit Variables. You need to find out the ABAP Code written using T-Code: CMODE for the Variable Exit and there you can copy and paste a part of this code to populate new variable. If you check the ABAP Code, you would understand what I am saying.<Br>
    I am more surprised at that F4 Help in the error message. Please investigate more in that direction.
    <Br><Br>Hope it helps.
    <Br>
    Cheers
    Abhijit
    <Br>* It's a good habit to reward someone with points in SDN if you think his/her
    response was helpful to you
    </FONT>

Maybe you are looking for

  • Sending Emails With Java

    I'm trying to find out how to send emails with java - without using the java mail api - i've been told there is a way to do it but i cant seem to find it - any help on this would be gratefully recieved as i'm totally stuck! :(

  • Cover flow missing

    I have installed itunes on my laptop but there is no cover flow option, none at all, just the old style version of viewing, I have downloaded latest version

  • Possible? access data from another effects plugin

    right this sounds complicated so I'm gonna ask if its even possible before i start trying to build this. Picture this scenario. Main comp has layer "A" which is a sub-composition, B. The layer A has my filter on it. In comp B, we have a layer "C" wit

  • IMovie 08 videos on to iPhone 3G?

    I was wondering if you can put iMovie 08 videos on to iPhone 3G? If so how, Thanks Brandon

  • Best way to move VM onto a different CSV

    Hi all, What is the quickest & easiest way to move a Virtual Machine from 1 CSV to another? Can the move be done without disrupting the guest or would we need to schedule this during the next downtime window? My current thoughts are to either Export