首页 > SAP > HANA > How to consume HANA XS OData service in SAP Netweaver Gateway.
2019
08-27

How to consume HANA XS OData service in SAP Netweaver Gateway.

[adsenseyu2]

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

2.Business Scenario

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.

3.Step-by-Step Procedure

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 How to consume HANA XS OData service in SAP Netweaver Gateway. - 第2张  | 优通SAP.

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 How to consume HANA XS OData service in SAP Netweaver Gateway. - 第6张  | 优通SAP 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 How to consume HANA XS OData service in SAP Netweaver Gateway. - 第9张  | 优通SAP 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 How to consume HANA XS OData service in SAP Netweaver Gateway. - 第11张  | 优通SAP 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.

How to consume HANA XS OData service in SAP Netweaver Gateway. - 第13张  | 优通SAP

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. How to consume HANA XS OData service in SAP Netweaver Gateway. - 第14张  | 优通SAP

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.

Thank you.

最后编辑:
作者:yangsen
本站为个人博客网站,全由我个人维护,我从事SAP开发13年,其它ERP开发7年,基本都是零售行业。本站记录工作学习的过程, 有SAP相关询问专、兼职工作可随时联系我。 有网站相关的问题可直接在文章下方留言,或者联系我。 邮件:yan252@163.com给我。 QQ:415402519

留下一个回复

你的email不会被公开。