Dear All,
While working with Cloud Connector , I faced difficulties to look for some guidance in a single place to refer. Hence, decided to put everything here as a Guide Book for the Beginners which includes the installation steps, post installation configuration and developing a simple application.
SAP HANA Cloud connector connects between on-demand applications in SAP HANA Cloud Platform and existing on-premise systems. The Cloud connector runs as on-premise agent in a secured network and acts as a reverse invoke proxy between the on-premise network and SAP HANA Cloud Platform.
Due to its reverse invoke support, the configuration is not required in the on-premise firewall to allow external access from the cloud to internal systems. The Cloud connector provides control over:
Compared to the approach of opening ports in the firewall and using reverse proxies in the DMZ to establish access to on-premise systems, the Cloud connector has the following advantages:
Note: As the cloud connector is registered and started as a Windows Service, we can start it later within the Administrative Tools/Services administration tool of Windows (service is named SAP HANA Cloud Connector 2.0), if we decide not to start it immediately. There, we can also do restarts of the service whenever this is needed.
Now we connect the freshly installed cloud connector to the HCP developer account.
Logon to the cloud connector administration UI by invoking the URL https://localhost:8443 in a Web browser. The cloud connector logon screen then is shown in the browser. As user and password, use the pre-defined user Administrator and password manage.
As we have installed the Cloud connector on our IDES, the URL would be
https://<ip address>:8443
This will be a simple sum calculator of two numbers. There will be a web url through which user will pass 2 numbers and will get the result as summation of the two given input.
The summation logic will be written in a Function Module in IDES system(SAP ECC on-premise) and will be called from HANA Cloud through Cloud Connector. The java web application will be deployed and hosted on the Hana Cloud Platform and call the Function Module via the Cloud Connector.
A sample Function Module – “ZDEMO_CAL_HCC” is written to sum of two numbers which are taking as input and result will be exported as output.
Login to the Cloud Connector and Click on the Account Dashboard. It is observed that the account in Hana trial is already connected with a green status. We can add more accounts using add button.
To allow the on-demand applications to access a certain back-end system on the intranet, this can be managed using the Cloud connector access control management.
1. Go to the Access Control tab page and Choose Add.
2. Internal Host and Internal Port specify the actual host and port under which the target system can be reached. It needs to be an existing network address that can be resolved on the intranet and has network visibility for the Cloud connector without any proxy.
3. Virtual Host specifies the host name exactly as it is specified as the URL property in the HTTP destination configuration in SAP HANA Cloud Platform. The virtual host can be a fake name and does not need to exist.
4. The Virtual Port allows distinguishing between different entry points of the back-end system.
In addition to allowing access to a particular host and port, specifying which function modules (Resources) are allowed to be invoked on that host. All other RFC requests are denied by the Cloud connector.
1. To define the permitted function modules (Resources) for a particular back-end system, choose the row corresponding to that back-end system. A dialog appears, prompting to enter the specific function module name to allow.
2. The Cloud connector checks that the function module name of an incoming request is exactly as specified in the configuration. If it is not, the request is denied.
3. If selected the Prefix option, the Cloud connector allows all incoming requests, for which the function module name begins with the specified string.
4. The Enabled checkbox allows to specify whether that resource should be initially enabled or disabled.
Connectivity destinations are part of SAP HANA Cloud Platform connectivity service and are used for the outbound communication of a cloud application to a remote system. They contain the connection details for the remote communication of an application.
Connectivity destinations are represented by symbolic names that are used by on-demand applications to refer to remote connections. The connectivity service resolves the destination at runtime based on the symbolic name provided. The result is an object that contains customer-specific configuration details, such as the URL of the remote system or service, the authentication type, and the relative credentials.
The currently supported destination types are HTTP, Mail and RFC.
Here, the steps to create the RFC destination type
5. Open the HANA Cloud Platform Cockpit
6. Click on Destination.>New Destination
7. Create the Connection as Dest_Connector
SAP HANA Cloud Platform applications can be based on the Java EE Web application model and hence can develop applications for SAP HANA Cloud Platform just like for any application server.
Next steps are the process to develop the Application which will call the RFC in ECC.
8. Open the Eclipse IDE for Java EE Developers and switch to the Workbench screen.
9. From the Eclipse IDE main menu, choose File New Dynamic Web Project .
10. In the Project name field, enter the name of the Project.
11. In the Target Runtime pane, select the runtime to use to deploy this Project application. Here we are using “SAP HANA Cloud”
12. In the Configuration pane, use the default configuration.
13. Choose Finish.
1. On the DemoCalculator project node, open the context menu and choose New Servlet . Window Create Servlet opens.
2. Enter the package and class name.
3. Choose Finish to generate the servlet. The Java Editor with the ConnectivityRFCDemo opens.
4. Change the doGet(…) method so that it receives the input from user, call the Function Module using the Destination created in HCP and result back to the user with the output.
5. Save the changes.
Java Code: Attached in the file named "code.txt"
1. Explore the DemoCalculator Project node, on the WebContent node, right click and choose New JSP File . Window Create JSP File opens.
2. Create two JSP File, one for the input of two numbers and another for the output file.
3. Here the two JSP file named Calculator.jsp and Result.jsp.
4. Code for Calculator.jsp:
5. Code for Result.jsp:
1. Open the servlet in the Java editor and from the context menu, choose Run As Run on Server .
2. The Run On Server dialog box appears. Make sure that the manually define a new server option is selected.
3. As server type, select SAP SAP HANA Cloud Platform .
4. For Server's host name, use the landscape host depending on the account type. As we are using Hana Trail account, we are using hanatraial.ondemand.com
5. Choose Next.
6. On the New Server wizard page, specify the application name as mycalc (only lowercase Latin letters and digits are allowed).
7. From the Runtime dropdown box, select a specific runtime. If the Automatic option is selected, the server will load the target run-time of the application.
8. Enter the account name, user name, and password.
9. Choose Finish. This triggers the publishing of the application on SAP HANA Cloud Platform.
10. After publishing has completed, the Internal Web Browser opens and shows the application.
11. Once it is deployed on the HANA Cloud Platform, it can be monitored from the HCP Cockpit.
Once the application is deployed in the HANA Cloud Platform, we can get the url from the HCP Cockpit to test it from the Browser.
Here for our case, the url is: https://mycalc>account number>trial.hanatrial.ondemand.com/DemoCalculator/Calculator.jsp
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
13 | |
10 | |
7 | |
7 | |
5 | |
5 | |
4 | |
4 | |
4 | |
3 |