20
Real-Time Operational Reporting with SAP HANA Live by Dr. Bjarne Berg and Brandon Harwood Key Concept Understand the use case for SAP HANA Live views in relation to real-time operational reporting on the SAP Business Suite on SAP HANA. This involves installing pre-delivered SAP HANA views and accessing these views from BusinessObjects tools, such as BusinessObjects Explorer, Web Intelligence, and other SAP reporting and analytics tools. Summary/Description Dr. Bjarne Berg and Brandon Harwood show you how to develop and implement SAP HANA Live views for real-time operational reporting. Abstract Get an overview of the hundreds of SAP HANA Live (formerly part of the Composite Analytic Framework or CAF) views that can be used to enable real-time operational reporting and analytics. Using this approach, companies can use standard views directly as data sources for reporting, and can form an alternative foundation for much of the operational reporting currently done in enterprise data warehouses and data marts inside SAP BW. Learning Objectives Explore SAP HANA Live functionality and how it aids in real-time reporting Learn how to build custom SAP HANA views by extending pre-delivered SAP HANA Live views Become familiar with the SAP HANA views and their role in reporting [/] SAP HANA is a combination of hardware and software that optimizes database technologies to exploit the speed of fast in-memory processing and parallel processing capabilities of multi-core systems. SAP HANA Live (formerly known as part of the Composite Analytic Framework or CAF) leverages this technology with hundreds of pre-delivered SAP HANA Live views. These additional views allow companies to quickly start developing real-time operational reporting on top of transactional data from the SAP Business Suite or SAP S/4 transactional systems, without having to extract and move the operational data to data warehouses. It is important to understand that reporting in SAP HANA relies on three primary views types: attribute, analytical, and calculation views. Each view fulfills a specific function, which we explore in detail in this article. SAP HANA Live leverages and extends these views into a virtual data model (VDM), which then can be used in reporting. Currently, SAP provides more than 800 pre-delivered views with SAP HANA Live that you can install on your Business Suite or SAP S/4 system. Note Before beginning to use SAP HANA Live, companies should familiarize themselves with SAP HANA studio from a modeler perspective. They can do this by sending users to either SAP Education’s three-day HA300 Implementation and Modeling class or the two-day HA900 SAP

Real-Time Operational Reporting with SAP HANA Live by …csc-studentweb.lr.edu/swp/Berg/articles/BIexpert/BIEXpertMagazine... · Real-Time Operational Reporting with SAP HANA Live

  • Upload
    vantram

  • View
    238

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Real-Time Operational Reporting with SAP HANA Live by …csc-studentweb.lr.edu/swp/Berg/articles/BIexpert/BIEXpertMagazine... · Real-Time Operational Reporting with SAP HANA Live

Real-Time Operational Reporting with SAP HANA Live

by Dr. Bjarne Berg and Brandon Harwood

Key Concept

Understand the use case for SAP HANA Live views in relation to real-time operational reporting

on the SAP Business Suite on SAP HANA. This involves installing pre-delivered SAP HANA

views and accessing these views from BusinessObjects tools, such as BusinessObjects Explorer,

Web Intelligence, and other SAP reporting and analytics tools.

Summary/Description

Dr. Bjarne Berg and Brandon Harwood show you how to develop and implement SAP HANA

Live views for real-time operational reporting.

Abstract

Get an overview of the hundreds of SAP HANA Live (formerly part of the Composite Analytic

Framework or CAF) views that can be used to enable real-time operational reporting and

analytics. Using this approach, companies can use standard views directly as data sources for

reporting, and can form an alternative foundation for much of the operational reporting currently

done in enterprise data warehouses and data marts inside SAP BW.

Learning Objectives

Explore SAP HANA Live functionality and how it aids in real-time reporting

Learn how to build custom SAP HANA views by extending pre-delivered SAP HANA Live

views

Become familiar with the SAP HANA views and their role in reporting [/]

SAP HANA is a combination of hardware and software that optimizes database technologies to

exploit the speed of fast in-memory processing and parallel processing capabilities of multi-core

systems. SAP HANA Live (formerly known as part of the Composite Analytic Framework or

CAF) leverages this technology with hundreds of pre-delivered SAP HANA Live views. These

additional views allow companies to quickly start developing real-time operational reporting on

top of transactional data from the SAP Business Suite or SAP S/4 transactional systems, without

having to extract and move the operational data to data warehouses.

It is important to understand that reporting in SAP HANA relies on three primary views types:

attribute, analytical, and calculation views. Each view fulfills a specific function, which we

explore in detail in this article. SAP HANA Live leverages and extends these views into a virtual

data model (VDM), which then can be used in reporting. Currently, SAP provides more than 800

pre-delivered views with SAP HANA Live that you can install on your Business Suite or SAP

S/4 system.

Note Before beginning to use SAP HANA Live, companies should familiarize themselves with SAP

HANA studio from a modeler perspective. They can do this by sending users to either SAP

Education’s three-day HA–300 Implementation and Modeling class or the two-day HA–900 SAP

Page 2: Real-Time Operational Reporting with SAP HANA Live by …csc-studentweb.lr.edu/swp/Berg/articles/BIexpert/BIEXpertMagazine... · Real-Time Operational Reporting with SAP HANA Live

HANA Live class. These classes are fundamental since SAP HANA studio is the primary

interface used to administrate, model, and maintain the SAP HANA or SAP HANA Live

systems.

SAP HANA Live is targeted to those companies that run SAP Business Suite applications on

SAP HANA. The views inside can also be combined with data from non-SAP applications. To

understand SAP HANA and SAP HANA Live views in general, you have to know the difference

between the different view types.

Attribute Views

Attribute views consist of one or more tables and are used to qualify the data in some way.

Attribute views are the basic building blocks in the SAP HANA studio modeler. These views are

reusable and are somewhat comparable to dimensions and master data in SAP Business

Warehouse (BW). Most attribute views are built on master data, but are not technically restricted

to this.

When an attribute view is built, most developers want it to conform to many types of

transactions. For example, if you built an attribute view of customer data, you want this view to

contain enough meaningful fields so that it can be joined to other data foundations or

transactions such as sales orders, billing, and payments. In other words, the attribute view can be

reused in ways that simplify the development of analytical views.

In general, attribute views typically contain text, but they can be built to include many different

tables. For example, in Figure 1, customer data is being joined to the sales organization and the

country data tables to get a more complete view of customers.

Page 3: Real-Time Operational Reporting with SAP HANA Live by …csc-studentweb.lr.edu/swp/Berg/articles/BIexpert/BIEXpertMagazine... · Real-Time Operational Reporting with SAP HANA Live

Figure 1 An example of attribute view modeling in SAP HANA studio

Tables are simply added by selecting them from the navigator pane in SAP HANA studio and

dragging and dropping them into the scenario section in the Data Foundation box. Table joins

can be added by clicking and dragging the line options from one table to another in the Details

section.

As you can see in the output section in Figure 1, you can select which fields you want to include

in the attribute view and you can add your own calculated columns. These columns, in turn, are

where calculations are then executed in memory on the database instead of on the application

servers or in queries. This can lead to dramatic performance improvements in reports that access

these views. In other words, the more calculations you push to SAP HANA views, the faster an

application may run.

Finally, filters and new key fields can also be added to make the attribute view as useful as

possible. As shown in Figure 1, all the fields that are exposed in the attribute view are indicated

with an orange circle next to the field in the Details pane.

Analytic Views

Analytic views bring transactional data and attribute views together. Typically, this involves

simply dragging one or more attribute view into the logical join in the Scenario pane and then

adding transactional data to the Data Foundation. Once this is done, the attribute, the views, and

Page 4: Real-Time Operational Reporting with SAP HANA Live by …csc-studentweb.lr.edu/swp/Berg/articles/BIexpert/BIEXpertMagazine... · Real-Time Operational Reporting with SAP HANA Live

the data in the Data Foundation can be joined by clicking and dragging the fields you want to

join from the various views and tables. Most people quickly find this very intuitive. For example,

in Figure 2, the products and customer attribute views are being joined with sales orders to

create analytical views.

Figure 2 Example of analytical view modeling in SAP HANA studio

Experienced BW developers will find that this is logically very similar to dimensional modeling

in an InfoCube. Once the view is validated and saved, it is instantly available for reporting to

those who have been granted access. The analytical view can then be consumed by most

BusinessObjects tools, as well as other third-party tools.

Calculation Views

The calculation view is the foundation of SAP HANA Live. Actually, SAP HANA Live is based

on virtual data models (VDMs). These models are comprised of several reusable calculation

views that can be combined with both attribute and analytic views. By doing so, calculation

views combine several analytic views (with many fact tables) into one reportable source. For

example, you can see an illustration of the basic principles of a calculation view in Figure 3.

Figure 3 Schematics of a calculation view

A fundamental benefit of this arrangement is that calculation views that make up VDMs can be

Page 5: Real-Time Operational Reporting with SAP HANA Live by …csc-studentweb.lr.edu/swp/Berg/articles/BIexpert/BIEXpertMagazine... · Real-Time Operational Reporting with SAP HANA Live

modified and extended to include custom fields and tables as necessary. For example, if you

have added a new Z-field or table in the Business Suite, they will not be found in the standard

SAP HANA Live calculation views. These have to be added as an extension.

To avoid affecting the many sub-components in the VDMs, you have to cover some basics

before beginning any enhancements. For example, when creating a new information view within

SAP HANA studio, there is a Copy From: option to that you should select (Figure 4). By using

this option, you can copy a standard pre-delivered SAP HANA Live view and then extend it.

Figure 4 Adding a new calculation view

SAP offers a tool to that assists with the view copying and extension process (available since

mid-2014) called SAP Live Extension Assistant. This tool automates much of the process,

thereby reducing the effort required to add additional fields to your SAP HANA view. Using this

tool enables you to copy and extend reuse and query views within SAP HANA Live. Simply

right-click the view you would like to copy and select Create New Extension View. This displays

all of the underlying fields where you can select those that need to be included in the reuse and

query view outputs (Figure 5).

Page 6: Real-Time Operational Reporting with SAP HANA Live by …csc-studentweb.lr.edu/swp/Berg/articles/BIexpert/BIEXpertMagazine... · Real-Time Operational Reporting with SAP HANA Live

Figure 5 The SAP HANA extensibility assistant tool

Copying the view in this way assures that you are not impacting others using the standard view,

and also speeds up the development process. This way, you only have to focus on the additions

you are making and do not have to know all the underlying complexity that may exist in the

views (some can have eight to 10 nested views and custom joins).

Another feature of SAP HANA Live is that SAP has developed more than 800 views that are

delivered with this tool. These predefined views can be copied and customized to suit most

specific reporting needs of a company. Although most companies find these very useful, it is not

abnormal to still have a need to build or extend 10 percent to 20 percent more views to meet the

requirements of specific reporting and custom processes (i.e., for Profitability Analysis [CO-

PA]).

Virtual Data Models

VDMs take the foundational views of SAP HANA and categorize them into several view types,

including private views, reuse views, and query views.

Private views are the most basic view type that directly use SAP tables. Reuse views are those

views created by combining private views and other composite tables (like those illustrated in

Figure 3). Finally, the query views are one or more reuse views joined together to report on

various business scenarios. Normally, these query views are directly used for reporting. As of

October 2015, there were 242 query views available for reporting straight out-of-the-box when

installing SAP HANA Live.

SAP HANA Live Browser

Page 7: Real-Time Operational Reporting with SAP HANA Live by …csc-studentweb.lr.edu/swp/Berg/articles/BIexpert/BIEXpertMagazine... · Real-Time Operational Reporting with SAP HANA Live

To make it easier to locate and understand the views, SAP has created an SAP HANA Live

browser tool (Figure 6). Basically, this web page provides information about all the content

available after you have installed SAP HANA Live on your transaction system. The HANA Live

browser can be accessed by navigating to

http://<WebServerHost>:80<SAPHANAinstance>/sap/hba/explorer/index.html in your web

browser.

Figure 6 The SAP HANA Live browser

This browser tool allows you to search for available views and see how they are built. For

example, in Figure 6, the focus is on MM - Materials Management (see the left selection panel).

As you can see, this allows us to see all the available views in the different categories. For

reporting, you would be particularly interested in the query views.

Reporting on SAP HANA Live with BusinessObjects

In general, reporting in the SAP BusinessObjects suite is done on top of a universe when

consuming SAP HANA Live data. The universe layer provides a customizable semantic layer

between the SAP HANA calculation views and the end-reporting tool. In order to use the real-

time reporting capabilities of SAP HANA Live, the query views are used straight on top of the

Business Suite and no data is moved to an enterprise data warehouse (EDW) data mart (like it is

done in SAP BW).

It is important to note that some of the newer SAP data visualization and reporting tools (such as

Page 8: Real-Time Operational Reporting with SAP HANA Live by …csc-studentweb.lr.edu/swp/Berg/articles/BIexpert/BIEXpertMagazine... · Real-Time Operational Reporting with SAP HANA Live

SAP Lumira) have native connectivity to SAP HANA and can skip the need to connect through a

BusinessObjects universe, allowing you to connect directly to the views. This direct connection

to SAP HANA query views can allow for less latency in reporting, which means even faster

front-end execution of reports and visualizations. However, other more traditional

BusinessObjects tools will normally consume the SAP HANA Live views through a universe.

As of BI 4.1, SAP has included a new option in the Information Design Tool (IDT) to allow you

to directly convert an SAP HANA view into a deployable universe. This dramatically increases

the speed of the deployment of the views into BI. Most of the hundreds of query views can be

exposed in as little as a few days’ work, making the deployment of SAP HANA Live with

BusinessObjects tools very efficient. As we look at the step-by-step process for deploying the

views into a universe, it is important to note that this feature is only available in the 4.1 and

higher release of the IDT.

Creating a HANA Universe

First, begin by creating a new project folder in the IDT. Then right-click and select New > SAP

HANA Business Layer from the context-menu options (not shown). This opens the screen shown

in Figure 7.

Figure 7 Add a new business layer in the IDT for SAP HANA Live-based universes

You are prompted to give the business layer a name as well as to define the name of the data

foundation that is being created. We recommend that the suffix BL or DF be added to the end of

the business layer and data foundation names, respectively. This helps distinguish these different

universe components quickly.

Click the Next button and, in the screen that opens (Figure 8), select the applicable connection to

your SAP HANA Live system. Notice here that this connection is a .cnx type. CNX connection

types are local connections that are not stored in the BusinessObjects connection repository. This

connection type cannot be used in reports that are published to the BusinessObjects BI 4.1

platform since users cannot be authorized.

Page 9: Real-Time Operational Reporting with SAP HANA Live by …csc-studentweb.lr.edu/swp/Berg/articles/BIexpert/BIEXpertMagazine... · Real-Time Operational Reporting with SAP HANA Live

Figure 8 Add a connection in the IDT

Select the check box next to your desired connection, in this case, DEMO.cnx then click the

Next button to complete the connection change process in Figure 9.

Figure 9 Add a secure .cns connection in the IDT

You also need to create a secure .cns connection within the BusinessObjects connection

repository (Figure 9) to enable reports to be authored and shared on this universe within the

BusinessObjects 4.1 platform. Once this connection is defined, you can change your SAP HANA

Live connection to point to the new .cns connection in the repository. Click the Finish button and

the screen in Figure 10 opens.

Page 10: Real-Time Operational Reporting with SAP HANA Live by …csc-studentweb.lr.edu/swp/Berg/articles/BIexpert/BIEXpertMagazine... · Real-Time Operational Reporting with SAP HANA Live

Figure 10 Connect the business layer in the IDT to a SAP HANA Live query view

After you have completed the connection change, right click your local project and select New

HANA Business Layer from the context menu options. Next, with this connection established,

select the SAP HANA Live view on which you would like to create the universe. In our

example, we want to connect to the pre-delivered SAP HANA Live query view called

SalesOrderQuery that we found in the SAP HANA browser (Figure 10). Select the view and

click the Finish button to complete the creation steps for SAP HANA business layer for your

universe.

Publishing a Universe

The next step is to publish this new universe to the BusinessObjects repository so that the

developers and power users can access it directly. To do that, right-click the new SAP HANA

business layer and select Publish > To a repository… (Figure 11). After publishing is completed,

this universe based on the SAP HANA Live query view is available for consumption in any of

the SAP BusinessObjects reporting tools by power users and developers.

Page 11: Real-Time Operational Reporting with SAP HANA Live by …csc-studentweb.lr.edu/swp/Berg/articles/BIexpert/BIEXpertMagazine... · Real-Time Operational Reporting with SAP HANA Live

Figure 11 Publish a universe based on a SAP HANA Live view to a BusinessObjects repository

This method of exposing SAP HANA query views is an efficient way of moving this data to the

reporting tools, but it does not come without some custom configuration. By default, the universe

settings do not enable query stripping and limit the row count that can be returned by the

universe. It is therefore very important that you change these settings in the query properties

section in the IDT (Figure 12).

Page 12: Real-Time Operational Reporting with SAP HANA Live by …csc-studentweb.lr.edu/swp/Berg/articles/BIexpert/BIEXpertMagazine... · Real-Time Operational Reporting with SAP HANA Live

Figure 12 Change the query settings in the IDT for SAP HANA Live view-based universes

Alternatives to Using Universes

As an alternative to using BusinessObjects universes, certain SAP reporting tools, such as

Lumira, Design Studio, and Analysis for Office can natively consume SAP HANA views (a

better option than universes, in most cases). This means that a universe is not required and data

can be consumed directly from the underlying SAP HANA system through the SAP HANA Live

views and other views you might have created or extended. The first step to connect to an SAP

HANA view with Lumira is to create a new document and select your data source type (Figure

13).

Page 13: Real-Time Operational Reporting with SAP HANA Live by …csc-studentweb.lr.edu/swp/Berg/articles/BIexpert/BIEXpertMagazine... · Real-Time Operational Reporting with SAP HANA Live

Figure 13 Add a connection in Lumira to SAP HANA Live views

Once you have selected the SAP HANA option, you need to log in to the system with your

access credentials (user name and password). (These are the credentials you got from your

security team that is monitoring and administrating the SAP HANA system in your

organization.) Then click the Next button, which opens the screen in Figure 14.

Figure 14 Add a connection in Lumira to the SAP HANA Live views

Next, select the SAP HANA view you would like to use as the basis of your Lumira analysis

Page 14: Real-Time Operational Reporting with SAP HANA Live by …csc-studentweb.lr.edu/swp/Berg/articles/BIexpert/BIEXpertMagazine... · Real-Time Operational Reporting with SAP HANA Live

(Figure 14). In this case, use the same SalesOrderQuery view that you built the BusinessObjects

universe on previously, to illustrate the query view’s versatility.

After selecting the view, Lumira displays the dimensions and measures associated with that view

(Figure 15). By default, all dimensions and measures are selected for use in the report. However,

these dimensions and measures can be deselected, if necessary.

Figure 15 Select fields from the SAP HANA Live views to use in Lumira

After you have selected the fields to use in your data visualizations in Lumira, complete the

addition of the new SAP HANA Live dataset by clicking the Create button. The dataset is now

accessible within Lumira where it can be manipulated as if it were a universe. This means that all

normal functionality, such as custom calculated fields, custom hierarchies, and other data

formatting options, are available.

It is important to note that if a calculation is used by many users and is consistent across the

organization, it is often better to add new calculated fields directly in the SAP HANA Live view

instead of in Lumira. This is because of the much faster speed offered by SAP HANA relative to

application servers.

This method of connecting to the views from SAP HANA Live streams and provides access to

the data in real time. As a result, data is updated after every refresh, directly from the

transactional data in the Business Suite on SAP HANA. Users now have the benefits of fast

performance, merged with the simplicity of graphically analyzing data in Lumira, plus the ability

to add from a vast number of fields now exposed to the front-end tool (Figure 16).

Page 15: Real-Time Operational Reporting with SAP HANA Live by …csc-studentweb.lr.edu/swp/Berg/articles/BIexpert/BIEXpertMagazine... · Real-Time Operational Reporting with SAP HANA Live

Figure 16 Accessing real-time data from SAP HANA Live views in Lumira

Modifying SAP HANA Live Views [head 2]

It is possible to modify and extend any of the 800 pre-delivered views that come as a part of SAP

HANA Live. The most common use case is to extend the views to add custom fields that may be

proprietary to your specific business. The first step to extend a SAP HANA Live view is to find

the base view you would like to use as a basis for the extended view. This information is found

in the SAP HANA Live browser (Figure 6). Once you locate the view on which you want to

base your extensions, you are ready to begin the process.

In SAP HANA studio, right-click the package where you would like to store this custom view,

select New, and then select Calculation View from the context-menu options. In the New

Information View window that opens (Figure 17), select the Copy From check box and click the

Browse … button to locate and select the view you would like to use (Figure 18).

Page 16: Real-Time Operational Reporting with SAP HANA Live by …csc-studentweb.lr.edu/swp/Berg/articles/BIexpert/BIEXpertMagazine... · Real-Time Operational Reporting with SAP HANA Live

Figure 17 Create a new information view

Figure 18 Navigate to the view

Once you select your view, it is important to take note of the view’s Data Category. The view’s

Data Category needs to be set as a Cube to ensure it is visible to the BusinessObjects reporting

tools (Figure 19).

Page 17: Real-Time Operational Reporting with SAP HANA Live by …csc-studentweb.lr.edu/swp/Berg/articles/BIexpert/BIEXpertMagazine... · Real-Time Operational Reporting with SAP HANA Live

Figure 19 Set the Data Category view

After opening the view and setting the Data Category, you can add any fields that you want to

the semantic layer. A list of available fields is presented that can be propagated to the reporting

layer. In this example, extend the SalesOrderQuery to include SalesDistrict. First, select

SalesDistrict and right-click to add this field to the output. Then, to add the SalesDistrict field to

the output layers, right-click SalesDistrict again and select the Propagate to Semantics context-

menu option (Figure 20).

Figure 20 Add a field to an existing view

To complete the process of adding the new field you need to add a new join to the view. Click

the join icon (boxed in green in Figure 21), then drag and drop the new SalesDistrict field into

the join.

Page 18: Real-Time Operational Reporting with SAP HANA Live by …csc-studentweb.lr.edu/swp/Berg/articles/BIexpert/BIEXpertMagazine... · Real-Time Operational Reporting with SAP HANA Live

Figure 21 Add a join

After this join has been added to the view, it needs to be reconnected to the data flow and then

propagated to the semantics layer. The join type is also defined in this step. This includes the join

cardinality as well as the join type; in the case, a left outer join. Since only a single field is being

adding to the view, the join only consists of two items, the SAPClient and SalesDistrict (Figure

22).

Page 19: Real-Time Operational Reporting with SAP HANA Live by …csc-studentweb.lr.edu/swp/Berg/articles/BIexpert/BIEXpertMagazine... · Real-Time Operational Reporting with SAP HANA Live

Figure 22 Define the join

Now that the SalesDistrict join is complete, you need to propagate the new field to the semantics

layer. Right-click the SalesDistrict field in the join, and select Propagate to Semantics from the

context-menu options (Figure 23). When prompted, select the OK button to confirm that that

new field has been propagated upwards to the aggregation and semantic layers.

Page 20: Real-Time Operational Reporting with SAP HANA Live by …csc-studentweb.lr.edu/swp/Berg/articles/BIexpert/BIEXpertMagazine... · Real-Time Operational Reporting with SAP HANA Live

Figure 23 Propagate the new field

The view has been extended with the new field from the transaction system. It can now be

consumed in the BusinessObjects reporting tool suite after it has been published in the IDT to a

universe or to Lumira via direct SAP HANA connections.

Conclusion

SAP HANA Live is a new product offering for most organizations using SAP. However, the

potential use of the content in the views it provides are far reaching. Some organizations may

simply choose to push most of their real-time operational reporting into this tool, thereby

reducing the need for moving all operational data into SAP BW.

It also reduces the need for faster ETL processes to get access to real-time analytics. The data is

simply not moved at all, and stays inside the transaction system. In other words, the EDW can

become what it was intended to be: a platform for planning, budgeting, forecasting,

consolidation, summarized management reports, and what-if analysis. At the same time,

operational reporting goes back to the transaction system where it belongs. In other words, with

SAP HANA Live you can take advantage of the dramatic performance improvements of the SAP

HANA database while simplifying the reporting landscape, thereby reducing data latency

between systems and potentially shrinking the footprint of many EDWs.