Using the Query Browser

The Query Browser feature differs from the other data connection methods in that we can create a query from a Universe or a BEx Query without leaving SAP BusinessObjects Dashboards. Also, with Query Browser we can bind the result data not only to the spreadsheet but also directly to the components on the canvas.

Getting ready

Open a new SAP BusinessObjects Dashboards file and activate the Query Browser pane from the View menu. You will also need a SAP BusinessObjects BI Platform environment with a Universe that you want to connect to.

If you want to connect to a BEx Query, you need an OLAP Connection to a SAP BW system. In the recipe we will follow the workflow for the Universe. In the There's more... section of this recipe, we will take a look at connecting to a BEx Query.

Note

Note that only .unx Universes are supported. You can use the Information Design Tool to convert .unv Universes to .unx.

How to do it...

  1. Go to the Query Browser pane and click on the Add Query button.
    How to do it...
  2. If you are not already connected to the SAP BusinessObjects BI Platform, a popup will appear asking you to log in. Enter the system and user credentials to log in.
  3. You can choose between selecting a Universe or a BEx query. Choose Universe.
    How to do it...
  4. A list with available Universes appears. Select the Universe you want to use and click Next.
    How to do it...
  5. In the Build Query screen you can define the Universe query. Drag a dimension and a measure to the Result Objects section.
  6. Drag a dimension you want to filter into the Filter Objects Area.
  7. Set this filter to Equal to Prompt. The Edit Prompt screen will pop up. Check Optional prompt. Click OK.
    How to do it...

    Note

    If you are a seasoned Webi developer, you might have noticed that the Build Query screen looks a lot like the Query Panel in Webi. The Webi version has a lot more advanced features though, such as creating a combined query with union, intersection, or minus nestings.

  8. Click the Next button to go to the Preview Query Results screen.
  9. Since we added a prompt, we now need to select a value to fill this prompt to retrieve some preview data. Select a value from the list and click Run.
    How to do it...
  10. The result of the query will be shown now. Click Next.
    How to do it...
  11. The final screen is the Usage Options screen, which looks exactly the same as the Usage tab in the Data Manager. Leave everything with the default values selected and click OK.
  12. The query will be added to the Query Browser pane, including the Result Objects, Filters, and Prompts you selected.
  13. Bind each dimension and measure of the Result Objects area to a column in the spreadsheet.
    How to do it...
  14. Add a Spreadsheet Table component to the canvas. Bind its Display Data field to the cells you bound the dimensions and measures to in the previous step.
    How to do it...
  15. Add a Query Prompt Selector component from the Universe Connectivity category and select the prompt you just created from the Source Prompt menu.

    Tip

    You can also select the prompt from the Query Browser pane and drag the component into the canvas.

    How to do it...
  16. At the bottom of the General tab you can define whether you want the query to be refreshed after the selection has been made, or after clicking the button. Here you can also change the Button Label.
    How to do it...
  17. Preview the dashboard!
    How to do it...

How it works...

The Query Browser gives us the opportunity to connect a dashboard to a Universe without leaving SAP BusinessObjects Dashboards to set up QaaWS, Live Office, or a BI Webservice. Also, we don't have to use the spreadsheet in SAP BusinessObjects Dashboards since we can bind the query results directly to the components.

We used the Query Prompt Selector component to filter the dataset. The component shows a list of values, and after hitting the Apply button the data is refreshed.

From the Query Browser we inserted the output of the query into the spreadsheet, from which we used the data to be displayed in a Spreadsheet Table component. Of course, you can also add, for example, a chart component and use the Query Data option to connect to the result data.

There's more...

In this section, we will look into one more related component and discuss several connectivity options (SAP BW BEx Query, SAP HANA, and SAP ECC).

Query Refresh Button

With the Query Refresh Button component, which is also located in the Universe Connectivity category, you are able to manually refresh the query. After adding this component to the canvas you need to select the queries that should be refreshed after clicking the button.

SAP BW BEx Query

In step 3 of the primary recipe we chose to connect to a Universe instead of a BEx query. The workflow with a BEx query is almost the same:

  1. Instead of choosing Universe, choose BEx query as a data source.
  2. The OLAP Connections that are configured in your SAP BusinessObjects BI Platform are shown now. Select the OLAP Connection to the SAP BW system.
    SAP BW BEx Query

    Note

    Before a BEx query is accessible in the Query Browser, the Allow External Access to this Query setting has to be enabled in the BEx Query Designer. You can find this setting in the Extended tab of the Properties menu of the BEx query.

    SAP BW BEx Query
  3. Now you can select the BEx query by either browsing through the InfoArea or using the search option. As you can see in the following screenshot, only the first BEx query (0PT_MP01_Q0003) is available. The others are grayed out since the External Access option isn't switched on yet.
    SAP BW BEx Query
  4. You can now continue from step 5 of the primary recipe.

Using SAP HANA as a data source

It is possible to use SAP HANA views (attribute, analytical, or calculation view) as a data source for your dashboard. The only thing you need to do is to create a Universe based on a connection to a SAP HANA system. From there you can reach the Universe in the Query Browser in SAP BusinessObjects Dashboards and use it just like any other Universe.

Using SAP ECC tables as a data source

SAP ECC contains its own little SAP BW Client within itself. This provides us with the opportunity to use data directly from SAP ECC tables in SAP BusinessObjects Dashboards. This topic falls a bit outside the scope of this book, so we won't go into detail, but the general steps you have to take are as follows:

  1. Activate the SAP BW client within SAP ECC using the RSRTS_ACTIVATE_R3IS program.
  2. Create an InfoSet using t-code SQ02.
  3. Activate the BI Release property for the InfoSet using t-code SQBWPROP.
  4. Create a BEx Query on this InfoSet with BEx Query Designer.
  5. Create an OLAP Connection in the SAP BusinessObjects Dashboards BI Platform to this BEx Query.
  6. Use the Query Browser to connect to the BEx Query.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset