Sap Hana Integration With Microsoft Excel
Now that our application is finished inside SAP HANA, and we can see that it performs as expected inside the Studio, we need to be able to deploy it to our users. Asking them to use the Studio is not really practical, and we don’t necessarily want to put the modeling software in the hands of all our users. Reporting in SAP HANA can be done in most of SAP’s BusinessObjects suite of applications, or in tools that can create and consume MDX queries and data.
The simplest of these tools to start with is probably Microsoft Excel. Excel can connect to SAP HANA using the MDX language (a kind of multidimensional SQL) in the form of pivot tables. These in turn allow users to “slice and dice” data as they require, to extract the metrics that they need.
There are (at the time of writing) limitations to the integration with SAP HANA and external reporting tools. These limitations are due to the relative youth of the HANA product, and are being addressed with each successive update to the software. Those listed here are valid for SAP HANA SP04; they may or may not be valid for your version.
Hierarchies (not covered in this book) can only be visualized in Microsoft Excel, not in BusinessObjects.
Prompts can only be used in BusinessObjects BI4. Views that use variables can be used in other tools, but only if the variable has a default value (if you don’t have a default value on the variable, then Excel, notably, will complain that the view has been changed on the server—if your SALES_INCREASE_PERCENT prompt doesn’t have a default value and if we didn’t initially give it one—you might like to edit it now, and enter one if you wish to visualize your simulator in Excel).
The version is specified on the right-hand side of the page, as shown in the following screenshot:
Just install the client software like you installed the Studio, usually to the default location.
Once the software is installed, there is no shortcut created on your desktop, and no entry will be created in your Start menu, so don’t be surprised not to see anything to run.
We’re going to incorporate our sales simulator in Microsoft Excel, so launch Excel.
Go to the Data tab, and click on From Other Sources, then From Data Connection Wizard, as shown in the following screenshot:
Next, select Other/Advanced, then select SAP HANA MDX Provider, and then click Next.
The SAP HANA Login dialog will appear, so enter your host, instance, and login information (the information you needed to connect to SAP HANA with the Studio, back in the Installation section).
Click on Test Connection to validate the connection. If the test succeeds, click on OK to choose the cube to which you want to connect. In Excel, all our analytic and calculation views are considered to the cubes. Choose SIMULATOR and click Next, shown in the following screenshot:
On this screen there’s a Save password in file checkbox—this will avoid having to enter the SAP HANA password every time the Excel file is opened, but the password is stored in the Excel file, which is a little less secure.
Click on the Finish button to create the connection to SAP HANA, and our SIMULATOR view.
On the next screen, you’ll be asked where you want to insert the pivot table; just click on OK, to see the following results: