Business Intelligence in SAP Business One

The semantic layer in the SAP HANA database contains views (models) of operational data. Each view integrates fields from different source tables to model a comprehensive business scenario, for example, financial, logistics, sales, purchasing, and so on. The view insulates the user from the technical details of the underlying tables and the need for joins.
In SAP Business One, insight into key business metrics is extracted using queries on the views and provided to users in real-time through several mechanisms:
- Pervasive analytics dashboards in the user's cockpit or in the sidebar of marketing documents
- Key Performance Indicators(KPIs) in the user's cockpit
- Advanced dashboards in the user's cockpit
- Dashboards created with Crystal Reports Designer
SAP provides pre-built pervasive dashboards, KPIs and advanced dashboards, and partners can create additional pervasive dashboards, KPIs, advanced dashboards, and Crystal dashboards.
Additionally, end users can access the semantic views using the Excel Report and Interactive Analysis Designer add-in for Microsoft Excel to create reports and analyses.
Users can use the SAP Business One Query Generator as well as Crystal Reports to access the views using SQL queries.
Example View: Dimensions and Measures

A view pulls data from multiple tables and calculates results that are used for reporting and analysis. No actual data is held in the view, it is simply a model that structures the data for queries. When the query is run, the data is pulled from the physical tables.
Let us look at a hypothetical calculation view of a sales order transaction in SAP HANA. The view pulls together fields from many tables that are involved in the sales order, including, as you might expect, ORDR, RDR1, OSHP, OCRD, OCPR, OITM, ITM1, and so on.
The view pulls together two types of data: dimensions and measures:
- The dimensional data are the descriptive data such as the document number, business partner code, sales employee, product, date, and so on. This tells you who, when and what but does not give any quantifiable fields.
- The measurable data are the quantifiable fields that can be calculated, such as total amounts, gross profit, tax and quantities. Using a query, you can SUM these fields.
The customer dimension represents the customer attributes referenced in the sales order, such as document number and business partner code. The product dimension represents the item and the characteristics for that item. The date dimension represents various dates such as Document Date, Posting Date and Delivery Date. The sales employee dimension represents the sales employee code in the sales order. Using a query, you can GROUP and SUM document totals by different attributes, such as by business partner or by sales employee, or use the date dimension to aggregate data by time.
To see a full list of the views, reference the how-to guide How to Work with Sematic Layers.
Cockpit Analytics

Pervasive Dashboard

A sample, pervasive dashboard is shown in the slide. The pervasive dashboard is built from a predefined query or calculation view and shows a dimension (business partner code) and a measure (total).
This particular dashboard measures customer opportunities. You can easily create a pervasive dashboard to meet a specific requirement and show the data visually in charts and graphs.
The data in the pervasive dashboard is read-only and is refreshed so that the data presented to the user is always up-to-date.
Once created, you can add the pervasive dashboard to a user's cockpit or to an advanced dashboard. Here, users can mouse over sections in the dashboard to see the dimension values (in this case customer numbers) and the associated measure (in this case the potential value in opportunities).
You can also add actions to allow the user to perform related tasks, such as opening a related document or master data record. In the example the user can launch 3 actions from the context menu.
Later in this course, you will see how to create this pervasive dashboard and actions.
Key Performance Indicator (KPI)

Key performance indicators show a key metric that enables users to evaluate the status of their business at any time. A KPI is built based on a calculation view or a user-defined query that exists in the system. A KPI has a goal and an optional trend and tracks the progress towards the goal.
In the example, the metric is total assets, which is one of the predefined KPIs provided by SAP. The KPI value appears in the center. Colors can be used to show if the KPI is meeting its goal. In this KPI, the green color indicates that this KPI has reached its goal.
In the bottom right, you can the KPI trend. This KPI shows an upward trend. Once again, you can choose colors to indicate whether the trend is good or bad.
In the bottom left, you see the date range for the KPI.
You can display KPI widgets in the user's cockpit or inside an advanced dashboard.
SAP provides a large number of prebuilt KPIs but you can also design your own.
Advanced Dashboard

You can create supplementary cockpits (called advanced dashboards) that allow a user to display data related to a pervasive dashboard or a KPI. The advanced dashboard can have multiple pages and provides quick access to multiple, related business analytics widgets.
The user launches an advanced dashboard from a pervasive dashboard or KPI widget in their cockpit.
In the example you can see the Customer 360 advanced dashboard, which is one of the predefined advanced dashboards from SAP. This dashboard has 4 pages. Note: the Customer 360 dashboard is hardcoded to be launched from an open business partner master data, and is NOT launched from a pervasive dashboard or KPI.
The advanced dashboard is built by selecting pre-existing widgets:
- Pervasive dashboards
- KPIs
- Count widgets, and
- Business partner address and contact information
The dashboards and KPIs in your advanced dashboard can contain actions. Additionally you can add filters to specific widgets to screen out unnecessary data.
Crystal Reports Dashboards

- Crystal Reports dashboards are created in the Crystal Dashboard Designer. Crystal dashboards support visual what-if analysis and multiple panes with multiple data sources.
- A separate Crystal Designer license is needed. You can use other data sources in addition to the SAP HANA views. The dashboards are created externally and need to be imported into SAP Business One.
Authorizations for Viewing and Creating Dashboards

Various authorizations are required to work with analytics. Generally the authorizations are found under the Analytics subject area in the authorizations window.
To create dashboards or KPIs, you need authorization to:
- The Pervasive Analytics Designer tool, and
- The Semantic Layer or semantic layer view
Additionally you need authorization to the base query for the dashboard or KPI. Authorization to queries are provided through categories in the Query Manager. For more information, see the Queries course in this training.
To view the content inside pervasive dashboards and KPIs, users must have authorization for the objects displayed. In addition, users need authorization to the query category or to the semantic layer view, or they will not see data in the dashboard or KPI.
Initializing SAP HANA Analytics

To use the analytical features in SAP Business One, you need to initialize the company database in the SAP Business One Analytics Administration Console. This is normally done during the software installation, in the post-installation activities. For more details, see the SAP Business One Administrator's Guide, version for SAP HANA.
You can access the console using the URL shown. You will be prompted to provide the B1SiteUser password. In the console you can check whether the company is initialized for analytics.
The initialization will deploy the predefined SAP HANA models for Semantics Layers, allowing you to work with KPIs, Pervasive Dashboards, Interactive Analytics, Crystal Report and SAP Lumira.
Note that 40000 is the default port number for all SAP Business One services.
Analytics Reports

Excel Report and Interactive Analysis Designer Add-In

Excel Report and Interactive Analysis Designer add-in allows users to access the semantic layer using a familiar tool - Microsoft Excel.
The add-in is automatically integrated into Microsoft Excel when you install the client component (see the Administrator's Guide for SAP HANA).
The add-in adds two tabs to the Microsoft Excel menu bar:
- On the Excel Report tab, users can create reports intuitively, and in real-time, using the sematic layer views
- On the Interactive Analysis tab, users can use pivot tables to do ad hoc analysis on the semantic layers.
Users can launch Microsoft Excel from the SAP Business One client using the Tools menu, and thereby access the two tabs. Or they can use the Microsoft Windows Start menu. If they use the start menu, they will need to login to the company database and enter the address of the SAP HANA database server.
Important: All users need a valid SAP Business One license appropriate to the type of data they will access, and they need authorizations in SAP Business One to the semantic layer.
To see prerequisites for Microsoft Excel, reference the how to guide "How to Work with Excel Report and Interactive Analysis".
Excel Report Tool

On the Excel Report tab, users can build new reports and charts. They can also open and edit the existing, predefined analytical reports from SAP.
To open or create a report, first choose the data source. You can select from the deployed calculation views in the semantic layer. When you choose a view, the measures and dimensions are shown and you can select and drag measures and dimensions on to the worksheet. For the measure or dimension, it is important to designate the report section as a row group, a column group, or a field. You can also add calculations, parameters and time functions.
Using the repository management function, you can save the new report in one of the analytics categories. Reports can be rerun from the Tools > Excel Report and Interactive Analysis menu in the client.
Steps for creating reports are documented in the how to guide "How to Work with Excel Report and Interactive Analysis".
Interactive Analysis Tool

In contrast to the Excel tab, the Interactive Analysis tab is designed for ad hoc analyses on the semantic layers. Users can create new pivot tables or open existing pivot tables.
For a new pivot table the user selects one of the pre-defined semantic layers as a data source. The measures and dimensions for the selected view appear in the Pivot Table Fields for selection. You can then use the standard pivot table commands.
The measures you choose will appear in the values box and the attributes will appear as row labels. You can move an attribute field from the Row Label box to the Column Label box, and the data will automatically adjust to the new format. You can select fields to use a filter, either by dragging a field to the Report Filter box or by using the filter function of MS Excel pivot tables.
Steps for creating interactive analyses are documented in the how to guide "How to Work with Excel Report and Interactive Analysis".
Analytical Portal

The Analytical Portal publishes reports to users in real time through a web browser.
Reports developed in Crystal Reports and in the Excel Report and Interactive Analysis Designer are available, as well as pre-defined analytical reports from SAP.
It is most useful for users on the move who do not have the SAP Business One client or Microsoft Excel on their device. All users still need a user account on SAP Business One.
Users can access the portal using modern web browsers such as Microsoft Edge, Google Chrome, Firefox and Safari. Microsoft Internet Explorer is not supported.
When a user accesses the portal using the URL shown in the slide, they are redirected using SAML to login to the company using their user account credentials. Users can use single sign-on (SSO) if that is set up.
From the portal a user can:
- Run a Crystal report or Excel report
- Export the report to PDF, HTML or Microsoft Excel
- Set reports as favorites so they display on a separate Favorites tab
- Schedule reports to run automatically
- Distribute reports via email
- Download report results to a local machine
- View the running history for reports that they have run
Report Availability on the Analytical Portal

New reports are made available in the portal as follows:
- Reports created in the Excel Report and Interactive Analysis designer are available in the portal after being saved to SAP Business One. Anyone with authorization for these reports can view them in the Analytic Portal.
- Reports created in Crystal Designer need to be imported into SAP Business One as *.rpt files using the Report and Layout Manager. Then authorized users can view these reports in the Analytic Portal.
Each user only sees the reports for which they are authorized. The user must additionally have authorization to the objects and semantic views contained in the reports. See the General Authorizations topic for information on report authorizations.
Authorizations for Imported Reports

When you import a report using the Report and Layout Manager, you can set the authorization by choosing the Set Authorization button. This opens the Authorizations window where you can select the authorization for the report.
Creating a Pervasive Dashboard

Creating a Pervasive Dashboard

You will see the steps to create a pervasive dashboard with three actions to:
- Perform an enterprise search for customer information
- Open a business partner master
- Open the Customer 360 advanced dashboard
Pervasive Analytics Designer

The Pervasive Analytics Designer is the common tool for creating pervasive dashboards, key performance indicators, and advanced dashboards.
To access the tool, choose the icon in the icon toolbar in the SAP Business One client.
Note: authorizations are required both to the Pervasive Analytics Designer and to the view data.
To create a new pervasive dashboard, choose New Dashboard.
Select the Data Source

The first step to select the base data source.
You can open a list of available data sources by choosing the Select Base Data Source icon.
Data sources for user-created pervasive dashboards can be user-defined queries or semantic layer calculation views.
When you choose a data source, the definition of the data source appears with its results.
Choose Measures and Dimensions

The measures and dimensions from the data source appear on the Value Settings tab. We choose which measures and dimensions to use for the dashboard and drag them to the target area.
In our example, we drag the potential sales amount to the target measures area and drag the BP Code to the target dimensions area. For measures, we have the option to select a calculation method: Sum, Average, or Original. In our example, we will use Sum.
You can sort the data of the measure by ascending or descending. If you have multiple dimensions, you can drag the dimensions up or down to change their display order.
Choose Chart Type

The next step on the Basic Settings tab is to choose a chart type that represent data well for this dashboard.
As you choose the measures and dimensions, a chart will appear on the right side of the Basic Settings tab.
You can use the dropdown to change the chart type. In our example we will use a pie chart.
Strategy Type

The Strategy Type option allows you to use an algorithm to do further analysis on your chart. We will not use this option in our example.
Examples of strategy types are:
- Forecast (only for charts with date dimensions)
- ABC Analysis
- K-means Clustering
Use the drop-down menu to choose a Strategy Type.
Limit Results

Another useful option on the Basic Settings tab is the ability to limit the number of results shown.
Using the Limit to Top bar, you can set the number of results to show between 5 and 300 top values.
In our examples, we will set the chart to display the top 5 business partners in terms of the number of opportunities.
Filters and Parameters

In our business example, we will not use any filters or parameters. However, if you wished to include them, you could do so on the Filter and Parameter tab.
To set up a filter, drag a dimension to the filter area A window appears to edit the filter where you can select a filtering value or range.
To set up a parameter, just drag a dimension over to the parameter area, then specify the default value.
In the graphic, you can see what happens when the sales employee dimension is dragged into the filter area. The Filter Editor opens to allow you to specify filter values.
Save the dashboard and assign to the cockpit

Save the dashboard by using the checkmark. The checkmark with an arrow is for Save As.
You can reopen an existing dashboard for editing by choosing it from the list of dashboards.
Once the dashboard is saved, it can be added to a user's cockpit.
Adding Actions to a Pervasive Dashboard

Actions in Pervasive Dashboards

There are 3 possible actions you can add to a dashboard:
- Open a specific window in SAP Business One
- Trigger the enterprise search
- Open an advanced dashboard
The list of actions appears when the user right-clicks on the data in a pervasive dashboard.
Action 1: Enterprise Search

In our business example, we would like to add an action to launch an Enterprise Search to see all the data associated with a customer whose data appears in the dashboard.
To the right of the chart, there is a link for adding actions. Click on the link to open the Action window. Then choose Actions to be Triggered to open the Edit Action (Dashboard) window appears.
First we choose the radio button for triggering an Enterprise Search.
Then we give the action a name. This is the name a user will see for the action when it appears in the context menu of the dashboard.
Lastly we choose the dimension from our dashboard chart that will supply the value to be used in the search.
In our example, we have only one dimension, the customer dimension, in our chart, therefore we see only one dashboard dimension checkbox available.
Launching the Search Action

When a user views the dashboard in their new role-based cockpit, they can right-click on the chart in the dashboard and launch the Enterprise Search from a list of actions.
The customer code associated with that pie chart section is then passed into the Enterprise Search.
Action 2: Open a window

In our example, we would also like to add an action to open a Business Partner Master window. We want to be able to right-click a section of the pie chart and open the business partner master for that customer.
Once again we open the Edit Action (Dashboard) window.
This time, we choose the radio button to open an SAP Business One window.
Then we give the action a name that will be used in the context menu.
Next we use the dropdown to choose the window we wish to open with the action. In our case we choose the Business Partner Master Data window.
Data Binding for an Action

We need to set up data binding for the action. Data binding allows us to specify which dimension's value to pass to the window.
Because our dashboard displays the percentage of opportunities for each customer, the only dimension with values we can pass is the customer dimension. The main field in the Business Partner master is the Business Partner Code so we choose to pass that value from the chart to the window.
Using the action in a cockpit

- When a user views the dashboard in their new role-based cockpit, the action to open the window will appear in a context menu when a user right-clicks on the graph section of the dashboard.
- When the window opens, it displays the master data for the customer chosen in the chart.
Launching Documents

We saw how to open a window for master data but we can open a window for documents as well. Setting up an action to launch document windows is the same as setting up an action for master data windows. The difference between these objects is that there can be many documents associated with a particular business partner.
As you can see in the graphic on the right, we set up the data binding for the business partner field so that when we launch the action, the business partner value is passed to the sales quotation document window.
On the right we see the result of launching the action from a chart, the sales quotation window is opened along with the List of Sales Quotations for the business partner value.
Action 3: Open an Advanced Dashboard

The sales manager wants his team to be able to open up and view a page with additional information for each customer whose data appears on that chart. We can do that by adding an action to open an advanced dashboard.
An advanced dashboard is basically another set of pages you can open that contain additional pervasive dashboards and key performance indicators. They are used to give additional insight behind results found in a dashboard. For example, when the a sales person spots a customer who has a lot of sales opportunities, she could choose to open an advanced dashboard with additional sales analysis on that customer that could give her a keener insight on sales patterns for that customer and on top selling items that she could promote to them.
The Customer 360 Advanced Dashboard is a predefined advanced dashboard. It contains 4 pages of analytics focused on a specific customer. The pages include general, sales, logistics and receivables information. It is also possible to design a custom advanced dashboard.
Setting up an Advanced Dashboard action

Setting up the action to launch an advanced dashboard is very similar to setting up other actions.
Once again we choose the appropriate radio button. Then we give the action an appropriate name.
We specify which advanced dashboard we wish to launch. Creating and editing the advanced dashboard is done elsewhere in the Pervasive Analytics Designer. In our example, we have already created an advanced dashboard called Sales.
Then we set up data binding to pass the dimensional value to a filter that is used in the dashboard. In this way, we can filter KPIs or pervasive dashboards in the advanced dashboard to show data related only the customer we are interested in.
In our advanced dashboard, we have already set up a filter using the customer code field to narrow the data displayed in the elements of the advanced dashboard. In the data binding area, we choose the Business Partner Code dimension in our dashboard to pass the customer value into the Customer Filter.
Adding a Pervasive Dashboard to a Document Sidebar

Displaying the Dashboard in a Document Sidebar

Imagine that the sales manager wants to see a dashboard that shows opportunity status for business partners by using the sales opportunity analysis analytic view.
This can be done using an action to link the dashboard to the Business Partner Master window. The process for linking the dashboard to an object is similar to the other actions.
Once again you choose the link to open the area where you create and manage actions. Then choose the option to Display Dashboard in Sidebars. This will open a window where you define the action.
Unlike the other types of actions, this action will not appear in a context menu when the dashboard is used in a cockpit.
Create the Dashboard

We create the dashboard using the same process steps we used previously.
We choose the Opportunity Win Rate Analysis for the data source.
For the measure we choose the Number of Opportunities as a Sum, and we add 2 dimensions: the BPCode and the Opportunity Status.
We set the chart type to a Column Chart.
Now we are ready to add the action to embed analytics in the Business Partner Master. Note that you must have a dimension in common between the data source and the linked window.
Create the Link

The next step is to add the action that creates the link.
The only difference is that you choose Display Dashboard in Sidebar.
Otherwise, the process is very similar to creating the actions we created previously.
- Select the Link to SAP Business One window radio button.
- Give a name to the action.
- Select the window where you want the dashboard to appear. In our example, the target window is the Business Partner Master
Data Binding

Next, we need to enter information for data binding.
We select the dimension that corresponds to a field in our target Business One window.
You can add additional data bindings to select more than one dimension and target field for the window.
For our example, we choose the BP code from a list of available dimensions from our data source that are listed in the dropdown in the data binding section. We map the BP code from our data source to the BP Code field in the Business Partner Master window.
Viewing Embedded Analytics

After saving the dashboard, we will be able to view the embedded analysis in the Business Partner master window.
When we open the Business Partner master for one of our customers, we will see a tab on the right of the window allowing us to open analytics.
For each customer record, we see a filtered version of the analysis that shows the number of won, lost and open opportunities for that particular customer.
To view embedded analytics, you must have selected the option in General Settings on the Display tab: Enable sidebar in windows to display recommendations and linked dashboards
Summary
- The semantic layer is an abstraction layer in the SAP HANA database that contains views (models) of operational data.
- Users can access and consume the views using:
- Pervasive analytics dashboards
- Key Performance Indicators (KPIs)
- Advanced dashboards
- Crystal dashboards
- Excel Report and Interactive Analysis Designer
- Views include dimensions (descriptive data) and measures (quantifiable fields that can be calculated).
- The pervasive dashboard is built from a user-defined query or calculation view and shows a dimension (such as business partner code) and a measure (such as total or quantity).
- You can add actions to a pervasive dashboard to open an SAP Business One window, trigger an enterprise search, or open an advanced dashboard containing related analytics. Data binding is used to filter the data in the opened window, the enterprise search or the advanced dashboard.
- An advanced dashboard can contain pervasive dashboards, KPIs, count widgets and business partner address and contact information
- The Analytical Portal enables users to access reports through a web browser.