How to use OData service exposed via Integration Gateway (on-premise) with SAP Web IDE Cloud
Hello Developers,
Well, I heard a lot about SAP Web IDE and thought of getting my hands dirty. Here, I am trying to use OData service exposed via Integration Gateway (on my local machine in SAP Mobile Platform 3.0) with SAP Web IDE cloud version.
Never heard about Integration Gateway?
Tools required: SAP Mobile Platform 3.0 SP04, Eclipse Kepler with SAP Mobile Platform Tools plugins added, SAP HANA Cloud Connector
I have already exposed one of the publicly available Article SOAP web Service into OData services via Integration gateway in SMP3. (Ref link)
This is how it looks like:
Setting up SAP HANA Cloud Connector
Prerequisite: Download SAP JVM for Windows sapjvm-7.1.024-windows-x64.zip or JDK 1.7
Set Env variables JAVA_HOME : C:\Program Files\Java\jdk1.7.0_67
PATH: C:\ProgramFiles\Java\jdk1.7.0_67\bin;C:\WINDOWS\system32;C:\WINDOWS;
Steps:
1. Download HANA Cloud Connector from SAP Development Tools for Eclipse (sapcc-2.4.3-windows-x64.zip)
2. Extract the downloaded zipped file. Run go.bat command
3. Once done, run https://localhost:8443/run it in a browser
❗ Don’t close command prompt window as per step #2
ℹ As i was trying to install SAP HANA Cloud Connector on Windows 8.1 OS and as per official information it doesn’t support. As a workaround have tried copying sapscc20jni.dll file from auditor folder at sapcc-2.4.0-windows-x64 into Windows\System32 ( )
(User Name: Administrator, Password: manage (default))
4. Choose Installation type: Master (Primary Installation)>Apply
5. Change the login password
6. Set up Initial Configuration (for more info: check http://account.hanatrial.ondemand.com/)
Enter proxy details if any.
This is how it looks like: Status :CONNECTED
7. Since OData service has been deployed on my local machine and to access on-premise resources from cloud platform, I need to open secure connection between on-premise network and cloud. I need to make sure what kind of resources I want to expose from on-premise to SAP HANA cloud system, for that go to Access Control
Add system mapping:
Parameter | Value |
---|---|
Virtual Host | Any name of your choice |
Virtual Port | Any number of your choice |
Internal Host | SMP server host name (‘jk’ in my case) |
Internal Port |
Port on which OData URL (Exposed via Integration Gateway) is listening |
Protocol | HTTPS |
Back-end Type | There is no option to related to SMP and Integration gateway so selected ‘SAP Gateway’ |
8. Now, I want to decide which resource path I have to select
As you can the green icon (state of each entry)
Setting up SAP HANA Cloud Platform
It’s time to set up SAP HANA Cloud account and have to create destination to exposed resources in SAP Mobile Platform server.
9. Login to SAP HANA Cloud Platform > Cockpit (Requires SCN username and password to login)
- Create a new destination >Save
URL: https://virtualhost:virtualport (as per step #7)
Proxy Type: As OData service resides on on-premise system
Authentication: Basic Authentication (Credentials to access Odata URL: smpAdmin, s3pAdmin)
Additional Properties:
WebIDEEnabled | true |
WebIDESystem | IGWDestination |
WebIDEUsage | odata_gen |
❗ Value for the parameter WebIDEUsage is important otherwise you won’t be able to pick your destination from the Service URL combo box when creating a new project with the template wizard. (Step #14)
ℹ In general, the value for the parameter WebIDESystem is SID of the gateway system but in case of SMP (Integration Gateway) it’s value doesn’t need to be anything special. Normally,in order to see the destination working, i have assigned to the webIDESystem the same string used for the destination name. i.e. IGWDestination
10. Go to Subscriptions >launch SAP Web IDE
Create a project in SAP Web IDE (Cloud)
11. File>New>Project from Template
12. Select “SAP Fiori Starter Application” as the template > Next
13. Basic Information > Give any project name of your choice
14. Data Connection > Service URL > select “IntegrationGateway” from the drop-down (as per step #9)
- Paste the URL : /gateway/odata/SAP/ARTICLESERVICE;v=2
- Test connection . This is how it should like:
15. Template Customization
We will having one master section and one detail section,provide information and Finish.
16. You can see auto-generated artifacts for this project. Select “index.html” > Run
Big thanks to Virinchy P , Markus Tolksdorf & Simmaco Ferriero for great support.
References:
Video links: SAP Web IDE – YouTube, Krishna ‘s self explanatory videos
Forums to follow: SMP Developer Center , SAPUI5 Developer Center
Useful link: SAP Web IDE – Overview
Regards,
JK (@jkkansal1987)
very nice blog 🙂
Thanks for sharing your experiences ➕
Very nice blog JK, Thank you so much for explaining everything in detail.
But still, I am facing the issue in Web IDE last step (14. No. above - Data Connection), I have integrated the SAP gateway on ECC system instead of Integration Gateway of SMP. It is giving me error - "Invalid URL Enter Valid URL and try again". But if I do run the SAP Web IDE with local image it is able to fetch Gateway service URL successfully, without using SAP HANA Connector. So still I am not able to decipher the real culprit (SAP HANA Connector, HCP Destination or Web IDE). However SAP HANA Cloud Connector is showing green traffic light as below:
HCP Destination is as follows:
And the same Destination is visible in SAP Web IDE. I really appreciate your kind help and co-ordination here.
Thanks,
Warm Regards
Hemendra
Hi Hemendra,
when you are running a local version of the Web IDE your localhost has connection to your SAP system (maybe because of VPN).
But when you running the Web IDE version hosted by SAP the SAP server tries to connect the url shown in your second screenshot :
Normally here should be the local URL from your cloud connector entered which then is accessible from the online hosted Web IDE and ist forwarding the request over your local VPN to your SAP BackEnd system.
I am running the stup like you without integration Gateway and just forwarding to the BackEnd System behind the company firewall here is the setup:
Cloud Connector
hana destination
Thanks for giving your precious time Thomas Schmidt,
I have created the separate thread for the same with details of the screens, kindly find below link:
Please let me know your valuable inputs on the same.
Thanks,
Warm Regards
Hemendra
Hemendra Sabharwal
Seems you have resolved it.
Yes, finally able to resolve the same. Thank you for being there.
Warm Regards
Hemendra
Hello Hemendra, Thomas and others,
I am facing the similar problem of "Invalid URL. Enter a valid URL and try again" in the data connection step.I have added the sap-client parameter too as mentioned by Hemendra. But it did not help. Can you kindly help me here? See attached screenshots of connector access control, destination and web ide respectively.
Destination configuration:
WEB IDE Data conneciton
try at first - if you are able to reach the entered service locally in your browser with the yellow URL:
and the ending : /sap/opu/odata/sap/ZFAC_SRV
and then check if the yellow URL is really a HTTPS connection to the Backend.
And if there is really a second "sap" for the service which is imo not the case in the default setup :
Hi Sandhya,
The "URL" you are accessing is HTTPS and "TYPE" used above is HTTP. Please check if HTTPS you need to do secure call only and Thoms is right here do check them first. Please also check Cloud Connector settings from below URL:
SAP Web IDE Developer Guide
Thanks,
Warm Regards
Hemendra
Hello Thomas, Hemendra,
Thank you for your help. Was able to resolve it. My mistake. There was a typo in the HTTPS port number and when I corrected it, it started working fine. 🙂
YEah !!!
Sandhya
Hi Jitendra,
I have created project as you guided and i am able to run it successfully. But when i am deploying it on Hana Cloud Platform it gives after the deploy process finishes.
Can you please guide me how to deploy this successfully.
Did you find a solution for this? This is really stopping us since longtime