Key Concepts Refresher
Simply put, SAP HANA Live uses predelivered content in the form of calculation views for real-time operational reporting. In this chapter, we’ll look first at the real-world scenario again. Then we’ll walk through the history of business information systems to understand the problem posed in this scenario better and determine how using SAP HANA Live addresses this problem. Then, we’ll look at what necessitated SAP HANA Live, similar to Chapter 3, in which we discussed the impact SAP HANA’s fast memory had on systems that traditionally used slower disk memory.
From there, we’ll dive into the architecture of SAP HANA Live, its VDM, its many views, and steps for installation and administration. After we’ve covered these foundational topics, we’ll shift our attention to the primary tools used within SAP HANA Live: SAP HANA Live Browser and SAP HANA Live Extension Assistant. Finally, we’ll discuss the steps for modifying SAP HANA Live information models.
Background Information
Many years ago, SAP only had a single product, called SAP R/3. This offering blossomed into the SAP ERP system that we still use today. SAP ERP did everything for companies, from finances to manufacturing, procurement and sales to delivery, and payroll to stores management. The SAP ERP system was a transactional system, what we now call an online transactional processing (OLTP) system (also called an operational system). All reports were run from within this system, although they tended to be simple “listing” reports.
Over time, the need arose for more complex reports. In response, more advanced analytics and dashboard tools were provided. Through these tools, people learned how to use cubes to analyze data. When developers tried to build these new analytics into the transactional system, they discovered that these new reporting features had a huge impact on the performance of the SAP ERP system. A single reporting user running a large cube could consume more data from the database than hundreds of transactional users. It was unacceptable that a single user could slow the entire system down.
To address performance issues, all reporting data from the transactional system was copied to a newly invented reporting system. The era of data warehouses had arrived. All reporting data is updated from the transactional system to the data warehouse during the night. This way, the performance of the transactional system remained acceptable during the workday. The new data warehouses were called online analytical processing (OLAP) systems, and OLTP and OLAP went their separate ways (see Figure 12.1).
Figure 12.1 Separate OLTP and OLAP Systems
This departure helped the performance of both systems but eventually led to countless other headaches. Reports were always outdated now because yesterday’s data was used for the reports. We could not see what was happening in the OLTP system in real time. People then started using Microsoft Excel spreadsheets to address some of the issues, which in turn led to more problems and risks (e.g., reports that didn’t agree, wrong formulas, and an inability to consolidate information).
[»] Note
Our real-world scenario at the start of the chapter provides a good example in which yesterday’s data cannot address today’s traffic jams.
How did SAP address these new issues with SAP HANA? By introducing SAP HANA Live, which moves the operational reporting functionality from the data warehouse back into the operational system.
A question quite often arises: “Can SAP HANA just replace an entire data warehouse like SAP Business Warehouse (BW)?”
The short answer is: “No, SAP HANA cannot fully replace SAP BW.” Data warehouses are multipurpose. In the real-world scenario we used for this chapter, we only looked at the operational reporting aspects of data warehouses, which are not particularly strong points for such systems. If you had a single operational system with a single warehouse for reporting, you could do everything with SAP HANA—but reality tends to be more complex.
Most companies use their data warehouses to consolidate data from many systems, as shown in Figure 12.2. They use data warehouse features such as the following:
- Data governance
- Preconfigured content in the form of cube definitions and reports
- Data lifecycle management, including data aging and a complete history of business transactions
- Cross-system consistency and integration
- Planning, consolidation, and consumption
Figure 12.2 Data from Multiple Business Systems Consolidated into Data Warehouse for Reporting, Transactional History, and Aging
[+] Tip
It makes no sense to try to get rid of data warehouses completely due to operational reporting issues. A better solution is to focus on addressing the few problematic areas in which data warehouses are not optimal.
Because SAP BW is now primarily used for data warehousing, operational reporting needed to be shifted back to SAP ERP. To enable this functionality, SAP ERP uses SAP HANA as a database. This allows companies to run their operational reports, even with complex analytics, on real-time SAP ERP data directly from the underlying SAP HANA database via information models.
SAP HANA Live is the tool used to install, select, maintain, and modify these information models. SAP HANA Live is not only limited to SAP ERP, but also is available for many other SAP business systems, such as SAP CRM, SAP SCM, SAP Governance, Risk, and Compliance (GRC), and SAP Product Lifecycle Management (PLM).
Some of the benefits of SAP HANA Live include the following:
- Real-time reporting and analytics on up-to-date information.
- SAP HANA does not need to store precalculated aggregates in cubes.
- OLTP and OLAP run in the same system, which can help reduce the total cost of ownership (TCO).
- Open for access by any reporting tool or application.
- Customers and partners can extend it to suit their needs.
Now that you have a better understanding of how SAP HANA Live came to be, the following subsections will dive further into SAP HANA Live’s architecture, virtual data model (VDM), views, installation and administration procedures, and modifications.
Architecture
SAP HANA Live needs an SAP HANA database. Connecting to an SAP HANA database can be achieved in two ways (in this case, we just concentrate on the SAP ERP system, but this also applies to all the other SAP business systems like SAP CRM, SAP SCM, SAP GRC, and SAP PLM; see Figure 12.3):
- SAP HANA as a database
The first option is to migrate an SAP ERP system’s database to SAP HANA. No additional systems are required. This is also known as the integrated scenario. - SAP HANA as a sidecar
The second option is to keep the SAP ERP database and install an SAP HANA system as a sidecar (as discussed in Chapter 3). Then, replicate the required database tables to the SAP HANA system using SAP LT Replication Server (SLT). You can find more information about SLT in Chapter 14. SLT enables real-time replication so that SAP HANA always has the latest data available. For this scenario, you need to install the SLT and SAP HANA systems as well. This is also known as the side-by-side scenario.
Figure 12.3 Architecture Options for SAP HANA Live
After you’ve connected to an SAP HANA database, you can build reports, analytics, and dashboards directly on the SAP HANA Live content. Other applications can also call this content directly.
[»] Note
In both architectural scenarios, SAP HANA Live is installed in the SAP HANA database.
Virtual Data Model
SAP HANA Live content consists primarily of calculation views that are designed, created, and delivered by SAP. These calculation views are built for operational reporting instead of analytical reporting purposes, and therefore use mostly join nodes. The information models are relational rather than dimensional (cube-like), and therefore use the SQL engine rather than the calculation engine. A system administrator loads the SAP HANA Live content into the SAP HANA database. These calculation views are layered in a structure called the SAP HANA Live virtual data model (VDM). SAP HANA Live is structured internally as shown in Figure 12.4.
The VDM consists of the following types of views:
- Private views
These are built directly on the database tables and on other private views. These denormalize the database source data for use in the reuse views. - Reuse views
These structure the data in a way that business processes can use. These views can be reused by other views. - Query views
These can be consumed directly by analytical tools and applications. They are not reused by other views. These views are used when designing reports. - Customer query views
These are created either by copying SAP-provided query views or by creating your own query views. You can add your own filters, variables, or input parameters to these views. You can also expose additional data fields or hide fields that are not required. - Value help views
These are used as lookups (i.e., dropdown lists or filter lists) for selection lists in analytical tools and business applications. They make it easier for users to filter data by providing a list of possible values to choose from. Value help views are not used in other VDM views; they are consumed directly by analytical tools and business applications.
Figure 12.4 SAP HANA Live Virtual Data Model
[+] Tip
You should never call private and reuse views directly.
You can build your reports, analytics, or business applications directly on query views. These can be either SAP-provided query views or custom query views. When you run your report, these query views are called. They in turn call the relevant reuse views, which call the relevant private views, which in turn read the relevant database tables. The value help views are called whenever dropdown lists are used to display possible values that a user can choose from.
[»] Note
It is not recommended to modify any SAP-provided VDM views because all SAP-provided VDM views are overwritten when a newer version of the SAP HANA Live content is installed. There is no mechanism like the one in ABAP, in which the system asks if you want to keep any customer changes.
Therefore, you should always make a copy of a VDM query view to modify, rather than modifying the original.
SAP HANA Live Views
Most of the SAP-provided SAP HANA Live views are calculation views. All the SAP HANA modeling techniques that you’ve learned are relevant to these views. Figure 12.5 shows an example of such a calculation view.
Figure 12.5 SAP-Provided Calculation View (OverallBillingBlockStatus) in SAP HANA Live for SAP ERP
You will notice several characteristics of these calculations views in Figure 12.5:
- They contain several layers (nodes). This is to denormalize the source data. Normalizing data is normal in an OLTP system to improve performance but is not required for analytics.
- There are many joins. These are used to combine reuse views to create the VDM query view.
- The views might have variables, input parameters, and calculated attributes. The use of input parameters has been limited due to the fact that some reporting tools have difficulty using them. Default values are always supplied for the input parameters.
- Calculation views use the SQL engine instead of the OLAP engine. We discussed these engines in Chapter 10. There are several reasons for using the SQL engine instead of the OLAP engine. The main reason is that we are working with data from an OLTP system, which consists of line-level transactions rather than aggregates, so we do not require the features of the OLAP engine. Another good reason is for performance; for example, we do not want to pass data between execution engines.
Installation and Administration
SAP HANA Live is installed in the SAP HANA database. A system administrator will normally install the SAP HANA Live content package.
All SAP HANA Live information can be found at http://help.sap.com/hba.
You will need to define a schema mapping (see Chapter 11) before importing the SAP HANA Live content package. The schema name that SAP used to develop the SAP HANA Live information models will not be the same as the schema name of your source system.
Once you’ve installed SAP HANA Live on an SAP HANA system, you will see the content in the Content folder, under sap · hba, as shown in Figure 12.6. You can explore the calculation views in SAP HANA studio or the SAP HANA web-based development workbench. We do not recommend that you change the views here. All the SAP-provided VDM views are overwritten when a newer version of the SAP HANA Live content is installed. There is no mechanism in place within SAP HANA Live to ask if you want to keep any customer changes, so you could lose all your hard work during an SAP HANA Live update.
Figure 12.6 SAP HANA Live Content Package in SAP HANA Studio
[»] Note
SAP HANA Live has its own release cycles and timelines. SAP HANA Live content updates do not have to correspond to the SAP HANA system update cycles and timelines.
In the sap · hba package, you will also find various web-based tools for working with SAP HANA Live content:
- SAP HANA Live Browser
This tool is used to find the right query views for your reporting needs. - SAP HANA Live Extension Assistant
This tool helps you copy and modify views based on your business requirements.
If you have set up the SAP HANA database in a sidecar configuration, you also need to do the following:
- Install SLT.
- Replicate the relevant tables from the source database to the SAP HANA database. The SAP HANA Live Browser tool will help you select the correct tables for the views you require (see the SAP HANA Live Browser section for more information).
In the SAP documentation, you will also find references to a rapid deployment solution (RDS) for SAP HANA Live. This is an optional consulting service that SAP offers (for a fee) to help you install SAP HANA Live on your SAP systems.
In the next section, we’ll look at the full breadth of SAP HANA Live Brower’s functionality.
SAP HANA Live Browser—Browse and Use Views
The SAP HANA Live Browser tool is a web-based (HTML5) application that enables you to find the correct views for your reporting or analytics requirements. Sometimes, you might need to ask an SAP functional person that knows the source system well to help you find the required views. Fox example, to find sales information in an SAP ERP system, you might need the advice of an SAP Sales and Distribution (SD) consultant.
You can find the SAP HANA Live Browser tool (Figure 12.7) by accessing http://<SAP HANA server hostname>:8000/sap/hana/hba/explorer. (This assumes that the instance number is 00.)
In this section, we will walk through the different areas found in SAP HANA Live, the All Views toolbar, and the SAP HANA Live version for business users.
Areas
We start by looking at the All Views section of the tool (see Figure 12.7).
Figure 12.7 SAP HANA Live Browser
Here you can search for views by typing a part of the name of the view in the Filter field. For each view, you can see the following information:
- View name
- Description of the view
- View category (private, reuse, or query view)
- View type (mostly calculation views)
- To which area of the application the view is applicable
- In which SAP HANA package the view is located
Figure 12.8 shows a partial list of views that we can use for procurement reports.
Figure 12.8 Filter String Entry to Find Views
You can easily mark an SAP HANA Live view as a favorite by clicking on the empty star to the left of the view name (Figure 12.9). From the My Favorites tab in the SAP HANA Live Browser, you can see a list of all your favorite views.
Figure 12.9 Mark SAP HANA Live Views as Favorites
You also can see a list of invalid views (Figure 12.10). Views can appear on this list if they are missing underlying tables or dependent views. Such views will not activate, either.
Figure 12.10 List of Invalid SAP HANA Live Views
All Views Toolbar
You can access many features in SAP HANA Live Browser from a provided toolbar (see Figure 12.11).
Figure 12.11 SAP HANA Live Browser Toolbar
The following functions are available from the toolbar:
- Open Definition
The Open Definition tab (Figure 12.12) shows the metadata of the SAP HANA Live view. These fields are available for your reports and analytics. If you need other fields, you will have to use the SAP HANA Live Extension Assistant.Figure 12.12 Open Definition Tab Showing SAP HANA Live View Metadata
- Open Content
The Open Content tab (Figure 12.13) shows a preview of the data an SAP HANA Live view will produce.Figure 12.13 Show Content Tab Displaying Data Produced by an SAP HANA Live View
- Open Cross Reference
The Open Cross Reference tab (Figure 12.14) shows an interactive and graphical depiction of all the related tables and views used by this specific SAP HANA Live view. You can also see an outline version instead of the graphical version.Figure 12.14 Cross Reference Tab Showing Related Tables and Views Used by This SAP HANA Live View (Graphical Version)
- Tag
The Tag tab (Figure 12.15) allows you to add your own keywords (tags) to describe SAP HANA Live views. You can use these tags to group some SAP HANA Live views that you would like to use in your reporting, analytics, or dashboards. - Generate SLT File
The Generate SLT File icon allows you to generate configurations for SLT in order to replicate only the tables that you require for your reporting or analytics. This function is only required if you are using SAP HANA Live in a sidecar configuration. You will not replicate the entire source system to the SAP HANA database, but only the tables used by the business end users. - Open View in SAP Lumira
and Open View in Analysis Office
The last two tabs on the SAP HANA Live Browser toolbar allow you to open the specified SAP HANA Live view in either SAP Lumira (Figure 12.16) or the SAP Analysis for Office reporting tools. This allows you to create reports easily and quickly.Figure 12.16 Output of an SAP HANA Live View for Sales in SAP Lumira
The SAP HANA Live Browser does not show you the actual models or where they are used in your reports. Use SAP HANA studio or the SAP HANA web-based development workbench to view SAP HANA Live models.
SAP HANA Live Browser for Business Users
Up until now, we have discussed the developer edition of the SAP HANA Live Browser. There is also a business user version of SAP HANA Live Browser available at http://<SAP HANA server host>:8000/sap/hana/hba/explorer/buser.html.
This version only allows you to find a model, preview the content, and open the view in SAP Lumira or SAP BusinessObjects Analysis, edition for Microsoft Office. It is meant for nontechnical users, such as functional consultants or specialists.
Advanced features like generating SLT files, viewing broken models, tagging a model, or opening graphical cross references are not available in the business user edition of the SAP HANA Live Browser.
SAP HANA Live Extension Assistant—Modify Views
Figure 12.5 showed an example of an SAP HANA Live view, which is similar to any other view in SAP HANA. There are two ways to modify SAP HANA Live views.
We can use SAP HANA studio and the SAP HANA web-based development workbench to modify, preview, test, debug, and trace SAP HANA Live information models, similar to all the other SAP HANA views we created in previous chapters.
[+] Tip
Here are some guidelines for creating your own SAP HANA Live views:
Another tool that can be used to modify SAP HANA Live views is the SAP HANA Live Extension Assistant.
Figure 12.17 shows the SAP HANA Live Extension Assistant tool.
Figure 12.17 SAP HANA Live Extension Assistant in SAP HANA Studio
SAP HANA Live views do not expose all their attributes and measures; SAP has carefully chosen a subset of these elements for the most common business processes. However, there are many hidden fields. You can use the SAP HANA Live Extension Assistant to change which fields are hidden or shown in a particular view.
[+] Tip
Don’t delete the fields you’re not using; just mark them as hidden. SAP HANA’s optimization is very good, and hiding a field does not increase the run time of queries.
You can extend reuse and query views, and you can extend a particular view multiple times.
The SAP HANA Live Extension Assistant has a few restrictions that you need to be aware of:
- It cannot extend a query view that contains a union node.
- It cannot extend a query view that contains an aggregation node as one of the middle nodes. An aggregation node as the top node is normal and allowed.
- It cannot extend your own custom views. It only recognizes SAP-delivered views.
[+] Tip
You should not extend SAP-delivered views. Make a copy, and extend that instead.