You are on page 1of 30

Extending a SAP HANA Live view Example

Applies to:
SAP HANA Live apps

Summary
This document provides an example of how to extend a SAP HANA Live view. It also covers creating an
OData service for the extended view and incorporating it into a newly-created KPI.

Author:
Marcus Behrens

Company:
SAP

Created on: 05 November 2014

Author Bio
Product Manager, AI PO Mobile & Cross Product Services

Table of Contents
Pre-requisites ...................................................................................................................................................... 3
Procedure ........................................................................................................................................................... 3
Related Content ................................................................................................................................................ 29
Copyright........................................................................................................................................................... 30

Pre-requisites
1. SAP HANA Live content has been installed and configured on the HANA system
2. You have a user/password with developer privileges
3. You are able to use Smart Business framework

Procedure
1. Add your HANA system, user, and passwords in SAP HANA Studio.
2. Create a new package as follows:

3. Add a new calculation view to this package.


4. To do this, copy from one provided in Hana Live:

5. Explore the view and add a new calculated column for Aggregation.

6. In the new column use a formula to calculate the new value, for example.

7. Then save and activate the new view. Try out the new view by looking at test data:

8. In this example, the calculated column looks like this.

9. To be able to create an OData service definition file on the SAP HANA server, you first need to
create a repository workspace:

10. Then you create a new XS Project in the Project Explorer.

11. Give the project a name.

12. Share your project in the repository package you created earlier.

13. This should pull the new view into your project.

10

14. Create a new XS OData file.

15. In the Repositories view, look for the OData file that came with the SAP HANA Live content.

11

16. Copy the specific content needed for the new calculation view into your new xsodata file, and then
change the entries to match your package and query names.

17. Create a new .xs access file based on the basic template.

18. Lastly create a new app description file but use only a pair of curly braces.

12

19. Save all the changes. Then, from the Team command, commit and activate the whole project.

13

20. Your OData service is now live and ready to use. Now open SAP Fiori Launchpad for your user, start
the KPI workspace, and bring up the SAP-delivered KPI in order to duplicate it.

14

21. Here you can create a new KPI, based on the SAP-delivered one, to incorporate the new service and
measure. Search for and find the HANA Live content you have just created, and then create a KPI.

15

22. To check what metadata and data your OData service provided, use the OData Service above and
the URL of the app. Concatenate them to see the results.

16

23. Save and activate the KPI, and then create an evaluation for it.

17

24. You can, for example, define your own targets for this evaluation.

18

25. Save and activate the evaluation. Now create a tile and activate it.

19

20

26. Now go back into the KPI Workspace to create a drill-down configuration.

21

27. Select Configure.

22

28. Press the Plus icon (+) to add a new chart. Do this first.

23

29. Select at least one measure (this really depends on your requirements) and one dimension.

24

30. Select the chart type that fits your needs.

31. Provide a view id and and a title the end user will see, and save the chart.

25

32. Now go to the Tile Catalog and add the new tile to your home page.

26

33. Now you can launch the tile.

27

34. This brings up the drill down.

35. This concludes the example.

28

Related Content
How to Enhance SAP HANA Live
How to create your own query views based on HANA Live
SAP Fiori UX - Extensibility

29

Copyright
2014 SAP SE SE or an SAP SE affiliate company. All rights reserved.
No part of this publication may be reproduced or transmitted in any
form or for any purpose without the express permission of SAP SE.
The information contained herein may be changed without prior notice.
Some software products marketed by SAP SE and its distributors contain proprietary software components
of other software vendors. National product specifications may vary.
These materials are provided by SAP SE and its affiliated companies (SAP SE Group) for informational
purposes only, without representation or warranty of any kind, and SAP SE Group shall not be liable for
errors or omissions with respect to the materials. The only warranties for SAP SE 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.
SAP SE and other SAP SE products and services mentioned herein as well as their respective logos are
trademarks or registered trademarks of SAP SE in Germany and other countries.
Please see
http://www.sap.com/corporate-en/legal/copyright/index.epx#trademark
for additional trademark information and notices.

30

You might also like