Hello everyone, in our previous tutorial we have learned how to consume NON-SAP OData services.In this SAP Netweaver Gateway tutorial, we will learn how to consume HANA XS OData services in SAP Netweaver Gateway. HANA XS OData services means the service which are developed in HANA XS Engine. With OData Services Consumption and Integration (OSCI) SAP has provided the provision of consuming HANA XS OData services in SAP Netweaver Gateway system and convert them to Gateway OData services. So lets get started.
1.Supported System Version
SAP NetWeaver Gateway 2.0 SP6 or higher / SAP NetWeaver 7.40 SP2 or higher
You have created/developed HANA XS OData service in HANA XS Engine.Now you want to expose XS OData service as OData service from SAP Netweaver Gateway System.
Create an HTTP connection to your HANA XS Engine by creating a RFC connection of type G in SAP Netweaver Gateway system.
1. Go to t-code SM59->mantain rfc destinations-Configure RFC Connection. Select HTTP Connections to External Server node and click on Create.
2. Enter the RFC Destination name and Target Host name like below and hit Save .
RFC Destination Name
RFC Destination Description
Target Host – <server_name> Eg:- saplearners.com
Service No : Port No Eg:-8003
Path Prefix : / [ Note: Please mention this as it is.]
3. Test the connection by clicking on Connection Test button in the application toolbar.You should be able to connect to the server and should see the HTTP Response code as 200 like below.
4. Create a System Alias for the above created RFC destination. Go to SPRO → SAP Reference IMG and Navigate to : SAP Netweaver → Gateway → ODATA Channel → Configuration → Connection Settings → SAP Netweaver Gateway to SAP System → Manage SAP System Aliases.
5. Enter SAP System Alias name, Description, RFC Destination and Software Version.Click on Save to save the entries.
6. Go to transaction /IWBEP/OCI_SRV_GEN – OData Service(GW) Generator for External Data Services. Please enter
HTTP Destination = HANAXS
Service Namespace = shinesp8/services (HANA repository path in which your xsodata service is stored)
Service Name = poWorklist.xsodata
Model Provider Class = ZCL_XSODATA_MPC
Data Provider Class = ZCL_XSODATA_DPC
Model Name = ZXSODATA_MDL
Service Name = ZXSODATA_SRV
7. After entering above information hit Execute button to generate the service.After successfully service generation you should see the below screen.
8. To activate and register the service, go to /IWFND/MAINT_SERVICE – Activate and Maintain Services. Hit button to add our service.[adsenseyu1]
9. In the below screen enter System Alias = HANAXS and hit Get Services button.We will get a list of services, select our service and hit Add Selected Services button.
10. In the Add Service popup window, check the details and hit OK button.
11. You should see a successful popup message saying
Service ‘ZXSODATA_SRV’ was created and its metadata was loaded successfully.
12. We have successfully registered the service,now its time to test the service.Go to transaction /IWFND/GW_CLIENT – Gateway Client. Enter the service name and execute.
You have successfully learned how to consume HANA XS OData service in SAP Netweaver Gateway.
Please stay tuned to us for more SAP Netweaver Gateway tutorials.Please feel free to comment and let us know your feedback. You feedback will keep us alive.