how to... configure netweaver gateway and hana connectivity
DESCRIPTION
How to... Configure NetWeaver Gateway and HANA ConnectivityTRANSCRIPT
-
SAP How-to Guide
SAP NetWeaver Gateway
Applicable Releases:
SAP NetWeaver Gateway 2.0 SP 04
Version 1.0
August 2012
How To... Configure NetWeaver Gateway and HANA Connectivity
-
Copyright 2012 SAP AG. 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 AG. The
information contained herein may be changed without prior notice.
Some software products marketed by SAP AG and its distributors
contain proprietary software components of other software vendors.
Microsoft, Windows, Excel, Outlook, and PowerPoint are registered
trademarks of Microsoft Corporation.
IBM, DB2, DB2 Universal Database, System i, System i5, System p,
System p5, System x, System z, System z10, System z9, z10, z9, iSeries,
pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390,
OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power
Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER,
OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS,
HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex,
MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and
Informix are trademarks or registered trademarks of IBM Corporation.
Linux is the registered trademark of Linus Torvalds in the U.S. and other
countries.
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either
trademarks or registered trademarks of Adobe Systems Incorporated in
the United States and/or other countries.
Oracle is a registered trademark of Oracle Corporation.
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open
Group.
Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame,
and MultiWin are trademarks or registered trademarks of Citrix Systems,
Inc.
HTML, XML, XHTML and W3C are trademarks or registered trademarks
of W3C, World Wide Web Consortium, Massachusetts Institute of
Technology.
Java is a registered trademark of Sun Microsystems, Inc.
JavaScript is a registered trademark of Sun Microsystems, Inc., used
under license for technology invented and implemented by Netscape.
SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP
BusinessObjects Explorer, StreamWork, 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.
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.
The information in this document is proprietary to SAP. No part of this
document may be reproduced, copied, or transmitted in any form or for
any purpose without the express prior written permission of SAP AG.
This document is a preliminary version and not subject to your license
agreement or any other agreement with SAP. This document contains
only intended strategies, developments, and functionalities of the SAP
product and is not intended to be binding upon SAP to any particular
course of business, product strategy, and/or development. Please note
that this document is subject to change and may be changed by SAP at
any time without notice.
SAP assumes no responsibility for errors or omissions in this document.
SAP does not warrant the accuracy or completeness of the information,
text, graphics, links, or other items contained within this material. This
document is provided without a warranty of any kind, either express or
implied, including but not limited to the implied warranties of
merchantability, fitness for a particular purpose, or non-infringement.
SAP shall have no liability for damages of any kind including without
limitation direct, special, indirect, or consequential damages that may
result from the use of these materials. This limitation shall not apply in
cases of intent or gross negligence.
The statutory liability for personal injury and defective products is not
affected. SAP has no control over the information that you may access
through the use of hot links contained in these materials and does not
endorse your use of third-party Web pages nor provide any warranty
whatsoever relating to third-party Web pages.
SAP How-to Guides are intended to simplify the product implement-
tation. While specific product features and procedures typically are
explained in a practical business context, it is not implied that those
features and procedures are the only approach in solving a specific
business problem using SAP NetWeaver. Should you wish to receive
additional information, clarification or support, please refer to SAP
Consulting.
Any software coding and/or code lines / strings (Code) included in this
documentation are only examples and are not intended to be used in a
productive system environment. The Code is only intended better explain
and visualize the syntax and phrasing rules of certain coding. SAP does
not warrant the correctness and completeness of the Code given herein,
and SAP shall not be liable for errors or damages caused by the usage of
the Code, except if such damages were caused by SAP intentionally or
grossly negligent.
Disclaimer
Some components of this product are based on Java. Any code change
in these components may cause unpredictable and severe malfunctions
and is therefore expressively prohibited, as is any decompilation of these
components.
Any Java Source Code delivered with this product is only to be used by
SAPs Support Services and may not be modified or altered in any way.
-
Document History
Document Version Description
1.10 >
1.00 First official release of this guide
-
Typographic Conventions
Type Style Description
Example Text Words or characters quoted
from the screen. These
include field names, screen
titles, pushbuttons labels,
menu names, menu paths,
and menu options.
Cross-references to other
documentation
Example text Emphasized words or
phrases in body text, graphic
titles, and table titles
Example text File and directory names and
their paths, messages,
names of variables and
parameters, source text, and
names of installation,
upgrade and database tools.
Example text User entry texts. These are
words or characters that you
enter in the system exactly
as they appear in the
documentation.
Variable user entry. Angle
brackets indicate that you
replace these words and
characters with appropriate
entries to make entries in the
system.
EXAMPLE TEXT Keys on the keyboard, for
example, F2 or ENTER.
Icons
Icon Description
Caution
Note or Important
Example
Recommendation or Tip
-
Table of Contents
1. Business Scenario ................................................................................................... 1
2. Background Information .......................................................................................... 1
3. Prerequisites ......................................................................................................... 2
4. Step-by-Step Procedure ......................................................................................... 3
4.1 Install the SAP HANA DBSL kernel files on the SAP NetWeaver Gateway application server. ...................................................................................................3
4.2 Install the SAP HANA client on the SAP NetWeaver Gateway application server. ... 4
4.3 Maintain DBCON Table in Gateway System .............................................................5
4.4 Create Model Class ................................................................................................. 6 4.5 Configure a service ................................................................................................ 10
4.6 Implement a BAdI Class for DB determination....................................................... 14
4.7 Register a Service and test it.................................................................................. 16
5. Contraints ........................................................................................................... 22
-
How To... Configure NetWeaver Gateway HANA connectivity
July 2012 1
1. Business Scenario SAP HANA Database is a high performance in-memory database offered by SAP.
By combining SAP NetWeaver Gateway and SAP HANA, you can expose the information from a
HANA database as OData Services. Integration between SAP NetWeaver Gateway and SAP HANA
provides a way for business users to see HANA data on any device or platform through SAP
NetWeaver Gateway.
2. Background Information In this How To Guide, we will show you how to expose SAP HANA data with OData Service via SAP
NetWeaver Gateway. As of SP04 of SAP NetWeaver Gateway, only read scenarios are supported.
SAP HANA is specified as a secondary Database of NetWeaver Gateway and all of the requests will
go through SAP NetWeaver Gateway.
You can use the following information models as an OData service from the SAP HANA DB:
Attribute views
Analytic views
Calculation views
Please be aware that SAP is also planning to release the XS Engine as a part of HANA technology.
The XS Engine allows users to expose HANA data as Odata services natively without SAP
NetWeaver Gateway.
-
How To... Configure NetWeaver Gateway HANA connectivity
July 2012 2
3. Prerequisites The following pre-requisites are required to support this scenario:
Access to SAP HANA 1.0 or higher system
Access to any type of View in the HANA system.
Access to SAP NetWeaver Gateway 2.0 SP04 or higher system.
7.20 Kernel patch level 110 or higher is used for the NetWeaver Gateway
IW_BEP is installed on the Gateway Hub System
IW_HDB is installed on the Gateway Hub System
Note: It is technically possible to have a distributed deployment of IW_FND (Hub) and IW_BEP with IW_HDB. This means that the Business Suite system with IW_BEP and IW_HDB component can also be used to connect to the HANA DB. The prerequisite for IW_HDB installation will be the SAP NetWeaver Release 7.02 with SP9 level.
Note: To simplify the deployment, this document will use the Gateway Server with IW_BEP and IW_HDB.
You can download the installation file of IW_HDB component from SAP service marketplace.
http://service.sap.com/swdc. Please be sure that you need to down load the file from
Installations and Upgrades menu not from Support Packages and Patches area.
The following SAP Note has to be applied to the Gateway Server if you are using SP 00 of IW_HDB 1.0 .
Note 1730866 - ODC / IWHDB - Problem with type conversion
Note 1732474 - OData Channel - Usage of DECFLOAT16 and DECFLOAT34 fields
Note 1712966 - ODC / IWHDB - Database connection not closed in runtime
For more information on HANA connectivity from an ABAP system, please refer to the following
SAP Note:
Note 1597627 - SAP HANA connection
-
How To... Configure NetWeaver Gateway HANA connectivity
July 2012 3
4. Step-by-Step Procedure The following steps will guide you through configuring the connectivity between SAP NetWeaver
Gateway and SAP HANA. Connectivity settings between the ABAP system and a HANA system are
followed by Gateway specific development settings.
4.1 Install the SAP HANA DBSL kernel files on the SAP NetWeaver Gateway application server.
A system administrator first needs to configure the connectivity between NetWeaver Gateway as a
ABAP system and HANA as a secondary database.
1. Put HANA DBSL kernel files on the SAP NetWeaver Gateway application server
The DBSL for SAP HANA database (lib_dbsl_PL.SAR) is available on SAP Service Marketplace
under the following path
Additional components
SAP Kernel
SAP KERNEL 64-BIT UNICODE
SAP KERNEL 7.20 64-BIT UNICODE (or)
SAP KERNEL 7.20 EXT 64-BIT UC
SAP In-Memory Database
Extract the file with SAPCAR and put the files on the kernel directory.
e.g. :\usr\sap\\SYS\exe\uc\NTAMD64 in case of windows
-
How To... Configure NetWeaver Gateway HANA connectivity
July 2012 4
4.2 Install the SAP HANA client on the SAP NetWeaver Gateway application server.
On each application server, install the DB client software for SAP HANA. Download the client
software from SAP Service Marketplace as described in Note 1603671.
If you have multiple application servers, you need to install the HANA client individually.
Unix
The installation must be performed under the user .
hdbinst -a client -p /usr/sap//hdbclient -s
Windows
Log on to your Windows application server as the SAP administrator (adm).
hdbinst -a client -p :\usr\sap\\hdbclient
-
How To... Configure NetWeaver Gateway HANA connectivity
July 2012 5
4.3 Maintain DBCON Table in Gateway System 1. Log on NetWeaver Gateway System with SAP GUI.
2. Go to transaction DBCO.
3. Go into Change mode by click the Display/Change icon
4. Click on New Entries
5. Fill in the connection detail of SAP HANA Database.
Please enter : to the Conn. Info field.
6. Click on Save button.
Now you are ready to connect to HANA as a secondary database.
...>
-
How To... Configure NetWeaver Gateway HANA connectivity
July 2012 6
4.4 Create Model Class ...
1. Go to transaction SE80 . ABAP Development Workbench
2. Change the object type drop down to be Class / Interface:
3. Enter in the class name
4. Click the Display icon
5. Since the object does not yet exist you will be asked if you want to create it
6. Click the Yes button.
7. Enter a description and click Save.
8. Save your newly created class as a Local Object.
-
How To... Configure NetWeaver Gateway HANA connectivity
July 2012 7
9. You should now see the following:
10. Double click on the class you just created, this will open the class editor.
11. Switch to edit mode by clicking on the DisplayChange icon.
12. In the class editor switch to the Properties tab.
13. Click the Superclass button.
14. Enter in the HANA Connectivity Metadata Class -/IWHDB/CL_HAI_RT_ABS_MODEL
This is a subclass of ordinary Odata Channel Metadata Class /IWBEP/CL_MGW_ABS_MODEL.
15. Save your class.
16. Open the Methods > Inherited Methods node of your Class in the Class browser.
-
How To... Configure NetWeaver Gateway HANA connectivity
July 2012 8
17. Right click on the GET_HDB_ARTIFACTS method and in the context menu select Redefine.
18. The method editor for the redefined method will open up.
-
How To... Configure NetWeaver Gateway HANA connectivity
July 2012 9
19. Enter in the following code to specify the Analytics View of HANA.
METHOD GET_HDB_ARTIFACTS.
DATA: lr_view_assgmnt TYPE REF TO /IWHDB/S_HAI_RT_VIEW_ASSGMNT .
rt_views = super->get_hdb_artifacts( ) .
APPEND INITIAL LINE TO rt_views REFERENCE INTO lr_view_assgmnt .
lr_view_assgmnt->catalog_name = 'i016095.efashion' .
lr_view_assgmnt->view_name = 'AN_EFASHION' .
ENDMETHOD.
20. Save and Activate your class.
-
How To... Configure NetWeaver Gateway HANA connectivity
July 2012 10
4.5 Configure a service 1. Start transaction SPRO
2. Click on SAP Reference IMG
3. Follow the path SAP NetWeaver->Gateway Service Enablement->Backend Odata Channel-
>Service Development for Backend Odata Channel
4. Start the Maintain Object Models activity.
5. Enter the Technical Model Name and a version number.
6. Press the Create button.
-
How To... Configure NetWeaver Gateway HANA connectivity
July 2012 11
7. Enter the name of the metadata class and give it some meaningful description.
8. Save the changes and back out to the IMG tree structure.
9. Now run the Maintain Service activity.
10. Enter Technical Service Name and a version number.
11. Press Create
-
How To... Configure NetWeaver Gateway HANA connectivity
July 2012 12
12. On the following screen, enter the default Runtime Data Provider class for HANA Connectivity
/IWHDB/CL_HAI_RT_DATA and a meaningful description.
13. You must now save your configuration otherwise you will get an error message on the
following pop-up screen.
14. Since we have already created a Technical Model to wrap our metadata class, we need to
press the Assign Model button, NOT the Create Model button.
15. On the following pop-up, enter the name of the Technical Model we created above
(Z_HANA_VIEW_TM1), the version number and press the save button.
-
How To... Configure NetWeaver Gateway HANA connectivity
July 2012 13
Now press Sa ve , a nd your c omple te d c onfigura tion should look l ik e this :
-
How To... Configure NetWeaver Gateway HANA connectivity
July 2012 14
4.6 Implement a BAdI Class for DB determination To determine the HANA database, we need to implement a BADI.
This BADI can also be used to determine the backend ABAP system.
1. Go to transaction SE19 BAdI Builder
1. The Enhancement Spot to determine HANA DB is /IWBEP/ES_DESTIN_FINDER.
Enter that into the Enhancement Spot input field shown below.
2. Click Create Impl. button.
3. In the popup window Create Enhancement Implementation enter the details as shown below
and Click the Create button
4. Enter the short text and Click Enter.
5. In the Create Composite Enhancement Implementation popup window enter a description
and click the Enter button twice.
-
How To... Configure NetWeaver Gateway HANA connectivity
July 2012 15
6. The Create BAdI Implementation popup window will now be displayed. Enter in the details as
shown below. And click the Enter button.
7. You will be presented with the following. Double Click on Implementation Class.
8. Double click on the implementation Class.
9. Go into Change mode by click the Display/Change button.
10. Double click on the method /IWBEP/IF_DESTIN_FINDER_BADI~GET_DB_CONNECTION.
-
How To... Configure NetWeaver Gateway HANA connectivity
July 2012 16
11. Add the follow code between the METHOD and ENDMETHOD lines.
*always connect to HANA DB CT1
RV_DB_CONNECTION = 'CT1' .
In this case, we will only connect to a single HANA Database and there is no branch in the code.
You also can add any logic and it will be necessary when you have multiple HANA databases
connecting from a SAP NetWeaver Gateway System.
12. Save and activate your changes.
4.7 Register a Service and test it 1. Go to transaction /IWFND/MAINT_SERVICE.
2. Press add service button.
-
How To... Configure NetWeaver Gateway HANA connectivity
July 2012 17
3. Enter system alias and you will see a list of all Gateway services available from the Gateway
Hub system
4. Click on the Service youve configured
5. A pop-up box now asks you to enter the package for this service. Enter the package you have
been using. In this case, $tmp is shown as the example for local objects.
6. Press Enter.
-
How To... Configure NetWeaver Gateway HANA connectivity
July 2012 18
7. Successful creation of the service is confirmed on the lower left status bar.
8. Click the Back arrow on the top toolbar.
9. Click the Search button and search for HANA_VIEW1, you should find the service defined.
10. Click on the service
-
How To... Configure NetWeaver Gateway HANA connectivity
July 2012 19
11. Make sure the ODATA Row is highlighted and has an alias defined.
12. Click the Call Browser button. This will launch a browser for the service
13. The Service Document for the HANA_VIEW1 should be displayed in the browser.
You can see the View name is used as the name of collection.
-
How To... Configure NetWeaver Gateway HANA connectivity
July 2012 20
Change the URL in the browser to access to the HANA View by adding the view name after
the ending /
http://host:port/sap/opu/odata/sap/HANA_VIEW1/AN_EFASHION?$format=xml
You can use a several options like $top,$skiptoken,$select,$filter,&$orderby etc here.
14. Add $metadata to the URL for the Service Document to display the Service Metadata
Document.
http:// host:port /sap/opu/odata/sap/HANA_VIEW1/$metadata
-
How To... Configure NetWeaver Gateway HANA connectivity
July 2012 21
The metadata information is automatically retrieved from the HANA database.
-
How To... Configure NetWeaver Gateway HANA connectivity
July 2012 22
5. Contraints
It is not possible to apply an SAP HANA analytical privileges concept within the SAP NetWeaver Gateway integration since the ADBC (ABAP Database Connectivity) interface uses only one defined database user in DBCON table. For the workaround, a new authorization object /IWHDB/HAI HANA is available. You can specify Catalog Name and HANA Artifact Name there. This authorization object is checked in CHECK_AUTHORITY method of runtime class /IWHDB/CL_HAI_RT_DATA. Customers also have the possibility to enhance these methods by redefinition in the inherited classes.
Filtering with $filter option for measures (known as key figures in SAP BW) is currently NOT supported.
Input parameters for calculation and analytical views are NOT supported.
Reference definitions for measure and unit/currency are NOT supported.
-
www.sap.com/contactsap
www.sdn.sap.com/irj/sdn/howtoguides