Retrieving BEx Query Results Area for use in Excel formulas

Hello,
I run BEx queries in workbooks and then use Excel formulas ( mostly VLOOKUP(LookupValue, ResultsArea, ColumnReturned,) ) to retrieve certain information from the query ResultsArea.
****Problem:
Depending on the query parameters, the query "Results Area" is larger or smaller.
****Non-optimal solution:
One way to define the  ever changing Excel range occupied by the Results Area is to create an Excel name as:
QueryRange = OFFSET(QueryFirstCell,,,COUNTA(OFFSET(Sheet1!$A:$A,,COLUMN(QueryFirstCell)-1,,)),COUNTA(OFFSET(Sheet1!$1:$1,ROW(QueryFirstCell)-1,,,)))
Then, the only input required is the top-left cell of the Results Area, which stays the same (unless the query definition changes).
****Question
What is the best way to refer to an ever-changing query Results Area in an Excel formula?
Thank you!
Louis

It is actually much easier than that.
Use a VBA statement like the following:
Set RptRng = ActiveCell.CurrentRegion
This will retrieve the data in the Results Area, no matter what the size is.
Hope this helps...
Bob

Similar Messages

  • Output of BOBJ (Web Intelligence Reports) are twice BEx Query Result

    Hi Experts,
    Incase of first level of hierarchy, correct values (i.e same as BEx Query) are displayed in BOBJ reports . However on selecting two and more levels of Hierarchy, values,twice the corresponding BEx query values, are displayed in BOBJ reports .
    For e.g.
    For level one of hierarchy (one level of object from hierarchy ):
    Actual Amount keyfigure value in BEx Query : 100
    Actual Amount keyfigure Value in BOBJ Report : 100
    For if we select two and more levels of Hierarchy, then we get following inconsistent values:
    Actual Amount keyfigure value in BEx Query : 100
    Actual Amount keyfigure Value in BOBJ Report : 200
    We have implemented SP5 ,as suggested in SAP note 1373220 . However issue still persists...
    Can you please suggest, how to resolve this issue?
    Regards
    Mohit

    We had the issue close to your issue. Basically, Webi does a Cartesian product of the characteristics value and duplicate the number of rows. But when we add the key figure in the report, it was showing the correct result.
    Not sure, why the Key figures are also duplicating in your case. Please try adding removing characteristics and see if that resolves your issue.
    - Danny

  • Cannot find result area for a query

    I have 4 queries in a workbook, all on separate sheets. I usually refresh all queries at once from a fifth worksheet. I started getting this error when the first query is refreshed that says "Cannot find the result area for a query - probably all its cells were deleted. Please define a new location for the result area!"
    If I refresh each query individually, I do not get this error. But I want to refresh all at once, which had always worked in the past. If I play along with the error and try to select a cell to put the results, it still does not solve the issue. Any ideas why  suddenlt started receiving this error?
    Thanks.

    Try going through all the tabs on the workbook and ensure that you place the cursor within one of the cells of the query, then resave, close and open. See if the message still occurs.
    I know it sounds silly but we have had this issue in the past with multi tabbed workbooks and this, simple as it sounds has been the cause.

  • What are the best settings for video  compression if my end result is for use as  progressive .flv

    What are the best settings for video compression if my end result is for use as  progressive .flv.?
    Thanks,
    KIM

    Use the Final Cut Studio forum
    http://discussions.apple.com/forum.jspa?forumID=939

  • Exporting BEx Query results to CSV or other files.

    Hi All,
    We have a report designed in WAD, which uses a BEx query to display department’s information. Because of amount of data in the results it crashes when u get all the Free Characters into ROWS(Error is : Result set too large(552244 cells); data retrieval restricted by configuration (maximum =500000 cells).  It is a requirement from the user to have all the free characteristics in the rows( which I can understand is not the right way to go ahead). As it is crashing when you add last characteristic(WBS Purpose)  into the rows, they aren’t able to export data into spread sheet from the results. (as there are no results)
    Now my question is…..is there any way we can export the results from BEX query into any format for example text or csv? If yes, can we schedule that process? Please note that this characteristics are displayed as hierarchies.
    Am new to SAP BW and its been only six months since I have been in this role. Any help would be much appreciated???
    I looked online and some where in the forum it was mentioned of using program RSCRM_BAPI, but looks like it needs some sort of downloads from SAP.
    Is there any other way to export the BEx query results?
    Cheers
    Sandeep

    Hello Sandeep,
    You can use the Item "Context Menu" in your WAD and in the properties by default you can see the Options:
    Export to Excel & Export to CSV will be there and also there are many options which you wanted to see.
    It works for you!!!
    With Regards,
    PJ.

  • BEx Query results not getting updated

    Hi,
    I am using a BEx Query based on a multiprovider which is fetching data from a multiple remote cubes and multiple regular cubes.
    Now when data in the source system is getting changed the corresponding remote cubes are getting update but query result are not getting re-fresh for at least 2 hours.
    We have already tried doing logging out and and logging into the bex system.
    Is there some cache setting which is required?
    Default cache mode in query is  'Main memory cache without swapping'.
    Kindly advice.
    Regards
    Vivek

    Hi,
    Just generate your query once with program RSR_GEN_DIRECT_ALL_QUERIES.
    By selecting your multiprovider .
    Thanks,
    Ranjan

  • HT201070 I currently use OS 10.6.8 and Aperture 3, and just got a Nikon D600. It seems the the RAW Compatibility updates (4.01) are for use only with OS 10.7.5 or later, is that right? Do I need to update my whole OS to use this camera? Thank you!

    I currently use OS 10.6.8 and Aperture 3, and just got a Nikon D600. It seems the the RAW Compatibility updates (4.01) are for use only with OS 10.7.5 or later, is that right? Do I need to update my whole OS to use this camera? Thank you!

    Thanks to Bobthefisherman & Turbostar.  Turns out I've got a corrupted disk (which I found out via "verify disk" on Disk Utility First Aid.  Previously, I never thought to verify disk -- only to repair permissions -- so I never knew my HD had been corrupted.
    Wasn't able to do a clean install of OSX10.6 because my SuperDrive only sporadically will load discs, so I am taking it to the Apple Store to see if they can do a clean install, and depending upon costs, get the Superdrive replaced. 
    The HD wasn't partioned by the way.  And I did have just over 40GB of contiguous space. 
    Thanks again.

  • ABAP class or function for retrieving BEx query properties at runtime

    Hello Experts,
    I'm working on BADI RSR_OLAP_BADI and for a special calculation I need to know which characteristics are in the drill-down of the BEX query, sol later on I can aggregate some key figures using only these characteristics.
    Problem is that structure C_s_DATA in method COMPUTE contains all fields of the query (filters, free chars, chars in the rows, etc) and I need to now which characteristics are currently being showing in the Bex analyzer.
    So is there an ABAP class or function module I can use to find out this kind of information at run time?
    Any suggestion?
    Thank you

    Tank you for the feedback,
    I tried to use the class you provided, but I'm stuck now in how to get from within my class that implements RSR_OLAP_BADI interface, a handle, reference, o whatever represent my runtime query (not the query at design time) . As the class you provide must be instantiated before I can use
    In pseudo code could be something like this
    DATA my_query type query_ref.
    my_query = get_rt_query().
    my_query->get_state()
    regards

  • BEx-Query results in error in SAPLRRI2 and KFB_FUELLEN_CONST

    Hello,
    I hope anyone has a solution for the following problem.
    When applying the "Calculate with Attributes"-how-to, I got the following error message
    in a BEx-Query. It is reproducable and only occurs if I have a formula A minus B
    (key figure A alone and B alone work and A minus 123 also works; plus or multiply also do not work).
    It occurs before the parameter call, although the parameter is only a global filter.
    Unfortunaltely I had to translate the essential content of the error messages,
    for I only have the German ones.
    In the web I get (The proposal for characteristic ... does not fit to the filter.):
    Es wurde eine Abbruchmeldung gesendet.
    WARNING BRAIN (459): Die Vorschlagswerte für Merkmal ZMLST_USE stimmen mit dem Filter überein
    MSGV1: ZMLST_USE
    ABEND RSBOLAP (000): Programmfehler in Klasse SAPMSSY1 Methode : UNCAUGHT_EXCEPTION
    MSGV1: SAPMSSY1
    MSGV3: UNCAUGHT_EXCEPTION----
    In the query designer I get (Systemerror in program SAPLRRI2 and form KFB_FUELLEN_CONST):
    Abbruch: Systemfehler in Programm SAPLRRI2 und Form KFB_FUELLEN_CONST -01- (Langtext beachten)
    Diagnose
    Dieser interne Fehler ist ein gezielter Abbruch, da ein Programmzustand vorliegt, der nicht vorkommen darf.
    Vorgehen
    Analysieren Sie die Situation, und verständigen Sie SAP.
    Wenn der Abbruch bei der Ausführung einer Query, eines Web Templates oder bei der Interaktion im Planning Modeler aufgetreten und dies reproduzierbar ist, nehmen Sie ein Trace auf (Transaktion RSTT).
    Weitere Informationen zur Aufzeichnung eines Trace finden Sie in der Dokumentation zur Trace-Tool-Umgebung sowie im SAP-Hinweis 899572.
    Has anyone a clue? I use SAP BW 7.0 with a version from last summer.
    Best regards
    Thomas
    P.S. I think the following old note "UNCAUGHT_EXCEPTION and filter of items or input help" (SAP Note Number: 950992) does not apply.
    P.P.S.
    See also thread "Error while executing query on portal-SAPMSSY1 method : UNCAUGHT_EXCEPTION"
    Recommended help are:
    - "rebuilding the query and adding 0FISCVAR last"
    - "standard variable (filter on company code). I change it with another"
    - "reducing the BW OLAP Cache from 5 GB to 1 GB" (we have only 200 MB)
    - "Query Properties in the Variable Sequence Tab and remove any variable that is not being used"
    - At least till Spring 2008 seemed to be a problem in the SAP software, may be still be a problem.
    P.P.P.S.
    Found a workaround to design my query. But I still wonder why this does not work.
    Error message seems not appropriate for the problem, if any.
    Edited by: Thomas Köpp on Mar 10, 2009 3:36 PM

    Hi Thomas,
    I am experiencing exactly the same issue and after debugging my report on RSRT TCODE I get exactly the same exception error message: "KFB_FUELLEN_CONST-01-" on Program: "SAPLRRI2".
    Can you share please how you corrected the issue and/or what was the workarround you performed?
    Thanks in advance

  • Query views are not using OLAP cache

    Hi,
    I am trying to pre-fill the OLAP cache with data from a query so as to improve the performance of query views. 
    I have read several documents on the topic, such as “How to… Performance Tuning with the OLAP Cache” (http://www.sapadvisors.com/resources/Howto...PerformanceTuningwiththeOLAPCache$28pdf$29.pdf)
    As far as I can see, I have followed the instructions and guidelines in detail on how to set up the cache and pre-fill it with data. However, when I run the query views they never use the cache. For example, point 3.4 in the abovementioned document does not correspond with my results.
    I would like some input on what I am doing wrong:
    1. In RSRT I have Cache mode = 1 for the specific query.
    2. The query has no variables, but the following restrictions (in filter): 0CALMONTH = 09.2007, 10.2007, 11.2008 and 12.2007.
    3. I have one query view with the restriction 0CALMONTH = 10.2007, 11.2008 and 12.2007.
    4. I have a second query view, which builds on the same query as the first query view. This second query view has the restriction 0CALMONTH = 11.2008 and 12.2007.
    5. There are no variables in the query.
    6. I run the query. 
    7. I run the first query view, and the second query view immediately after.
    8. I check ST03 and RSRT and see that cache has not been used for either of the query views.
    Looking at point 3.4 in the abovementioned document, I argue that the three criteria have been fulfilled:
    1. Same query ID
    2. The first query view is a superset of the second query view
    3. 0CALMONTH is a part of the drill-down of the first query view.
    Can someone tell me what is wrong with my set-up?
    Kind regards,
    Thor

    You need to use following process of process chain: "Attribute change run (ATTRIBCHAN)". This process needs to be incorporated into your process chains which loads data into provider on top of which your query is based.
    See following links on topic how to build it:
    https://help.sap.com/saphelp_nw73/helpdata/en/4a/5da82c7df51cece10000000a42189b/frameset.htm
    https://help.sap.com/saphelp_nw70ehp1/helpdata/en/9a/33853bbc188f2be10000000a114084/content.htm
    cheers
    m./

  • Export query result to csv using Export Wizard

    Been a decade since I last used Oracle and related tools.
    I had to use Oracle server again, I have a query over multiple tables, I am to run a scheduled script that will spit out the query result as a csv file.
    I started with SQL Developer Export wizard, in step "Specify Data", I am at a loss, where to specify the query itself? I see a Name,Schema,Type input, a text area below, Up,UpAll,Down,DownAll buttons etc etc. Where do I specify my query here? Can someone please help?
    Is this the best way to go about to schedule a data export (query to csv) daily?

    To export a user query rather than a whole table, run it in a worksheet and export using the context menu on the result grid. However none can be scheduled.
    Instead you can look at the SPOOL command and schedule it through SQL*Plus. Any questions can go to the iSQL*Plus and/or SQL And PL/SQL forum.
    Have fun,
    K.

  • BEX Query Changes are not Reflecting in WAD

    Hello SDN Experts,
    I'm  Facing a Typical Weird Issue. We got an Requirement to Create a New Variable in a Exisitng BEX Query. Assume that we have already a Variable on 0VENDOR. So I have Removed that Variabale and Added new Variable which was created by myself. So when I execute the Query I;m gettign displayed the new Variable wihch is working fine.
    But the problem is with WAD. WAD is showing both the old and new Variables. So in selection paramater it is displaying two 0VENDOR variables instead of showing one.
    Could you please Guide me how can the BEX Changes will get reflected in WAD report as well ???
    Your advice are highly appreciated
    Regards,
    Aluri

    Hello Hemanth,
    This issue may be because you only removed variable but didn't change the 'input ready' settings of it.
    Steps, go back to removed variable -- properties --- details -- then deselect 'variable is ready for input' -- save and exit -- try WAD report..
    Hope this will help.
    Thanks.

  • How to ensure that the query results are fetched from the BW acclerator.

    Hi Experts,
    Suppose if i want to execute the query with BIA option, I can achieve it in RSRT .
    1)But is there some query settings or properties where we can make sure that whenever a query(say Q1) is executed, always the data should be fetched from the BIA index.
    2)Suppose the BIA indexing has failed due  to some reasons, will the data be fetched from the previously updated BIA index??
    regards
    akshay

    Hi man,
    1)But is there some query settings or properties where we can make sure that whenever a query(say Q1) is executed, always the data should be fetched from the BIA index.
    If you have built up BIA index on a cube, then every query on the cube or MultiProvider will automatically use BIA index. No additional settings required. You can use the following way to test whether a query is using BIA or not:
    Go to RSRT, input query name, click 'execute and debug' and check 'Display Statistics Data' and 'Do Not Use Cache'. Execute. After the query result press F3, now you should be able to see statistics. There's a tab 'BIA Access'. If you see something there then it means BIA index is used.
    2)Suppose the BIA indexing has failed due to some reasons, will the data be fetched from the previously updated BIA index??
    If BIA rollup is failed, then the last request(s) would not available in reporting and query will use BIA index for earlier requests. You can consider it like aggregate. But if initial fill of BIA failed then you would not be able to use BIA index.
    Regards,
    Frank
    Edited by: Frank Lee on Jul 14, 2009 2:22 PM

  • Query result area on the first row instead of last row

    Hi BI experts,
    I want to display the result of  the BI query at the first row instead of last row.Could somebody help me how to accomplish this.
    I tried with the layout->move result area but could not be possible.
    I need your kind suggetion.
    Thanks.

    hi jyuoti,
    Further, open your query in query designer, look at the query property,  under the tab "rows/columns"
    change the result position of rows to "Below", you can see the preview there itself.
    This should solve your problem.
    Best Regards,
    *Assign points if you find the answer useful.

  • Ps query results to xml using xml link function registry

    In People tools version 8.46 we need something like where the ps query result output is in the form of XML so that it can be used for external system. The catch I cannot use webservices. It is something like opening peoplesoft queires form excel using hyperlink but in this case we need xml. I looked at David Vandiver's Excel XML libraries which open the data in excel but is there something where the hyperlink output is xml using xml link function registry. I have capatured the data in rowset and now need to create mime type of xml to write the data
    thanks in advance
    vinn

    If I understand correctly, you want to use something like Microsoft Excel's web queries to get data from a PeopleSoft query in XML format. I have never done this before, but if I were to implement this, here is what I would do in PT 8.46:
    1. Create an unstructured message in app designer.
    2. Create a user that only has access to the queries you want to expose to Excel
    3. Write synchronous message handler PeopleCode to call SwitchUser to switch to a specific query user rather than the generic integration broker user and execute a query, returning the results in XML (see [Query.RunToRowsest|http://download.oracle.com/docs/cd/E13292_01/pt849pbr0/eng/psbooks/tpcr/htm/tpcr31.htm#d0e113933] for an example).
    4. Call the message through IB using the HTTP GET URL format as defined in PeopleBooks: [http://download.oracle.com/docs/cd/E13292_01/pt849pbr0/eng/psbooks/tibr/book.htm?File=tibr/htm/tibr33.htm#H4026|http://download.oracle.com/docs/cd/E13292_01/pt849pbr0/eng/psbooks/tibr/book.htm?File=tibr/htm/tibr33.htm#H4026].

Maybe you are looking for