Sei sulla pagina 1di 34

How to Setup Smart

Business for SoH

Wilson Wei
© 2018 SAP AG. All rights reserved.

SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP


BusinessObjects Explorer, StreamWork, SAP HANA, and other SAP products
and services mentioned herein as well as their respective logos are
trademarks or registered trademarks of SAP AG in Germany and other
countries.

Business Objects and the Business Objects logo, BusinessObjects, Crystal


Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business
Objects products and services mentioned herein as well as their respective
logos are trademarks or registered trademarks of Business Objects Software
Ltd. Business Objects is an SAP company.

Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and
other Sybase products and services mentioned herein as well as their
respective logos are trademarks or registered trademarks of Sybase Inc.
Sybase is an SAP company.
Crossgate, m@gic EDDY, B2B 360°, and B2B 360° Services are registered
trademarks of Crossgate AG in Germany and other countries. Crossgate is an
SAP company.

All other product and service names mentioned are the trademarks of their
respective companies. Data contained in this document serves informational
purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are
provided by SAP AG and its affiliated companies ("SAP Group") for
informational purposes only, without representation or warranty of any
kind, and SAP Group shall not be liable for errors or omissions with respect
to the materials. The only warranties for SAP Group products and services
are those that are set forth in the express warranty statements
accompanying such products and services, if any. Nothing herein should be
construed as constituting an additional warranty.
Document History

Document Version Authored By Description Date Created


1.0 Wilson Wei Fiori White Paper July 6, 2018

2
How to Setup Smart Business for SoH
www.sap.com

TABLE OF CONTENTS

Document History ...................................................................................................................................................... 2


ABSTRACT .....................................................................................................................................................4
Chapter 1 Installing Smart Business for SoH? ............................................................................................................ 4
Chapter 2 Installing and Configuring Web Dispatcher .............................................................................................. 4
Chapter 3 Assigning the roles .................................................................................................................................... 4
Chapter 4 Creating Calculation view and XS OData service in HANA Studio ............................................................. 4
Chapter 5 Creating a KPI and a Tile in Fiori Launchpad ............................................................................................. 4
CHAPTER 1 INSTALLING SMART BUSINESS FOR SOH? .....................................................................................5
1.1 Installing SAP Smart Business Modeler Apps on the Front-End Server ............................................................... 6
1.2 Installing SAP Smart Business Products on SAP HANA Server ............................................................................. 9
CHAPTER 2 INSTALLING AND CONFIGURING WEB DISPATCHER .................................................................... 11
2.1 Installing SAP Web Dispatcher ........................................................................................................................... 11
2.2 Configuring HANA XS internal Web Dispatcher ................................................................................................. 14
2.3 Importing HANA XS server certificate to SAP Web Dispatcher ......................................................................... 15
CHAPTER 3 ASSIGNING THE ROLES .............................................................................................................. 17
3.1 Assigning the PFCG roles in ABAP system.......................................................................................................... 17
3.2 Assigning roles in SAP HANA Studio .................................................................................................................. 17
CHAPTER 4 CREATING CALCULATION VIEW AND XS ODATA SERVICE IN HANA STUDIO .................................. 19
4.1 Creating the Calculation View ........................................................................................................................... 19
4.2 Creating XS OData service ................................................................................................................................. 25
CHAPTER 5 CREATING A KPI AND A TILE IN FIORI LAUNCHPAD ..................................................................... 30
5.1 Creating a KPI ..................................................................................................................................................... 30
Abstract
Chapter 1 Installing Smart Business for SoH?
1.1. Installing SAP Smart Business Modeler Apps on the Front-End Server
1.2. Installing SAP Smart Business Products on SAP HANA Server

Chapter 2 Installing and Configuring Web Dispatcher


2.1 Installing SAP Web Dispatcher
2.2 Configuring HANA XS internal Web Dispatcher
2.3 Importing HANA XS server certificate to SAP Web Dispatcher

Chapter 3 Assigning the roles


3.1 Assigning the PFCG roles in ABAP system
3.2 Assigning roles in SAP HANA Studio

Chapter 4 Creating Calculation view and XS OData service in HANA Studio


4.1 Creating the Calculation View
4.2 Creating XS OData service

Chapter 5 Creating a KPI and a Tile in Fiori Launchpad


5.1 Creating a KPI

4
Chapter 1
Installing Smart Business for SoH?

SAP Smart Business is a framework for exposing strategic (key) and operational performance
indicators (KPIs, OPIs) as Fiori applications without the need to write any code.
Smart Business is released in various flavors depending on the underlying technology platform.
Specifically, there are the following separate Smart Business shipments:
• Smart Business for Suite on Hana (SoH) delivery
• Smart Business for S/4Hana delivery
• Smart Business in SAP Cloud Platform as a service
This document only contains the installation and configuration about the Smart Business for SoH,
if you are using S/4 HANA system, please check the KBA: 2601847 - How to Set up a Smart
Business Tile.

• SAP_UI is 7.5 or higher.


• Install SAP HANA
Requirement • Having a Fiori Launchpad properly configured.
• For more information, please check 2183947 - Smart Business for SoH (Suite on
Hana) delivery

Here are two scenarios for Smart Business for SoH:


• Integrated Scenario
In this scenario, the ABAP back-end server and the SAP HANA XS server share the same SAP HANA
database. No data replication is necessary.

Figure 1: Integrated Scenario

5
• Side-by-Side Scenario
In this scenario, the ABAP back-end server with an underlying anyDB is connected with SAP HANA XS on
an SAP HANA database via data replication.

Figure 2: Side-by-Side Scenario

1.1 Installing SAP Smart Business Modeler Apps on the Front-End Server

1. Download the UISAFND1 100 from the SAP Support Launchpad

Figure 3: Download UI component

6
2. Run transaction code SAINT in the Frontend system and load package from Front End

Figure 4: Load installation package in SAINT


3. Select all the support packages

Figure 5: Select the installation package


4. Start the installation

Figure 6: Start installation


7
5. Install UISAFND1

Figure 7: Install UISAFND1


6. Select the target package level

Figure 8: select the target package level


7. Finish the installation

Figure 9: Finish the installation

8
1.2 Installing SAP Smart Business Products on SAP HANA Server

1. Download the SAP ANALYTICS FOUNDATION 1.0 from SAP Support launchpad

Figure 10: Download SAP ANALYTICS FOUNDATION


2. Open SAP HANA studio, right click the system ID and open the Lifecyle Management page

Figure 11: Open HANA Studio


3. Open the Installation and Update products and Software Components tile

Figure 12: HANA Lifecyle Management


9
4. Upload the downloaded SAP ANALYTICS FOUNDATION

Figure 13: Upload the files


5. Install the components

Figure 14: Install the components


6. Finish the installation

Figure 15: Finish the installation

10
Chapter 2
Installing and Configuring Web Dispatcher
2.1 Installing SAP Web Dispatcher

For Smart Business apps, the XS OData service requests are sent to the HANA XS system directly which will cause
Cross Origin issue as Frontend system and HANA XS have different domain. So, a reverse proxy is required for
Smart Business for SoH.
1. Download SAP Web Dispatcher based on the server OS from SAP Support Launchpad

Figure 16: Download Web Dispatcher


2. Download SAPCAR.exe

Figure 17: Download SAPCAR


3. Create a folder to place the downloaded SAPCAR and SAP Web Dispatcher installation file

Figure 18: Create a folder


11
4. Go to command prompt (search for cmd.exe) and run as Administrator then CD to the folder path
5. Type <sapcar.exe file> -xvf <SAP webdispatcher SAR file> as shown below:

Figure 19: Unzip the installation file


6. Logon to Gateway system and run the transaction code SE38
7. Execute the FM: RSM51000_CHANGE_PARAMETER
8. Check the MSPORT and MSHOST

Figure 20: MSPORT

Figure 21: MSHOST


9. Run sapwebdisp –bootstrap to bootstrap the Web Dispatcher

Figure 22: Bootstrap the Web Dispatcher


12
10. Input the MSHOST and MSPORT then press Enter
11. Leave everything else default
12. Provide password for Web Administration

Figure 23: Bootstrap the Web Dispatcher


13. Find the SAP Web Dispatcher profile sapwebdisp.pfl in the installation folder:

Figure 24: Web Dispatcher profile


13
14. Edit the SAP Web Dispatcher profile:
# Frontend system
wdisp/system_0 = SID=T01, MSHOST=test.sap.com, MSPORT=8101,
SRCURL=/sap/opu/;/sap/bc/ui5_ui5/;/sap/public/bc/ui5_ui5/;/sap/bc/ui2/;/sap/public/bc/ui2/;/sap/pu
blic/bc/themes/, SRCSRV=*:*, SSL_ENCRYPT=0

#HANA
wdisp/system_2 = SID=S4D, XSSRV=https://testhanadb.sap.com:43<instance number>, SRCSRV=*:*,
SRCURL=/sap/hba/;/sap/hana, SSL_ENCRYPT=0

Figure 25: Web Dispatcher profile

2.2 Configuring HANA XS internal Web Dispatcher

15. Open HANA Studio and set the parameter wdisp/filter_xs_internal_uri to "false"

Figure 26: Configure internal Web Dispatcher


16. Right click and kill the web dispatcher service to restart the HANA XS internal Web Dispatcher

Figure 27: Restart the internal Web Dispatcher

14
2.3 Importing HANA XS server certificate to SAP Web Dispatcher

17. Open HANA internal Web Dispatcher admin page:


<protocol>://<host_name>:<port>/sap/hana/xs/wdisp/admin/public/default.html
18. Open SAPSSLS.pse in the PSE Management
19. Export the server certificate

Figure 28: Export certificate


20. Save the certificate to a txt file.

Figure 29: Save the certificate

15
21. Open SAP Web Dispatcher admin page:
<protocol>://<host_name>:<port>/sap/wdisp/admin/public/default.html
22. Open SAPSSLC.pse in the PSE Management
23. Import the HANA server certificate

Figure 30: Save the certificate


24. Paste the HANA server certificate and press Import

Figure 31: Save the certificate


25. The certificate imported successfully

Figure 32: Save the certificate


16
Chapter 3
Assigning the roles
3.1 Assigning the PFCG roles in ABAP system

1. Run transaction code SU01 and assign the following two roles to the user:
• Role /UI2/SAP_KPIFRW5_TCR_S for SAP Smart Business runtime (to all users)
• Role /UI2/SAP_KPIMOD_TCR_S for KPI modeling (to key users, administrators)

Figure 33: Maintain users in SU01

3.2 Assigning roles in SAP HANA Studio

2. Open HANA Studio and find the user in the Users tab
3. Click “+” sign in the Granted Roles tab

Figure 34: Maintain users in HANA Studio

17
4. Assign the following two roles to the user:
• sap.hba.r.sb.core.roles::SAP_SMART_BUSINESS_MODELER for KPI modeling (to key users,
administrators)
• sap.hba.r.sb.core.roles::SAP_SMART_BUSINESS_RUNTIME for SAP Smart Business runtime (to
all users)

Figure 35: Assign the roles in HANA Studio


5. Open Fiori Launchpad via Web dispatcher, the login page for HANA XS will display

Figure 36: Login page for HANA


6. The tile will display correctly

Figure 37: KPI Modeler app


18
Chapter 4
Creating Calculation view and XS OData service in HANA
Studio

A calculation view can perform complex calculations joining different tables, standard views and even other
calculation views as sources. Smart Business for SoH consume calculation view through XS OData service. In this
chapter, I will create a simple XS OData service only for demo purpose to give you a whole image how smart
business works.

4.1 Creating the Calculation View

1. I created a custom schema KPIDEMO and twos tables. SALESDATA table contains the sales data for the
two employees, I will calculate the employee performance.

Figure 38: SALESDATA table


2. EMPLOYEE table contains the master data for the employee

Figure 39: EMPLOYEE table

19
3. Create a package in the content folder
4. Right click the package to create a calculation view

Figure 40: Creating calculation view


5. Give a name for the calculation view
6. Select the Type: Graphical

Figure 41: Creating calculation view

20
7. Add two projection nodes by dragging and dropping Projection nodes from the Nodes lateral bar. These
nodes will be used to join the EMPLOYEE to SALESDATA

Figure 42: Creating projections


8. Right click the Projection to open the menu

Figure 43: Adding objects


21
9. Add the two tables to the projections

Figure 44: Adding objects


10. Add the properties to output for Projection_1

Figure 45: Adding properties to output

22
11. Add the properties to output for Projection_2

Figure 46: Adding properties to output


12. Join these two projections by EMPLOYEEID

Figure 47: Joining two projections


13. Add AMOUNT as aggregated column
14. Set the aggregation type to SUM

Figure 48: Adding properties to output


23
15. Add the other properties to output
16. Activate the calculation view

Figure 49: Activating the view


17. Preview the data to verify the calculation view

Figure 50: Previewing the data

24
4.2 Creating XS OData service

18. Open the SAP HANA Development perspective in SAP HANA Studio

Figure 51: Open SAP HANA Development perspective


19. Create a XS Project

Figure 52: Creating XS Project

25
20. Give the project a name

Figure 53: Creating a project


21. Select a workspace

Figure 54: Creating a project


26
22. Press Finish

Figure 55: Creating a project


23. Right click the project in the Project Explorer to create a XS OData File

Figure 56: Creating a XS OData file

27
24. Give a name for the XS OData service

Figure 57: Creating the XS OData service


25. Create and activate the service:
• The <::> notation specifies the Calculation view as a runtime object that is located within the
<KPIDEMO> package.
• Objects that do not have a unique key in their results (i.e. Calculation views & Analytical views)
requires the generated <local> key entry.
• <Aggregates always> is required for Calculation views and Analytical views where the
information regarding attributes and measures are stored within specific metadata tables.
• <enable OData4SAP> will add the sap:aggregation-role in the metadata

Figure 58: Creating the XS OData service

28
26. Right click the XS OData service to run as a XS service

Figure 59: Running the XS service


27. Add $metadata in the URL to check the metadata of the service

Figure 60: Checking the metadata


28. As this demo service start with the path /KPIDEMO/, so I add the path in the Web Dispatcher profile

Figure 61: Adding path in the Web Dispatcher profile

29
Chapter 5
Creating a KPI and a Tile in Fiori Launchpad
5.1 Creating a KPI

1. Open Fiori Launchpad and select ‘Create KPI’ tile.

Figure 62: Selecting ‘Create KPI’ in the Launchpad


2. In the ‘Create KPI’ screen, input the following:
a. Title: With the title of your view
b. Goal type: This field is used for specifying the goal of our KPI. In this example, we will choose
“Lower is better”.

Figure 63: Creating KPI

30
3. Select the data source and press Activate and Add Evaluation

Figure 64: Choosing data source


4. Set the target based on the business requirement

Figure 65: Setting target

31
5. Save and activate the tile then configure the KPI drill-down

Figure 66: Creating tile


6. Select the dimension

Figure 67: Configuring KPI drill-down

32
7. Configure the visualization type then save

Figure 68: Save KPI drill-down


8. Open the app finder

Figure 69: Adding app to Fiori Launchpad


9. Add the tile to a group

Figure 70: Adding tile to Fiori Launchpad

33
10. The app will display

Figure 71: Fiori Launchpad


11. Click the tile to open the KPI drill-down

Figure 72: Open KPI drill-down

34

Potrebbero piacerti anche