Home
Step-by-Step Procedure
1.1 Install the SAP HANA DBSL kernel files on the SAP NetWeaver Gateway
1.2 Install the SAP HANA client on the SAP NetWeaver Gateway application server
1.3 Maintain DBCON Table in Gateway System
1.4 Create Model Class
1.5 Configure a service
1.6 Implement a BAdI Class for DB determination
1.7 Register a Service and test it.
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.
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
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
<operating system>
SAP In-Memory Database
Extract the file with SAPCAR and put the files on the kernel directory.
e.g. <Drive>:\usr\sap\<SID>\SYS\exe\uc\NTAMD64 in case of windows
Step-by-Step Procedure
1.1 Install the SAP HANA DBSL kernel files on the SAP NetWeaver Gateway
1.2 Install the SAP HANA client on the SAP NetWeaver Gateway application server
1.3 Maintain DBCON Table in Gateway System
1.4 Create Model Class
1.5 Configure a service
1.6 Implement a BAdI Class for DB determination
1.7 Register a Service and test it.
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.
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
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
<operating system>
SAP In-Memory Database
Extract the file with SAPCAR and put the files on the kernel directory.
e.g. <Drive>:\usr\sap\<SID>\SYS\exe\uc\NTAMD64 in case of windows
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 <root>.
hdbinst -a client -p /usr/sap/<SID>/hdbclient -s <SID>
Windows
Log on to your Windows application server as the SAP administrator (<SID>adm).
hdbinst -a client -p <lw>:\usr\sap\<SID>\hdbclient
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 <hostname>:<port number> to the “Conn. Info” field.
6. Click on Save button.
Now you are ready to connect to HANA as a secondary database.
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 Display<->Change 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.
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
19. Enter in the following code to specify the Analytics View of HANA.
20. Save and Activate your class.
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.
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
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.
Now press Sa ve , a nd your c omple te d c onfigura tion should look lik e this
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.
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.
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.
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 you’ve 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.
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
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.
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
The metadata information is automatically retrieved from the HANA database.
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.
20. Save and Activate your class.
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.
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
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.
Now press Sa ve , a nd your c omple te d c onfigura tion should look lik e this
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.
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.
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.
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 you’ve 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.
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
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.
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
The metadata information is automatically retrieved from the HANA database.
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.
curry shoes
ReplyDeletesupreme outlet
curry 8
yeezy boost 350 v2
hermes
Travis Scott Air Jordan
yeezy shoes
nike dunks
supreme clothing
hermes