BEX query runs using parameters entered by user in an Excel spreadsheet

I'm trying to write a macro to automate certain functions for our users.</br>
</br>
Essentially, the users would enter numbers (relating to clients) in column A and e-mail adresses in column B.  A set of reports would run based on the first number entered, then the workbook would be saved and e-mailed to the first address in column B.  This would be repeated for the 2nd number/address and so on...  All Bex reports are in the same workbook.  At this point, I'm having a lot of problems finding code that will fill in the Bex query parameters automatically based on inputs in the spreadsheet.  Here is what I've worked up so far for the macro:</br>
</br>
Option Explicit</br>
</br>
'Macro step 1 u2013 run workbook for client number input and continue</br>
'EXAMPLE u2013 cell A3 = 1008, cell A4 = 1240</br>
'All BW queries should run based on the input given in column A (beginning wth A3).</br>
</br>
</br>
'Macro step 2 u2013 create directory for the new files and save the first file</br>
'     This step will allow the user to save the new files in a new folder in an existing directory, or even to create a new directory:</br>
</br>
Function GetFolderPath() As String</br>
    Dim oShell As Object</br>
    Set oShell = CreateObject("Shell.Application"). _</br>
    BrowseForFolder(0, "Please select folder", 0, "c:
")</br>
    If Not oShell Is Nothing Then</br>
        GetFolderPath = oShell.Items.Item.Path</br>
    Else</br>
        GetFolderPath = vbNullString</br>
    End If</br>
    Set oShell = Nothing</br>
End Function</br>
</br>
Sub Testxl()</br>
    Dim FName As String</br>
    Dim WbName As String</br>
    Dim Search As String</br>
    Dim Prompt As String</br>
    Dim Title As String</br>
    Dim MyDir1 As String</br>
    Dim MyDir2 As String</br>
    Dim Passed As Long</br>
     </br>
On Error GoTo Err:</br>
     </br>
    FName = GetFolderPath</br>
    If FName <> vbNullString Then</br>
        Prompt = "Please Select a FileName"</br>
        Title = "Name"</br>
        Search = InputBox(Prompt, Title)</br>
        If Search = "" Then Exit Sub</br>
    End If</br>
    FName = FName & "\" & Search</br>
    MkDir FName</br>
    ActiveWorkbook.SaveAs FName & "\" & Search & ".xls"</br>
     </br>
     'Test for existence of new folders.files</br>
    Passed = 1</br>
    GetAttr (FName)</br>
    Passed = 2</br>
    GetAttr (FName & "\" & Search & ".xls")</br>
    Passed = 3</br>
    GetAttr (ActiveWorkbook.Path & MyDir1)</br>
    Passed = 4</br>
    GetAttr (ActiveWorkbook.Path & MyDir2)</br>
</br>
    End</br>
     'Sheets("Sheet1").Range("B1").Value = Search **Add if you require the name to be recorded in your spreadsheet</br>
Err:</br>
    Select Case Err</br>
    Case 53:           MsgBox "File/Folder not created. Failed at step " & Passed</br>
    Case 75:    MsgBox "Folder already exists"</br>
    End Select</br>
End Sub</br>
</br>
'Macro step 3 u2013 save workbook</br>
ActiveWorkbook.Save</br>
</br>
'Macro step 4 u2013 e-mail workbook</br>
'EXAMPLE u2013 cell B3 = amay@email, cell B4 = bmay@email</br>
'The workbook should e-mail based on the input given in column B (beginning wth B3).</br>
wb.SendMail  u201Ccell B3u201D</br>
</br>
'Macro step 5 u2013repeat until no inputs remain</br>
'EXAMPLE u2013 cell A3 = 1008, cell A4 = 1240</br>
'Steps 1-4 should repeat for cell A4, then A5 (if necessary) and so on until no more inputs remain.  </br>
</br>
</br>
If anyone has any advice I'd love to try it out.</br>
</br>
Thank you for your time.</br>
Andy
Edited by: AndyMay on Jul 14, 2009 5:08 PM - I inserted html breaks

Option Explicit</br>
</br>
Sub KeyClient()</br>
</br>
'Macro step 1 - filter workbook for client number input and continue</br>
'EXAMPLE - cell B3 = 1008, cell B4 = 2048</br>
'All BW queries should run based on the input given in column B (beginning wth B3).</br>
</br>
'define x and begin loop</br>
Dim i, x As Integer</br>
Dim curCell As Range</br>
    For x = 3 To 22</br>
    Set curCell = Worksheets("Input").Cells(x, 2)</br>
</br>
'stop BW from refreshing until we are finished</br>
    Run "SAPBEX.XLA!SAPBEXPauseOn"</br>
    Run "SAPBEx.XLA!SAPBEXsetFilterValue", curCell, "", Sheets("Client Contribution").Range("C9")</br>
'BW resumes refreshing</br>
    Run "SAPBEX.XLA!SAPBEXPauseOff"</br>

Similar Messages

  • Using PowerShell to add VBA to an Excel spreadsheet

    I have a PowerShell script that creates an Excel spreadsheet and is able to save it.  I also have VBA code that I would like to put into that newly created spreadsheet.
    Is there a way of adding the VBA code into my newly created spreadsheet using PowerShell? 
    Thanks,

    Thanks for the response Alex,
    Where I use to work, we would commonly do this with VBScript and Excel 2003.   Below is an example from the Scripting Repository using VBScript (Add a Macro
    to an Excel Spreadsheet)
    Set objExcel = CreateObject("Excel.Application")
    objExcel.Visible = True
    objExcel.DisplayAlerts = False
    Set objWorkbook = objExcel.Workbooks.Open("C:\scripts\test.xls")
    Set xlmodule = objworkbook.VBProject.VBComponents.Add(1)
    strCode = _
    "sub test()" & vbCr & _
    " msgbox ""Inside the macro"" " & vbCr & _
    "end sub"
    xlmodule.CodeModule.AddFromString strCode
    objWorkbook.SaveAs "c:\scripts\test.xls"
    objExcel.Quit
    We would use a variant of this method to generate static Excel reports from spreadsheets that were linked to external data sources.
    Now...  it's time for me to upgrade my code and get on the PowerShell boat :)  So I have been working on a script that does a similar thing, but there does not appear to be a method of adding a macro to an Excel spreadsheet using PowerShell.  There
    appears to be no way of calling VBProject.VBComponents.Add from within PowerShell.
    I have tried manipulating the data that resides within Excel by directly accessing it from PowerShell, but this has proven to be painfully slow.  What a macro can do in 3 seconds, takes PowerShell 8 hours to do :(
    If it can't be done... then I'll have to revert back to my old ways.  But if it can be done, great!!!  PowerShell has alot more to offer me than VBScript did.

  • How to refresh report data from bex query (BW) with parameters

    Hello,
    i hope someone can help me with my problem. I developed an desktop application, which loads (actual state) a report from the local file system. After setting the parameters, the report should be saved as a pdf file. Loading the report into the ReportDocument object and exporting the report to a pdf works fine. Setting parameters (without) a data source too. But now i can't refresh the data in the reports given by a parameter (e.g. time).
    I know there are two methods to do this. Push and pull. I want to use the pull method, cause my program should exports different reports and i think it should be easier to handle this with this method.
    On my development environment is installed:
    Crystal Reports SP 4
    MS Visual Studio 2010 (coding with C# .NET)
    .NET Framework 4
    SAP Integration Kit
    Crystal Reports for Visual Studio 2010 SP1 - SDK libraries
    Crystal Reports for Visual Studio 2010 SP1 - Runtime 32 bit
    SAP GUI 7.20 (Compilation 3)
    The bex query is enabled for external use from ole db for olap. Do i have forget something else?
    Here is a part of my code:
            public ReportDocument doPullMethod(ReportDocument crReportDocument)
                TableLogOnInfo crTableLogOnInfo = crReportDocument.Database.Tables[0].LogOnInfo;
                ConnectionInfo crConnectionInfo = crTableLogOnInfo.ConnectionInfo;
                crConnectionInfo.Password = "*******";
                crReportDocument.SetDatabaseLogon(crConnectionInfo.UserID, crConnectionInfo.Password, crConnectionInfo.ServerName, crConnectionInfo.DatabaseName);
                MessageBox.Show(crConnectionInfo.UserID + " _ " + crConnectionInfo.Password + " _ " + crConnectionInfo.ServerName + " _ " + crConnectionInfo.DatabaseName);
                for (int i = 0; i < crReportDocument.Database.Tables.Count; i++)
                //    crReportDocument.Database.Tables<i>.ApplyLogOnInfo(crTableLogOnInfo);
                    MessageBox.Show("TestConnectivity: " + crReportDocument.Database.Tables<i>.TestConnectivity());
                return crReportDocument;
    Cause i'm using only one bex query, i know that the SetDatabaseLogon()-method should bring me the same result as the ApplyLogOnInfo()-method SAP Crystal Reports .NET API Guide
    Exists an order which i have to follow? First setting parameter and then set the login informations or backwards? Cause i also get the "Failed to load database information" exception, when i set a parameter and TestConnectivity() returns false.
    Do i have to activate the data refresh manually or will be the data refreshed automatically on export?
    I searched in this forum (.NET - SAP Crystal Reports) and found only this thread which according to my problem:
    [Re: Crystal report connects to BW RFC by .NET;
    The question is assumed answered.

    Hi Robin,
    There is a SAP Integration Kit you need to allow CR to connect to SAP data sources. There isn't one for CR for VS 2010 and I don't believe there are the various extra options available in the SDK, no SDK access to the DB driver.
    Possibly, Check the other post, download and run the app Ludek suggested, it will get the connection info for your report using RAS and then plug the output code into your code and see if that works. It should show the crdb_olap dll is the database driver, assuming that is the connection method you used when designing the report.
    Pay attention to the database dll in the output from that app and verify it is on your PC in: C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86
    If that doesn't work then.....
    The problem is, CR for VS 2010 ( version 13 ) is the runtime for BOE 4.0  ( version 14 ) which includes the Integration kit drivers on install. There is no standalone install of the database drivers. They are installed with CR 2011, which doesn't have a SDK included, CR for VS 2010 is also the Developer version for CR 2011.
    Because of the "custom" connection requirements there is no SDK or access to the BW datasource extra options....
    Also note that CR 2008 is not supported in VS 2010, it should work though as long as you stick to 2.0 -> 3.5 framework, no 4.0 Framework support in CR 2008 or BOE 4.0
    You may want to try the SAP Integration Kit forum to see if anyone has been able to make this work or contact your account manager to verify if there are any plans to do what you are doing....
    Don

  • Bex Query which uses Dynamic columns to display actuals

    Hi Bex experts,
    I have a query issue/question.
    I currently have a Bex query which shows me the the planned values for each period, spanning 6 years into the future. My Key figure columns are defined as follows:
    Value type  = '020'
    Version  = mandatory variable, entered at execution.
    Posting period (FISCPER3)  = These columns are fixed values using periods 1 to 12 for each column.
    Fiscal year (0FISCYEAR) = Each column contains SAP exit for current year, and using the offset +1, +2, +3, +4 etc, when I define the future years coulmns.
    Currency = fixed 'USD'.
    Fiscal year variant = fixed 'Z4'
    The above works fine for plan data.
    I want to now include is:
    Seperate 'Dynamic columns' to show only actuals for period ranges from period one to the previous period (or current period minus 1). Each period should have it's own column for actuals.
    The dynamic actuals columns should be grouped together to the left of the plan columns.
    Actuals are only for current year, so I will still use the SAP EXIT for current year in the column definition.
    Example: If I am currently in period 10, the query should show me actuals from period 1 to period 9 in seperate columns, then continue to show me my plan values columns that I have in place already.
    How can I construct these actuals columns in to my existing query. If you have possible screens shots.
    Thanks, and maximum points will be alotted.

    The way I have approached this you may not like as it involves quite a bit of coding
    12 CKFs
    each CKF adds up 2 RKFs
    So 24 RKFs
    example Column 6 CKF
    Adds Column 6 RKF Actual and Column 6 RKF Plan
    Column 6 RKF Actual contains Actual version + key figure + Period variable column 6 Actual
    Column 6 RKF Plan contains Plan version + key figure + Period Variable column 6 Plan
    Period variable column 6 Actual
    is a cmod variable which reads the entered date
    if the period of entered date is LE 6
    then return period 6 into "Period variable column 6 Actual"
    else put 0 into "Period variable column 6 Actual"
    Period variable column 6 Plan
    is a cmod variable which reads the entered date
    if the period of entered date is LE 6
    then return period 0 into "Period variable column 6 Plan"
    else put 6 into "Period variable column 6 Plan"
    Now what happens is that if you enter period 6 in your selection screen all the Actuals of columns greater than 6 all have period 0 put into their selection so return 0 and all the columns less than or equal to 6 return the values for the fiscal period (ie column 1 gets period 1)
    And in addition all the Plans columns return the value of their column ie for their period for those greater than 6 and for those less than 6 they all return 0
    It's convulted - but you get the idea - and yes it works
    There may be a better way to do it - and I am open to suggestions
    (this does assume that NOTHING is posted to period 0 otherwise it won't work)

  • Using date parameters entered by user within Chart

    I would like to allow the end user to populate a start date and end date which will be used to generate a Pie Chart. I have been following posting How to Create a Chart from a user's date range input ? and I'm having problems.
    I have created two Page Items to allow the user to enter a date range. Both Page Items are set to Date Picker ('DD-MON-RR') The start date has a default value set to the first day of the year by using round(SYSDATE, 'YYYY') The end date defaults to SYSDATE.
    The flash chart series is defined as the following:
    select null link, trunc((months_between(sysdate, c.DATE_OF_BIRTH))/12) label, count(*) value1
    from FAMILY_INTAKE f
    , CLIENT c
    where f.client_id = c.client_id
    AND f.intake_date between nvl(:P19_START_DATE, f.intake_date) AND nvl(:P19_END_DATE, f.intake_date)
    group by trunc((months_between(sysdate, c.DATE_OF_BIRTH))/12)
    When I run the page, the pie chart works; however, it does not seem to use the values used in the date parameters. It seems to be using the null value of f.intake_date. No matter what I set the date parameters to, the results are always the same.
    Any help would be appreciated... Thanks!
    Pam

    How does one operate the page? Select one or two date values and press Go, or something? Then the page branches back to itself? If so, are the date items showing the selected values or getting reset?
    Scott

  • BEX Query - Run time char InfoObjects manipulation for query results

    Hello Experts,
    Iam working on BEX queries to meet following requirements,
    1)  Display only first 2 char of an InfoObject in the query results. Actual infoprovider has 24 char for this InfoObject. Example: Summary code FABCDXXXX.. But we want to show only 'FA' in query results
    2) We split a 120 char description into two 60 char InfoObjects, we need to concatenate the split char into one for query result display
    3) We need to show a specific hierarchy level, nothing before or after. For example: Eighth level for a cost element hierarchy.
    4) We need to show a constant in a column (which is not there in the table)
    We are planning to use both BEX analyzer and Crystal for the reports.
    I read in one of the thread that we can use formula variables/Customer exit for this but iam not very clear, if you know how to do it or if you have any step by step procedure, can you please pass it to me. Thanks in advance for your help.
    Regards,
    Raman

    Thanks for quick response. We have users who need BEX analyzer, is there any way to handle the above requirments for BEX analyzer.

  • Grant permission through dynamic parameters entered by user through web app

    This is my code.
    f1=request.getParameter("URL");
    out.println("parameter f1 ===>"+f1);//user name
    f2=request.getParameter("URL1");
    out.println("parameter f2 ===>"+f2);//table name
    f3=request.getParameter("URL2");
    out.println("parameter f3 ===>"+f3);//privilege name
    sql="GRANT f3 to \"" + f1 + "\""+"on \""+f2+"\"";
    st= con.createStatement();
    st.execute(sql);
    out.println("grant succeeded");
    it is giving error that invalid SQL query.please help in writing this code.Any other method for giving dynamic SQL query for granting permission.

    Welcome to the forum!
    >
    Any other method for giving dynamic SQL query for granting permission.
    >
    You should NOT be using dynamic SQL for issuing grants. Security is something that should be taken seriously and grants should ONLY be given to users that need the permission. The necessary grants should be created and reviewed BEFORE they are executed.
    Best practices are to create scripts containing your DDL and place those scripts in a version control system.
    The scripts can then be executed in sql*plus, sql developer or another tool and the results reviewed to ensure that they executed properly.
    If dynamic SQL is needed you:
    1. create a sql statement manually and test it to make sure it works properly
    2. create the code to assemble similar statements and VIEW the output DDL to make sure that it is valid
    3. add exception handling and security handling to the code so that is can only be used for the intended operations and is not subject to SQL injection.
    4. manually execute the DDL produced by the code to make sure there are no syntax errors.
    Clearly you did not even test your SQL before trying to write code to produce it or you would have known your syntax is invalid.
    >
    sql="GRANT f3 to \"" + f1 + "\""+"on \""f2"\"";
    >
    >
    it is giving error that invalid SQL query.
    >
    Of course it is. That code might try to produce the equivalent of:
    GRANT select to "scott" on "hr.employees";There are SEVERAL errors in that code.
    1. You are enclosing the SCHEMA in double-quotes. That means the actual user name will be treated as case-sensitive. So if someone provides 'scott' it will be considered lower-case. There is NO user "scott" in Oracle unless you created that user yourself and used double-qoutes to preserve the case.
    ALL of the schemas created by Oracle, and most users, are UPPER case. So your code will not find any name if the user supplies a LOWER case or mixed-case value.
    2. You are enclosing the target schema and object name in double quotes. There are two things wrong. The same case issue applies again. And the string "hr.employees" will be treated as ONE value. The proper way to quote such a value is:
    "HR"."EMPLOYEES"3. You have the DDL components in the wrong order, hence it is invalid. The ON clause comes BEFORE the target schema.
    GRANT select to on hr.employees to scott;See the SQL Language doc for the GRANT statement
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_9013.htm
    All of the issues you have demonstrate why you should NOT be using dynamic SQL to do DDL. You don't understand the syntax so you can't write code to implement that syntax.
    The syntax is much more complex than the siimple code you are trying to use.
    Grant statements often need to include "SCHEMA.OBJECT" syntax and your code makes no provision for that.
    DDL needs to be tightly controlled and doing it in code can create huge, gaping security holes.
    Abandon your method and use prepared scripts for the DDL commands you need to execute.

  • BEx query run on multiprovider

    Hi ther,
    i run the query on multiprover, which are based on 3 ods 2005, 2006, 2007, and also based on employe and employe subgroup characteristic, that query does not given any response after 6h runing.
    Please help me i need direction,
    Thanks,
    Rob

    The first question to ask I think is how many records are in this ODS?  6h could be reasonable, or it could be awful.  WIthout knowing data volumes, what you are selecting, and what indexes exist, there is no way to know.
    Can you use SM50 to see if you have the queries are actually running?
    If the result set is large (more than 30,000 rows I believe is what the system considers large in this case)?  MultiProvider queries are normally, unless configured not to, going to start in parallel. So it is probably starting to run a query for 2005, another for 2006, and another for 2007.  If these quereis begin to return too much data, the BW cancels all three queries, the begins to execute them sequentially. 
    So I think you need to do a little leg work in order to get much help beyond guesses.
    Have you reviewed teh Explain Plan?  That should tell you a lot.  If you are not familiar with an Explain Plan, ask your DBA to review it.  It provides a lot of information on how the DB intends to execute the query.

  • BEx query Authorization works in BW but fails in WebI

    Have a BEx query which has 5 fields marked as authorization relevent.  Some of the fields use BW Auth variable in the BEx query, although not all fields do.  The BEx query runs fine and does not throw any authorization failures.  One of the fields is Org Unit, which uses hierarchy node variable.  This field and its user variable exist in two different queries, using different multiprovider. 
    One BEx query and its corresponding universe and WebI report fails when user tries to refresh Org Unit prompt values in WebI, however a secondar query with identical field and variable does not fail.  A trace on BW side does not reveal any authorization failures.  We tried refreshing the universe and even creating a whole new universe, refreshing it, etc.. however the issue is not resolved. 
    Has anyone seen this problem before?  If so, how did you resolve it.

    Hi,
    You need Single sign-on (SSO).
    Regards

  • UNCAUGHT_EXCEPTION "CX_RSR_X_MESSAGE" when runnign BEx Query

    Hi,
    We have a user who is using the Accounts Payable report. User is able to access the BEx query, run the query but when the user is trying to move the company code from free characteristics to rows BEx is throwing the following error:
    An error occurred in the communication with the BW server.
    Due to this, the connection had to be closed
    Detailed Description:
    An exception occurred that was not caught.
    When i checked the ABAP dumps for this user, there is a dump with UNCAUGHT_EXCEPTION "CX_RSR_X_MESSAGE" .
    Can anyone hlep me understand this problem. The reports when executed by me works fine. We tried reinstalling the front end for the user but that did not resolve the problem.If any one has seen this problem for BEx reporting and if any notes are applicable
    Any help is greatly appreciated.
    Regards
    Vijay

    Hi,
    please try this one:
    - clean the system setup, temp files, temp internet files
    - start query designer -> open this query -> check the query
    - executing in BEx web
    - go to RSRT2 -> generate query -> execute in SAP GUI
    - start system trace while executing
    Best regards
    Sven

  • 0ANSALARY problem - BEx Query

    Hi All,
    I have a BEx Query which Uses 0EMPLOYEE & its attributes. 0ANSALARY is one of the attributes that Iam using in the Query. I have created a Role and assigned a Test User and this Query to the role.
    The 0ANSALARY appears as ANSALARY in the query when I open it with the Test User's ID, but it appears normal when I open it with my ID. System says that the Query is syntactically correct too. When I execute the Query from the Test User's ID the 0ANSALARY does not get displayed at all in the result. It looks fine when I run the query with my ID.
    what could be the problem for this strange behaviour and where should I look to resolve this problem? Please let me know.
    Regards,
    -Ravi

    Hi, I have this in the Rows (the Query does not have colums as I have merged them). And, I have not used any Template to design the Role.
    Any ideas?
    Regards,
    -Ravi

  • SAP BW BEx query - WEBi MDX query

    Hi Experts, have we had some discussion on this?
    Does MDX query send by WEBi report to BW use the same program to extract data from BW database?
    One of the option for WEBi report source of data is to build Universe on top of BEx query. Could you share how this process actually happen.
    I think
    - WEBi query will pass parameters that is relevant for BEx query filter of the universe
    - the BEx query will then extract the data (following normal process if we run BEx query independently)
    - if WEBi has further filtering, it will then get the BEx result above and filter it further ..??
    So, how is MDX query come into the picture?
    Or is it:
    - WEBi query and the BEx query will determine what MDX query will be generated, and this MDX query will then fetch the data.
    But why BEx query extract data faster then MDX query?
    Sorry, i am new to this. hope someone could share some light here. In the meantime i continue to real those documentation and try to get some more ideas of what is actually happening.
    Thanks.

    Hi Thanks a lot for pointing this out.
    Did i understand it correctly that BEx query is using a different set of program (platform) to retrieve data compare to MDX query, and not MDX uses those program that is used by BEx to retrieve data from BW database and have extra steps on top of that?
    Can anyone share what is actually happen WEBi MDX query is executed (how the database is hit with SQL, and what are the tools to evaluate the efficiency of the WEBi (or the used BEx). As for BEx we have RSRT to analyze it right.
    And even to test the MDX query using MDXTEST and try to get the data from WEBi report, i found WEBi report still take considerably a lot longer. Why is this so? just because BO is a different system then BW?
    And as it's shared the BO 4.0 is using the same platform as BEx to retrieve data from BW database, does this mean we don't need to care about MDX usage in BW anymore as far as BO data extraction concern?
    Thank you very much.

  • Multi pass bursting of a Crystal report on business view with a bex query

    In BO CMC, we have a group with a list of user.
    The idea is to burst (via the multi pass bursting method) a Crystal report for this list of user with the constraint that this report should only contains data of the store linked to the user.
    Our data comes from a SAP BI cube.
    The link between a Store and a User comes from an other system.
    We have build a bex query and use it as a data source of a Crystal Data Foundation.
    In this Data Foundation we have an other table storing the user ID and the Store ID.
    These 2 tables are linked in this Data Foundation on the Store ID.
    Business element and Business View have also been created on top of this Data Foundation.
    We have impletemented a filter in this Data Foundation to filter out data on the user id. This user id will be filled when bursting the report for all requested users thanks to this function :.
    As a user is linked to one store, the data foundation will filter the data coming from the bex query and show only the data of the user's store.
    We have build a crystal report using the business view created above as data source. We have made some test on a small amount of data and it works, data are correctly filter out and the reports shows only the data from one store.
    But the problem is that we have a lot of stores (more than 600) and doing this way implies that the bex query will always return the data for all the stores as the filter will occurs in the data foundation and not on the bex query.
    We need to find a way to make the bex query returning only the data of the store linked to the user for which we burst the report.
    As we have more than 600 stores this was an idea to avoid managing more than 600 under BO groups or more than 600 different filters.
    This solution do not work when the bex query result set is too large.
    Does anyone has an idea on how to implement such "dynamic" filter in the bex query? The parameter is the user ID but the filter to be applied on the bex query is on the store ID.
    We are under BO XI release 2, Crystal XI Release 2 and we have installed the BO release 2 integration kit for SAP

    Hi,
    what about setting up the data level security in BW ?
    Ingo

  • Variable Selections in BEx Query Variants

    I am trying to save a variant for a BEx query that uses a floating date range.  I want the date range to move with the calendar.  I r/3 this is done with the variable selection.  In BW 3.5, I don't see how this is possible.  I only see options for TVARVC which are user exit selections.  Can someone point me in the right direction.
    Regards,
    Kevin B

    Hi Kevin
    Your requirment is that date range should move with calendar (ex. In first week , the date range should be from 1 to 7 of the current month & in  second week the date range should be from 1 to 15 of current month) ...if it is like this then you can go ahead with - create a variable and do the coding with sydatum (system date ) and embed the required logic. But if your requirement is completely random then you can not use this.
    Hope this helps
    Regards
    Pradip
    (Rewarding points is the way of saying thanks on SDN !!)

  • BO4.1 universe with hierarhies on BEx query

    Hi Team,
    We have a BEx query with some hierarhies on top of it. We are trying to get those hierarhies into Webi but not able to succeed.
    Scenario: we have defined a hierarhy in BW backend on object ZUSE and ZUSGR using the Function module. The Info object ZUSGR is not existing in the Info provider and Multiprovider but only ZUSE is available. Now we are trying to bring the hierarhy defined on ZUSGR. We are able to see the values for ZUSGR in WEBI while selecting the promt but when we drilldown it is going to the different object which is existing in the universe but not to the object ZUSE.
    ZUSE: User ZUSGR: Usergroup; The hierarcy is Usergroup---->User
    Please help me in getting this hierarhy...
    Thank you in advance for your help...
    Best regards,
    Amarnath

    Hello Amarnath ,
    when connecting Web Intelligence to SAP BW there is no need at all to create a Universe. When it comes to the data connectivity from Web Intelligence to SAP BW you can point Web Intelligence directly to a BEx query and use the elements from the BEx query in Web Intelligence.
    Also keep in mind that Web Intelligence will always struggle when it comes to using hierarchies and you might want to take a look at SAP BUsinessObjects Analysis, edition for Microsoft office or Analysis, edition for OLAP
    regards
    Ingo Hilgefort

Maybe you are looking for