Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
abhradeepbasu
Participant

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.



1. Overview


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:


 




  • On-premise systems and resources (HTTP or RFC) that shall be accessible by cloud applications.

  • Cloud applications that shall make use of the Cloud connector.



1.1. Advantages


 


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:




  • In order to establish connectivity from SAP HANA Cloud Platform to an on-premise system, the firewall of the on-premise network does not require to open an inbound port.

  • The Cloud connector supports HTTP and RFC protocols as of now. For example, the RFC protocol supports native access to ABAP systems by invoking function modules.

  • The Cloud connector can be used to connect on-premise database, or BI tools to SAP HANA databases in the cloud in both direction

  • The Cloud connector is easy to install and configure, that is, it comes with a low TCO and fits well to cloud scenarios. SAP provides standard support for it.


 

2. Step by step process to Install Cloud Connector


This document illustrates the step by step installation process of Cloud connector 2.x on Microsoft Windows OS.

 

2.1. Prerequisites


Below are the prerequisites for successfully installation of Cloud Connector 2.x.

 

2.1.1. Hardware



  • Memory: 1 GB RAM (min.), 4 GB recommended

  • Hard disk space: 1 GB (min.), recommended 20 GB

  • CPU: Single core 3 GHz (min.), dual core 2 GHz recommended, x86-64 architecture compatible

  • 64-bit operating systems: Windows 7, Windows 8.1, Windows Server 2008 R2, Windows Server 2012, or Windows Server 2012 R2.

  • Cloud connector installation archive from SAP Development Tools for Eclipse.

  • Microsoft Visual Studio C++ 2010 runtime libraries.

  • Supported JDKs version : 6,7

  • Environment variable for <JAVA_HOME> has been set to the Java installation directory, so that the bin subfolder can be found.


 

2.1.2. Software



  • 64-bit operating systems: Windows 7, Windows 8.1, Windows Server 2008 R2, Windows Server 2012, or Windows Server 2012 R2.

  • Cloud connector installation archive from SAP Development Tools for Eclipse.

  • Microsoft Visual Studio C++ 2010 runtime libraries.

  • Supported JDKs version : 6,7

  • Environment variable for <JAVA_HOME> has been set to the Java installation directory, so that the bin subfolder can be found.


 

2.2. Setup the Required Software


2.2.1. Downloading Cloud Connector Installation Archive





  • Download the msi file from “SAP HANA Cloud Connector” Section.


                   

 

      



2.2.2. Setup the Environment Variable



  • Create Environment Variable JAVA_HOME and update the directory path


    

2.3. Installation



  • Double click on the <sapcc-<version>-windows-x64.msi> installer file.


  




  • Having downloaded the cloud connector MSI installer to start the installation by double-clicking the MSI. Afterwards it will be welcome by the installer.


 

  • Navigate to the installation directory for the SAP HANA Cloud connector and choose Next>.


  

  • Port can be chosen on which the administration UI is reachable. Either leave the default 8443 or choose a different port if needed. Then choose Next>.


  

  • On this step, decide whether the Cloud connector should be started immediately after finishing the setup. If this is not required now, remove the check from the checkbox. Then choose Next>.


  

  • After all installation options have been fulfilled, to start the install, press again the Next> button.


  

  • In up to a few seconds, the installation has been done. To finish the installer, choose the Close button.


     


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.


 



3. Post Installation Configuration


3.1. Establish connection to the cloud account


               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


 





  • As first step, select Master (Primary Installation) as the installation type. The other choice Shadow (Backup Installation) is used for a high availability installation of the cloud connector and not used in this context.


  

  • After the first logon, the initial password needs to be changed.


  




  • As next step, we need to connect the cloud connector with our developer account in the cloud. Make sure to select hanatrial.ondemand.com as Landscape Host, and specify our free developer account as Account Name.

  • In case the cloud connector is located within a fenced corporate network that allows connectivity to internet resources only via a proxy, also specify the HTTPS proxy.





  • Now the main page of the cloud connector administration UI shows up. In case the connection succeeded, we will see the Connector State with a yellow indicator as shown in the following screenshot. Now, we have a persistent SSL connection to our cloud account and are ready to use this connection in our cloud applications.


 

                   

4. Step By Step Guide of a Sample Application Development


4.1. Business Scenario


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.


 



4.2. Function Module in ECC


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.




  • Make sure Remote Enabled Function Module is clicked.

  • Make sure to click on Pass Value for both the Import and Export parameters.


         


       


      


      



4.3. Cloud Connector Configuration - Configure the on premise resources


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.


       




4.3.1. Exposing Intranet  Systems


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.




4.3.2. Limiting the Accessible Services


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.




4.4. Hana Cloud Configuration – Destination


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.


 




  • HTTP destination- provides data communication via HTTP protocol and is used for both Internet and on-premise connections.

  • Mail destination - specifies an e-mail provider for sending and retrieving e-mails via SMTP, IMAP and POP3 protocols.

  • RFC destination - makes connections to ABAP on-premise systems via RFC protocol using JCo as API.


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




4.5. Develop Application


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.


 



4.5.1. Creation of a Dynamic Web Project


     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.




4.5.2. Creation of a Servlet


     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"


 


 



4.5.3. Creation of a JSP Page


     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:


 


              



4.6. Deployment


     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.





4.7. Test


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


 





35 Comments
Labels in this area