Refreshing all queries

Hi All,
I have 5 queries in my workbook.
My requirement is that everytime i refresh a query, all the queries should be refreshed.
Is this possible?
I tried some VBA code like this.
      ' Set Backlog_Range = Range("SAPBEXqueries!SAPBEXq0002")
       'Run "sapbex.xla!SAPBEXrefresh", False, Backlog_Range
'Similar code for all queries.
But this as expected causes an infinite loop.
Is there any solution?
Thanks in advance!
-Arun KK

This was resolved by setting flags and stopping the refresh based on the flag.

Similar Messages

  • BO XI 3.1 LiveOffice VBA macro to refresh all query

    hi,
    we have migrated from BO 6.5 to BO XI 3.1.
    some Business queries have to be manually converted to LiveOffice.
    we still have a issue have we had in 6.5 a button to refresh all queries which a vba function
    the code was the following:
    Public Sub RefreshBO()
                Application.Run ("BQ_Load")
                Application.Run ("BQ_RefreshAll")
    End Sub
    does anybody knows how to do it in BO XI 3.1 ?
    thank you for your help.
    Pascal
    Note :Plateform BO XI 3.1 Windows, BO Enterprise

    You can refresh all objects by executing the appropriate LiveOffice menu item:
    Application.CommandBars(1).Controls("&LiveOffice").Controls(6).Execute
    I.e. CommandBars(1)=application menu; Controls("&LiveOffice")=LiveOffice submenu; Controls(6)=6th item in menu ("Refresh All Objects")

  • Multiple select queries used in Excel BI report ,fetching data from Sharepoint DB(SP2010_Prod_ProjectServer) causing blockage on DB ,when more than one workbook(same copy of Excel BI Report) refreshed using Refresh All option.

    I am using mutiple select queries to fetch data from Project Server 2010 DB(its sharepoint DB) and these queries fetch data in Excel BI report by establishing connection with DB using instance name and all. I have enhance all these select queries and data
    is being fetched in secs. but when more than one copy of same Excel BI report is refreshed using 'Refresh All' option, then these select queries cause blockage on DB.
    Please let me know mitigation for this blockage issue.
    Should I use begin transaction and commit transaction statements/ shared lock statements.
    please reply

    Hi,
    run same query at the same time?

  • Manual refresh of queries in the Web

    Hello,
    in the web the default action following any change to the navigation state of the query-result is that an automatic refresh of the query is performed.
    We want to enter a series of navigation-steps. It would be inefficient for the query
    to automatically refresh each time a navigation-step was entered. Is it possible to halt the auto refresh from executing and instead switch to a manual refresh mode which means that the users can enter a series of navigation-steps and when they are ready, they simply press a refresh button?
    Thanks in advance!
    Regards,
    Birgit.

    Birgit,
    options could be ..
    1. Have the query automatically expand to a specific level for all queries...
    2. Have a prequery window where the selection parameters are specified and then let the user enter the drilldown level for the query and then take the values from this template and then pass the same to the main query as URL parameters .. you can refer the Web API 3.x to find out how to do the same and also search for Command Line URLs.. this option would require some innovative javascript and command Line specifications..
    Arun
    Assign points if useful

  • Refresh individual queries within a workbook in SP20 EHp1 System

    Hi,
    Currently we have upgraded our BI system to EHP1 pack for SP20. Now we are in BI7.01. We have found in SAP release notes for EHP1 like " in BEX 7 analyzer we will able to Refresh individual queries within a workbook:".
    Can you please tell me how to acheive that, as when we are trying to do it refreshes all the sheets.
    Also in Global settings tab " Allow single data provider refresh" is disabled. Kindly tell me step by step procedure to acheive this,
    Thanks

    Hi Krishna,
    Really thanks for your instructions. We have enabled hte "refresh on individual workbooks" in the workbook settings tab adn we are able to see the same in the context menu of the analysis grid.
    Again i have few doubts.
    I can able to see two options as below.
    1. Refresh
    2. Refresh this query.
    What is the difference between this two?. Also when i click the "refresh this query" it shud display the "selections screen of the particular query", But it is not at all showing me a selection screen,
    What i am doing is.. I am simply doing "refresh this query" option that will refresh my screen first adn i am doing change variables.
    That will give me the selection screen of the particular query. If i am not doing so, all workbooks are refreshing,
    Please advice, whether selection screen of the particular query can be shown when clicking "refresh this query".
    Thanks/

  • Use of Variable - Refreshing the Queries in Workbook

    Hi All,
    I have a workbook which contains 5 Queries. All these queries uses the same variable. While I am refreshing all the  queries in the workbook, it pops-up the variable input screen 5 times.
    Here I just want the variable screen appear to be once and the same input be taken to all the queries.
    We are in 3.x.
    In 7.x Analyzer, I know that When you have multiple queries(with variables) embedded in a single workbook, we can use "Change Variables" icon to acheive the same.
    How can I achieve this in 3.5.
    Thanks in advance.
    Siva
    Edited by: Siva Reddy S on Jun 9, 2009 10:32 AM

    Hi Joke,
    Thanks for your reply.
    The option "save and reuse variable values" is something to do with the input values to save and reuse the same for the next time execution.
    Here I just wanted to input the variable at one query and the same value needs to be taken to all the queries. The Variable used in all the queries is the same one.
    Thanks again..
    Any body any inputs.
    Siva

  • Single Selection Prompt for all queries

    Hi All,
    I have 5 queries in my workbook.
    Each query uses some variable which is not used in the other queries.
    So, i get 5 prompts when i run the query.
    This looks very awkward and also my system almost hangs while showing for each prompt.
    Is there any way of showing all the variables in a single prompt?
    Thanks,
    Arun KK

    Hi,
    I found this answer on a message board:
    http://sap.ittoolbox.com/groups/technical-functional/sap-bw/assigning-same-variable-values-for-queries-in-workbook-711943
    There are two answers to your question, depending on whether or not all of the dates are the same info object (i.e., have the same technical name).
    Case 1:  All info objects have the same technical name.
    Use the "refresh all" option:
    Run "SAPBEX.XLA!SAPBEXrefresh", True 'true = refresh all
    BW will use the input from the first set of refresh screen variables for all others.  IF each query have exactly the same refresh screen, you will not see another refresh variable screen.  If not, then BW will stop between queries to ask for more input, only if required. 
    So, the trick would be to define the first query that refreshes in such a way that its variable screen covers everything needed.
    Case 2:  Not all info objects have the same technical name.
    Use the "Save and reuse variable values" option.  You will find this in the query Properties dialog box on the second tab ("Interaction").  Put a check there for all queries except the first one. 
    Set up the workbook so that the first query refreshes by itself
    Run "SAPBEX.XLA!SAPBEXrefresh", False 'False = refresh one only
    Then, after the first query has refreshed, locate the date(s) the user selected and copy those to the ranges for all other date values.  If your installation is BW 3.x, the code below should do the trick.
    It is slightly ineffecient because it will refresh the first query twice.  But, the second refresh will be fast because the results will still be in cache. And, the code to keep it from refreshing the first query twice is not something you really want to mess with.
    Alternatively, instead of using the SAPBEXrefresh, True at the end, you could put in 13 different SAPBEXrefresh, False statements, identifying the other 13 query worksheets individually.
       Run "SAPBEX.xla!SAPBEXrefresh", False, _
           Sheets("firstQueryToRefresh").Range("a cell in the query")
       'locate dates user selected for "0CALMONTH"
       For i = numFilter + 3 To 4 Step -1
           If Range("GS" & i) = "0CALMONTH" Then
               myType = Range("GC" & i)
               myInterval = Range("GD" & i)
               intfirstMonth ("GE" & i)
               extfirstMonth = Range("GF" & i)
               intlastMonth = Range("GG" & i)
               extlastMonth = Range("GH" & i)
               Exit For
           End If
       Next i
       For i = 4 To numFilters + 3
           If Range("GS" & i) = "YCODOCMNT" Or _
               Range("GS" & i) = "YCOSHPMNT" Or _
               Range("GS" & i) = "0CALMONTH" Or _
               Range("GS" & i) = "YCOACCMT" Then
               Range("GC" & i) = myType
               Range("GD" & i) = myInterval
               Range("GE" & i) = intfirstMonth
               Range("GF" & i) = extfirstMonth
               Range("GG" & i) = intlastMonth
               Range("GH" & i) = extlastMonth
           End If
       Next i
       Sheets("SAPBEXqueries").Visible = xlSheetVeryHidden
       Sheets("firstQueryToRefresh").Select
       Application.ScreenUpdating = True
       Run "SAPBEX.xla!SAPBEXrefresh", False
    End Sub
    maybe this will help a bit.
    regards,
    Raymond Baggen
    Uphantis bv

  • Have to refresh multiple queries in a single refresh

    Hi  Gurus,
    Our user want  to refresh multiple queries in a single shot instead of opening multiple times. is there any macros or any other way to acheive that?
    Please help me out in this issue.

    Hi there,
    You can use workbook for that.
    Create a workbook with several queries and in the properties of the workbook, on the tab Variables, choose to display the duplicate variables only once.
    This will display only once the popup pf the variables for all the queries.
    Diogo.

  • Excel 2007 = Refresh All = Error Message "Initialization Data Source Failed"

    Excel 2007 => Data Tab - Refresh All => Error Message "Initialization Data Source Failed
    2nd Error message:
    The following data ranged failed to refresh:  ExternalData1 - Continue to refresh all
    How do I resolve this? Trying to connect to Oracle DB environment 12C

    What will happen if you rebuild the PivotTable/Table ?
    Make sure the external database is available and the Oracle Provider for OLE DB is installed correctly.
    Wind Zhang
    TechNet Community Support

  • In C# is there a way of refreshing query in EXCEL (REFRESH ALL)

    Hi All,
    Need C# code in SSIS Sript task which should refresh all excel data which extracts from a table using Microsoft query.
    Can anyone help at all ?
    Thanks 
    Sri.Tummala

    Hi All,
    Found the code to refresh excel data the above code is saving before refrshing so I added application wait for 20 seconds so that it refrshes first than saves it.
    Microsoft SQL Server Integration Services Script Task
    Write scripts using Microsoft Visual C# 2008.
    The ScriptMain is the entry point class of the script.
    using System;
    using System.Data;
    using Microsoft.SqlServer.Dts.Runtime;
    using System.Windows.Forms;
    using Microsoft.Office.Interop.Excel;
    namespace ST_53932a75e92c44f086535fc017a56e6a.csproj
    [System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]
    public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
    #region VSTA generated code
    enum ScriptResults
    Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
    Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
    #endregion
    The execution engine calls this method when the task executes.
    To access the object model, use the Dts property. Connections, variables, events,
    and logging features are available as members of the Dts property as shown in the following examples.
    To reference a variable, call Dts.Variables["MyCaseSensitiveVariableName"].Value;
    To post a log entry, call Dts.Log("This is my log text", 999, null);
    To fire an event, call Dts.Events.FireInformation(99, "test", "hit the help message", "", 0, true);
    To use the connections collection use something like the following:
    ConnectionManager cm = Dts.Connections.Add("OLEDB");
    cm.ConnectionString = "Data Source=localhost;Initial Catalog=AdventureWorks;Provider=SQLNCLI10;Integrated Security=SSPI;Auto Translate=False;";
    Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
    To open Help, press F1.
    public void Main()
    // TODO: Add your code here
    ExcelRefresh(@"C:\Documents and Settings\ST84879\Desktop\ROBERT_DATA_SET\TEST.xls");
    Dts.TaskResult = (int)ScriptResults.Success;
    private void ExcelRefresh(string Filename)
    object NullValue = System.Reflection.Missing.Value;
    Microsoft.Office.Interop.Excel.Application excelApp = new Microsoft.Office.Interop.Excel.ApplicationClass();
    excelApp.DisplayAlerts = false;
    Microsoft.Office.Interop.Excel.Workbook Workbook = excelApp.Workbooks.Open(
    Filename, NullValue, NullValue, NullValue, NullValue,
    NullValue, NullValue, NullValue, NullValue, NullValue,
    NullValue, NullValue, NullValue, NullValue, NullValue);
    Workbook.RefreshAll();
    System.Threading.Thread.Sleep(20000);
    Workbook.Save();
    Workbook.Close(false, Filename, null);
    excelApp.Quit();
    Workbook = null;
    System.Runtime.InteropServices.Marshal.ReleaseComObject(excelApp);
    Thanks All
    Sri.Tummala

  • Running a "Refresh All" process for our BI reports created with Excel

    Hi folks,
    Using oData within Excel 2013 with Project Server 2013 Online.
    In previous versions of Project Server, we ran the process in PWA>Server Settings to get the OLAP cubes to regenerate periodically.
    Now, in Project Server 2013 ONLINE there are no cubes to generate.  As you know we access and create reports using oData via Excel.  No problem!
    Can we spare the users of these reports from having to manually regenerate their reports by doing a 'Refresh (All)'?
    Instead I was thinking maybe to create and run a script (VBA, etc.) and/ or schedule a task that will open the Excel file and perform a Refresh, save and close the file. 
    Any recommendations, opionions or suggestions appreciated?
    \Spiro Theopoulos PMP, MCITP. Montreal, QC (Canada)

    Spiro,
    To have a "Scheduled Data Refresh" on your BI Reports in Project Online, you need Power BI for Office 365. The exact steps are listed here: http://ppmblog.org/2014/04/20/background-refresh-your-project-online-reports/
    This is the recommended way, if the license cost is not a big deal for your organization.
    If that is not an option, then I guess, the next best method is to create a desktop task to open and publish the reports.
    Cheers,
    Prasanna Adavi, Project MVP
    Blog:
      Podcast:
       Twitter:   
    LinkedIn:
      

  • How to capture all queries in a log file

    I need a way to capture all queries fired by all my 200+ DAO java objects easily
    in a log file easy debugging purpose.
    Any thoughts?

    I don't know, I always suppress the html output since the
    html it generates isn't W3C-valid in any context I'm designing. I
    use swfobject for my flash files -- thanks for the idea, though!
    Does it enumerate all URLs that are embedded in a flash file's
    actionscript? That seems like it can get rather data-heavy?

  • Refresh all worksheet not working in smartview 11.1.2.2.300

    Hi All,
    We have a excelsheet report which contain multiple sheets in it. These all sheets have essbase report using HsGetValue formulas. Now when we are clicking on 'Refresh all worksheet' its not working however single sheet refresh works. Can you anyone please sugget what will be the issue?
    Thanks,

    Hi,
    I didn't understand your first question. Can you please explain it more?
    In smartview log I'm getting below error-
    [2015-02-17T19:07:32][SVC][ERROR:1][SVC10000][SVC][ecid: be2ca10d-c2a6-4146-b8d0-21ec0852f46a,0]Registry write operation failed (System.NullReferenceException): Object reference not set to an instance of an object.
       at B8CEB14D_B26A_48bf_80BC_18D4B75F6D5F.ExtensionUpdater.GetBoolSetting(String strName)
    Thanks,

  • How do I detach all queries in Workbook under 04s BEX?

    BEx versions prior to 04s allows you to select Tools -> All Queries in the Workbook -> Detach
    now however within 04s, its seems this functionality has disappeared?

    hi Greg,
    If you are trying to delete the query assignment in the workbook, then you have to switch to "Design Mode" and the click on the "Analysis Grid" and in "Analysis Grid Properties" window delete Data Provider.
    Hope this helps.
    Bhargava

  • Smartview Refresh All in Protected Worksheet

    Hi All,
    After locked the cells and protected the worksheet. I clicked the icon Refresh All and I discovered the cells are not lock. How can I Refresh All and the cells in the protected worksheet are still lock?
    Thanks,
    Michael

    Limit the refresh to those sheets you need either based on their name or on their index, For Example
    Sub Refrsh()
    'This will refresh the first 3 worksheets of you Workbook.
    Application.ScreenUpdating = False
    For i = 1 To 3
    Sheets(i).Select
    HypMenuVRefresh
    Next i
    Application.ScreenUpdating = True
    End Sub

Maybe you are looking for