As from GeneXus 15, it is possible to run Java-generated applications in SAP Cloud Platform.
Before deployment, we recommend using a new environment in the Knowledge Base to generate a new deployment version that runs locally in the Tomcat of the computer used to work with GeneXus connected to the SAP HANA database, as described in How to use SAP HANA database on SAP Business Technology Platform. In this way, we can make the configurations that will be used in the production database.
To make a deployment to SAP Cloud Platform we need to have an account in SAP Cloud Platform because the information of the account will be used not only to connect to the SAP HANA database but also to upload the application to SAP Cloud Platform during the deployment process. For more information, visit hcp.sap.com
The SAP HCP SDK is required and can be downloaded from here: https://tools.hana.ondemand.com/#cloud. It corresponds to Java Web Tomcat 8.
- Before making a deployment, the property “Use data source for web based applications” of the SAP HANA data store has to be set to True. Then, the property “JDBC data source” is enabled and has to be set to java:comp/env/jdbc/DefaultDB
- Run a Build All.
- Go to the Build menu and select the Deploy Application option.
- In the Deployment screen:
- Select the Main objects to be included in the deployment.
- In Target, select the option SAP Cloud Platform.
- Set the following properties as indicated below:
- Host: Enter the hired server in SAP Cloud Platform. If you're using a trial version, type hanatrial.ondemand.com
- HCP SDK Directory: Configure the path where the SAP Cloud Platform SDK is configured. For example, C:\neo-java-web-sdk-3.14.3
- Account name: It's the account name obtained from the account information in SAP Cloud Platform Cockpit.
- User and Password: Username and password used to register at hcp.sap.com.
- Application Name: It's the name used to display the application in SAP Cloud Platform. It can be seen in the Java Applications option in the SAP Cloud Platform Cockpit.
- After selecting the main objects and configuring the necessary properties for the automatic deployment, press the Deploy button. It will build the WAR package, as well as upload and deploy it in SAP Cloud Platform.
- Using the ERP Connector considerations: Copy the sapjco3.jar and the libsapjco3.so files in the "Driver" directory under the model's target directory. Those files can be downloaded from the SAP download center.
To learn more about how to use SAP Cloud Platform Cockpit, read this documentation.