Refresh BEx-Query with variant

Dear all,
i have a question about refreshing Queries with variants.
To refresh a BEx-Query (BW3.5) in a Workbook with VBA is no problem.
For example:
Run "SAPBEX.XLA!SAPBEXrefresh", False, myRange
But is there a possibilty to refresh a BEx-Query with a variant (also with VBA)?
My target is to create a VBA-Tool:
1 which user can select a single Query and the available variant.
2 Then push a VBA-Button
3 After the selection no Variable-Screen will pop-up
   and the refreshing is completed.
Thanks all

Hi Ashok,
refreshing Queries automatically on Workbook open is standard...
What i need is to refresh a Query with variant (saved variable-values for a query e.g. the name of the variant is "ZMYVARIABLES").
The user should not select an existing variant (ZMYVARIABLES)
manually with Shift+F5 (Get Variant) on the Query-Variable POPUP-Screen.
What i need is a codefragment which implement that all.
Pseudo code:
Sub RefreshQuery(QueryID As String, Variantname As String)
End Sub
Thanks,
Erol

Similar Messages

  • BEx query with variant from ABAP

    Hello,
    I'm looking for possibility to start BEx query with variant (variant is created with tx RSRT) from ABAP. There are some funktion modules, which start queries (launch excel), for example RSAH_LAUNCH_EXCEL or RSSEM_QUERY_LAUNCH, but they are ending with short dump, when there are variables in the query. Is there any standard FM, which starts the query with variant or accepts parameters?
    regards,
    Krzysztof

    Hi,
    the short dump was my fault, I've passed query name instead of genuniid to the RSAH_LAUNCH_EXCEL.
    What I'm trying to do is to I'll start BEx query with parameters (I don't want to get selection-screen from the query, I need to fill it from ABAP).
    Here is my example, which is not working.
    DATA:
      lv_query(30) TYPE c,
      lv_genuniid  TYPE rsrrepdir-genuniid,
      ls_var       TYPE rrx_var,
      lt_var       TYPE TABLE OF rrx_var.
    lv_query = 'YB_MAKLER_DETAIL'.
    CALL FUNCTION 'CONVERSION_EXIT_GENID_INPUT'
      EXPORTING
        input  = lv_query
      IMPORTING
        output = lv_genuniid.
    IF lv_genuniid = ''.
      WRITE: / 'There is no Query', lv_query.
    ELSE.
      ls_var-vnam = 'YS_MKLE'.
      ls_var-sign = 'I'.
      ls_var-opt  = 'EQ'.
      ls_var-low  = '0000005100'.
      APPEND ls_var TO lt_var.
      ls_var-vnam = 'YS_VTGJ'.
      ls_var-sign = 'I'.
      ls_var-opt  = 'EQ'.
      ls_var-low  = '1999'.
      APPEND ls_var TO lt_var.
      CALL FUNCTION 'RSAH_LAUNCH_EXCEL'
        EXPORTING
          i_genuniid                       = lv_genuniid
          I_OBJVERS                        = 'A'
          i_hide_sapgui                    = 'X'
        TABLES
          I_T_VAR                          = lt_var.
    ENDIF.
    If parameter 'i_hide_sapgui' is empty, I'm getting empty selection-screen,
    If parameter 'i_hide_sapgui' equals 'X' I'm getting selection-screen filled with values, which were used last time manualy, not with values from the internal table 'lt_var'.
    Do you have any idea how to pass parameters to the query with this function module?
    Regards,
    Krzysztof

  • Refreshing Hierarchy node variable in BEx query with change in hierarchy

    Hi all,
    We have used a hierarchy node variable on Characteristic ZECCSAC (user-defined) and used it in a BEx query with default value set to a particular node value. Upto this, it is working fine.
    The hierarchy used in the query, with the hierarchy node variable, was later changed ( and in future it can undergo changes ). Since the number of records in the hierarchy are changing, the nodenames of the hierarchy nodes are changing. But the hier node variable default value is still set to the earlier nodename for that node description. So at runtime it is giving an error "ECCS Account Number is invalid"!
    Can anyone suggest how to refresh a hierarchy node variable default value each time a query is run so that the latest nodename is always taken ?
    Quick reply will be appreciated.
    Thanks

    Hi,
    You get this with User exits.
    Thnaks

  • Report on BEx query with 2 structures (one in rows and one in columns)

    Hi, experts! I have to make Crystall report on BEx query with 2 structures, one in columns (with KF's), and one in rows. Is it possible to create such report? Because when I create such report, I cant see fields in structures, only characteristics fields.
    Ok, I found samr problem in another thread. Sorry.
    Edited by: Mikhail Sychev on Dec 5, 2009 9:53 PM

    Hey Flora,
    Happy to hear that its working now.
    Answering your question, again its upto the connection and report format you are using. Based on your question i hope you your report output should be like this.
    You cannot map to two labels for the series, again this report format is possible only in cross tab through Webi. I would suggest you to concatenate the material and month in a dimension in webi like below.
    I have done the concatenation in excel level, i would suggest you to do that in webi. Try to reduce the formula as much in excel.
    or
    If you are using Query browser connection, then i would suggest you to create a separate report which will display the actual vs plan material wise, here you need to pass the material as a prompt.
    Hope this helps in clear, please revert me for any clarification.

  • Drill Down BeX Query with hierarchy in WEBI

    Hi,
    I am using a Bex Query with Hierarchy in my WEBI report. Is it possible to drill down ? I am not able to use Scope of Analysis because it is disabled. I am very new to WEBI. Please help me out.
    Thanks in Advance.
    Lakshmi Mohan

    http://www.google.co.in/url?sa=t&rct=j&q=drill%20down%20bex%20query%20with%20hierarchy%20in%20webi%20%20%20&source=web&cd=2&ved=0CDQQFjAB&url=https%3A%2F%2Fcw.sdn.sap.com%2Fcw%2Fservlet%2FJiveServlet%2FpreviewBody%2F137316-102-1-277519%2FWeb%2520Intelligence%2520on%2520SAP%2520implementation%2520best%2520practices.pdf&ei=xofcTpSgF5DJrAeaxpiIBw&usg=AFQjCNHuwDIpvxciPKJyEdoz3GiVjRKgqA
    http://www.scribd.com/doc/62293080/40/Query-Drill-for-hierarchies

  • WAD: Execute query with variant

    Hi,
    I would like to create a web report so that for a web item to select a query with variant. Is it possible using WAD?
    Or is there any parameter that could be used in the URL so that I can create directly the URL for this web report, without using WAD anymore?
    Could you please give me some sugestions regarding this problem?
    Thank you,
    Iuliana

    HI Iuliana,
    Take a look at this post:
    Re: Variant for a Web Report
    Hope this helps...

  • BEx query with keyfigure rank in row, chars and other keyfigures in columns

    Hi All,
        I have a BEx query with Plant and Region in rows and two keyfigures(% and rank calculation) in the column. Now my requirement is to display rank in the first column, plant and % cal. in the next columns in query output.
    Query ouput should look like :
    rank plant  %
    1     XYZ    63.00
      2    ABC   76.94 and soon.
    Is any way possible to achieve this and if yes can anyone explain in detail with steps, I apprecaite your help with points.
    Thanks
    Eric.

    Hi  Jerome,
       Thanks for quick response, is there any alternate way like customer exits or etc. This is my requirement and I need to provide the users the solution. I appreciate your valuable time.
    Regards
    Eric

  • MDX for a BEx query with a characteristic structure

    Hi,
    I have a BEx query with a characteristic structure in the rows.
    Material     Structure     Measure1
    a-Material     a-Structure     ....
    a-Material     b-Structure     ....
    b-Material     a-Structure     ....
    b-Material     b-Structure     ....
    I am looking to run the query via MDX. Is that possible? If yes, how should be the mdx statement.
    Thank you in advance for your help.
    Regards,
    McGreen

    Hi,
    it will work, so long as you also include the Structure object in the WebI Query panel as a results objects.
    the SELECT syntax is much the same as a 'normal' MDX statement.
    the quickest way to tell them appart is how the Measures are called. normally, it starts:   SELECT [MEASURE.ABC123] NONEMPTY(CROSSJOIN( ...   ) )
    however, when you have a Structure, all the declarations from the start of the statement looks like : SELECT [ABC123.ABC123] NONEMPTY(CROSSJOIN( ...   ) )
    i hope this helps.
    Regards,
    H

  • SAP BO WebI Report on top of BI Bex Query with Authorization Variable

    Hi,
         We are trying to restrict row level data using BI 7.0 analysis authorization concept. We have an authorization variable in the Bex query and is working perfect in Bex Analyzer as well as in RSRT.
    Now we are trying to achieve the same thing in BO webI. We created an Universe using Authentication Mode SSO. We are on BOXI 3.1 and implemented SSO. When we try to run the query in WebI we get the error
       "A database error occured. The database error text is: Error in MDDataSetBW.GetCellData..(WS 10901)"
    Just for testing purpose, when we use query filter in WebI and use Values from List, it is showing only the authorized value it supposed to show and runs well with that value selected. But we have to achieve this without the query filter in WebI.
    So are we missing some thing here or any patch issue? Please share if you have done this type of reports in BO.
    Thanks in advance for your help.
    Moorthy.

    Yes I did run MDXTEST and it gives error as 'you do not have sufficient authorization'. The reason it is giving, I guess and we are debugging that to confirm, is first it looks for 0BI_ALL and throws error which is not the case in Bex. See the following trace in RSRT trace.
    InfoObject Properties Defined
    Reading of Directly Assigned Authorizations
    Direct Assignment Does Not Include Universal Authorization 0BI_ALL
    Reading the Indirect Assignments with Authorization Object S_RS_AUTH
    Does user have OBI_ALL?
    No, the User Does Not Have Universal Authorizion 0BI_ALL
    Negative Entry in SU53 Result of Failed Check for 0BI_ALL
    Indirect assignments found; no universal authorization
    Reduction of Authorization Dimensions on Characteristics in InfoProvider
    Reduction Successful
    Thanks!
    Moorthy

  • Error while integrating BEx Query with Cognos

    Hi all,
    we have made 999 rows and 150 columns..
    but we r unable  to integrate it with cognos if we remove free characteristics....
    and it thows me the following error
    1.BAP-ERR-0002 a BAPI error has occured in the function module RFC_READ_TABLE. NOT_AUTHORIZED
    2.error when generating data provider
    3.Query is too large
    Please do reply immediately with the correct solution
    Regards
    Madhavi

    Hi Vani Reddy
    Jus one quick finding are there any new patches upgrade taken place in your system . its in generally occurs because patch issues please refer the following note  1325527.
    it may helps you in this reg.
    Hope its clear a little..!
    Thanks
    K M R
    ***Even if you have nothing, you can get anything.
    But your attitude & approach should be positive..!****
    >
    vani reddy wrote:
    > Hi All,
    >
    > While executing Bex Query user is getting below error message after 20 mins and coming out of BEx.
    >
    >
    >
    > Error Group
    >
    > RFC_ERROR_SYSTEM_FAILURE
    >
    > Message
    >
    > An exception that could not be cought occured.
    >
    > Thanks in advance
    > Vani
    Edited by: K M R on Aug 12, 2009 2:14 PM

  • Query with variant from ABAP

    Hello!
    I need to execute a BW-query from an Abap-report.
    I tried it already with function module 'RRW3_GET_QUERY_VIEW_DATA' and with classes / objects 'CL_RSR_REQUEST' resp. 'CL_RSR_DATA', but:
    I want to use the query with a variant, which could be found in table RSRPARAMETRIZA.
    (Btw: even with a variant in table RSRVARIANTDIR  I don't get the results wanted...)
    Is there a direct way to call a BW-query with a variant from Abap?
    Alternatively: How do I get the variant-contents? Is there a 'universal' way to work with both kinds of variants? (RSRVARIANTDIR / RSRPARAMETRIZA) 
    Thanks in advance.

    Thanks for the link.
    Well, I already read that document and I followed the links to the former blogs on this subject.
    But this solution doesn't work for me: CL_RSR_QUERY_VARIABLES is unknown.
    I read the pdf and the function-module-code, but I still don't have an idea how to work with query- variants . The example-coding includes a line
    DATA: wf_variant TYPE variant .
    but that's not used, or is it?
    (I don't have a set of variables and conditions, but just a variant-name. The variant will be created by other people, who would start my report.)
    Greetings

  • Using Bex Query with cell definition with WEBI

    Hi,
    Currently I am using a Bex query as a datasource for a webi, normally this works ok but I am having trouble with one particular query.
    This query has cell definitions defined in the query. When i import the query into WEBI I get an MDX error.
    Any suggestions?
    Thanks
    Flash

    Hi,
    We do not see all elements of the BW query in the universe, just those not using cell definitions.
    We are currently on Business objects XI 3.1
    Using BW 3.5
    And the query runs fine using RSRT, it does show some asterix for some of the values but this can be removed by filtering on currency type in BW report
    Thank You,

  • Column chart from Bex query with 2 characteristics in rows and column

    Hi,
    We're trying to represent the following column chart in Dashboard Design:
    Material/Month
    January
    February
    March
    Material 1
    100
    200
    300
    Material 2
    400
    500
    600
    Material 3
    700
    800
    900
    The BEX query has:
    Result objects: Material, Month/year; amount
    The problem is when i paste the Material dimension in the Excel, i'm getting the following result:
    Material/Month
    January
    February
    March
    Material 1
    100
    200
    300
    Material 1
    400
    500
    600
    Material 1
    700
    800
    900
    So, when i display the column chart, the material tag is incorrect:
    as the image attached shows.

    Hey Flora,
    Happy to hear that its working now.
    Answering your question, again its upto the connection and report format you are using. Based on your question i hope you your report output should be like this.
    You cannot map to two labels for the series, again this report format is possible only in cross tab through Webi. I would suggest you to concatenate the material and month in a dimension in webi like below.
    I have done the concatenation in excel level, i would suggest you to do that in webi. Try to reduce the formula as much in excel.
    or
    If you are using Query browser connection, then i would suggest you to create a separate report which will display the actual vs plan material wise, here you need to pass the material as a prompt.
    Hope this helps in clear, please revert me for any clarification.

  • Universe on Bex Query with Condition

    Hi,
    I'm working on creating a WebI version of a Bex Report. I've created a universe on top of the Bex Query and then a WebI report based on the Universe. The Bex Query contains 4 conditions. They allow optional filtering of two measures, Less Then or Equal and Greater Then or Equal. The conditions are applied at the employee level of the results set, so for example, if an employee's total sales is greater than 50 and the user enters 50 for the condition then none of that employee's rows of data will appear.
    A single filter was created in teh Universe containing all four conditions. I had to update the syntax as they were all brought in using Equals instead of the GreaterorEqual and LessOrEqual. I also updated the filter key to use the @Select and the correct dimension.
    In the WebI report, only the two using LessOrEqual are functional. The two conditions that utilize GreaterOrEqual will only remove individual rows, not the enter set of rows for that employee. I've set the aggregation to sum instead of Database Delegated for the two affected measures.
    If anyone has any input on how to get the GreaterOrEqual conditions functioning properly, or a workaround that will remove all rows for an employee when their sales are not above a cert number, it would be greatly appreciated.
    Thanks,
    Jeff

    Also here is the syntax for one of the filters that is not functioning properly.
    <OPTIONAL><FILTER KEY="@Select(Total Quantity of Adjustments\Total Quantity of Adjustments)"><CONDITION OPERATORCONDITION="GreaterOrEqual"><CONSTANT CAPTION="@Prompt('Minimum Quantity of Adjustments','N',,mono,free)"/></CONDITION></FILTER></OPTIONAL>

  • Zero Suppression Not working in Bex Query with Formula Variable

    Hi Friends,
    I have a peculiar issue here. We upgraded from 3.5 to 7.0 recently. Some of our Bex queries have been behaving abnormally after this. In these queeries,
    we have some key figures which use formula variables (ready for input and mandatory) in 3.5. User can enter either 1 or 0. The actual key figure is multiplied to the formula variable so, the entire column gets the actual key figure value if the user enters a value '1' and the gets the value 0 if the user enters '0' in the formula variables. Zero suppression is activated on the rows and columns and this report. This technique was used successfully to show/hide a column.
    After upgrade, the same query works but, the zero suppression is not working. When the user enters a value of '0' in these formula variables, all the entries in the column for the key figure are displayed as 0 but the column is still displayed. It is like the zero suppression setting is not active at all.
    I created one of those queries in Bex 7.0 to see if that works but, the issue still exits. Have anyone come across this kind of a scenario? Please get back to me if anyone has any idea on this situation.
    Thanks and Regards
    Subray Hegde

    Which SP level are you at in BI 7? There is an OSS Note that would need to be applied if you're on lower than SP10. That note is:
    [OSS Note 964756 - Formula variables with replacement from difference in BI 7.0|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=964756]

Maybe you are looking for

  • Error message when finalizing...file already open with write protection

    I just created my first movie in i Movie. It's about 9 minutes long. When I tried to finalize it it worked for a couple of hours and then came up with a message "unable to prepare project for publishing because an error occurred (file already open wi

  • How can i change a xmltype column's xml schema?

    i create a table that have a xmltype column.this column is schema-based. my problem is , now i want to this column's schema will be redefined to a global schema? [b]how can i change the column's schema which already have a schema?

  • IPTC field codes -- Bridge IPTC Core metadata

    Is there a reference somewhere as to which IPTC codes match up with the IPTC Core fields in Bridge metadata? A list of the codes is here, so you know what I'm talking about. For example, the Description field in Bridge metadata corresponds to the Cap

  • Element download stucks on extracting

    Hi, my download gets stuck on "extracting... please wait..". I have tyried to reinstall Adobe download assistant but I can´t

  • Grey Thumbnails

    I just recently purchase a new Macbook pro and all of the thumbnails in iMovie went grey. I've tried deleting the thumbnails and cache and renaming it but nothing seems to work. Does anyone know a solution to this problem?