Skip to Content
author's profile photo Former Member
Former Member

Passing Selection Criteria to another Query

Hello,

Is there a way to link two queries that have the exact same variables such that a refresh of Query1 will automatically pass same selection criteria to Query2 and execute without prompting users with a second selection box?

For example, since our two queries have identical variables, when the workbook is first launched the users are only prompted for selection criteria once. Both queries are then executed for same selection.

However, when Query1 is later refreshed with new selection criteria, Query2 is not refreshed automatically.

I have read some of the "SAPBExSetFilterValue" threads but am not sure if these apply since I want to pass all variable selection crieteria and not a filter value. Also, we have a hierarchy node variable which does not show as a "Filter" text element.

Thanks,

Adam

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 07, 2005 at 03:46 PM

    Hi Adam,

    If you have 2 (or more) queries in the same workbook and you refresh using:

    Run "SAPBEX.XLA!SAPBEXrefresh", True

    then, all queries will be refreshed. If the two (or more) queries have identical variable selection, then the user will see only one variable selection screen. If the two queries (or more) have slightly different selection screens, then the user will only the selections that were not included in the first screen.

    You didn't ask, but just to be complete in the response ...

    Let's say you have 3 queries in the workbook; Q1 has 6 selection criteria, Q2 has 4 criteria of the 6, and Q3 has 2 criteria of the 6. If the queries were embedded in the workbook in order Q1, Q2, Q3 then the user will see a screen with 2 selection criteria as each query refreshes. (2, then 2 more, then 2 more).

    However, if the queries were embedded in the workbook in reverse order ... Q3, Q2, Q1, then the user will see 6 selection criteria in the first screen and no screen will appear when Q2 and Q3 refresh.

    In other words ... BEx will refresh queries in reverse order of when they were embedded in the workbook.

    - Pete

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Peter,

      Thanks for the reply. It was extremely helpful. I wasn't sure if Bex could intelligently prompt for only the unique variables across multiple queries but your reply has confirmed this IS the case.

      Best,

      Adam

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.