⭐️Happy Learning and Happy Innovating !!!
Do you want to install a SAP system and evaluate ABAP SDK for Google Cloud in under 30 mins? Then keep reading this article.
Few days back SAP made ABAP Platform Trial 1909 SP07 available on Docker. You can read more in this blog ABAP Platform Trial 1909 Available Now. Thank you SAP for providing this!
The purpose of this article is to go through the steps to set up ABAP Platform Trial 1909 on Google Cloud Platform and install ABAP SDK for Google Cloud for evaluation.
To simplify and expedite the setup process and jumpstart our goal of evaluating the ABAP SDK, I have created scripts that are hosted in this GitHub repository. Please refer to the repository README file for detailed documentation of the scripts functionality generated by Google Bard.
The blog below will use these scripts to save your time and effort, and will help you get started ABAP Platform Trial 1909 on Google Cloud Platform quickly and easily.
Let’s begin!!!
We will use the Google cloud CLI to perform majority of the the steps.
abap-sdk-poc
which will be used to execute all the below installation steps.abap-sdk-poc
. I am using the zone as us-west4-b
. If needed, please change the zone in the below command based on your preference. These parameters will be used by the installation script.gcloud auth login
gcloud config set project abap-sdk-poc
gcloud config set compute/zone us-west4-b
Type the below command to execute the script create_vm_withdocker.sh. The script will do the following activities:
wget https://raw.githubusercontent.com/google-cloud-abap/community/main/blogs/abap-trial-docker-1909/crea...
chmod 755 create_vm_with_docker.sh
./create_vm_with_docker.sh
gcloud compute ssh "abap-trial-docker"
tail -f /tmp/output.txt
sudo docker ps
gcloud compute instances describe abap-trial-docker \
--format='get(networkInterfaces[0].accessConfigs[0].natIP)'
Use the following to connect from SAP GUI:
The user name is DEVELOPER with the password Htods70334. This is also predefined (same password) for client 000,client 001: SAP* , DDIC.
In order to import transports into the system, we must activate the TMS configuration.
Goto TCode STMS → Overview → Imports
Select Environment → System Overview
Select Extras > Distribute and Activate Configuration
Goto TCode STMS_IMPORT, where you should be able to see the following screen.
⭐️Now the SAP system is ready to import any transports.
These certificates are required for securely connecting to Google API’s using ABAP SDK.
Download the following certificates from the Google Trust Services repository into your desktop:
In the SAP GUI, use the STRUST transaction to import both the root and subordinate certificate into the SSL client SSL Client (Standard) PSE folder.
In STRUST, select the node SSL client SSL Client (Standard) and click Import certificate to upload both the files, click Add to Certificate List and Save.
The transport files for ABAP SDK for Google cloud are available in link. To expedite we will execute the import using a script.
gcloud compute ssh "abap-trial-docker"
wget https://raw.githubusercontent.com/google-cloud-abap/community/main/blogs/abap-trial-docker-1909/impo...
chmod 755 import_abap_sdk.sh
./import_abap_sdk.sh
Let’s write some code to call the Google Maps Platforms Address Validation API.
Step1: Configure a Client Key required for connectivity.
Google Cloud Key Name: DEMO_ADDRESS_VAL
Google Cloud Service Account Name: abap-sdk-dev@abap-sdk-poc.iam.gserviceaccount.com
Google Cloud Scope: https://www.googleapis.com/auth/cloud-platform
Google Cloud Project Identifier: abap-sdk-poc
Authorization Class: /GOOG/CL_AUTH_GOOGLE
Leave the other fields blank
Step2: Create a Program call Address Validation Service
SE38
and paste the following code, which passes the incomplete address to the API for validation. You would notice that the word ‘Mountain’ and ‘Amphitheatre’ are misspelled. Also the pin code is not provided.DATA: ls_input TYPE /goog/cl_addrvaldn_v1=>ty_012 .
TRY.
* Open HTTP Connection
DATA(lo_client) = NEW /goog/cl_addrvaldn_v1( iv_key_name = 'DEMO_ADDRESS_VAL' ).
* Populate relevant parameters
ls_input-address-region_code = 'US'.
ls_input-address-locality = 'Montain View'.
APPEND '1600 Ampitetre Pkwy' TO ls_input-address-address_lines.
* Call API method
CALL METHOD lo_client->validate_address
EXPORTING
is_input = ls_input
IMPORTING
es_output = DATA(ls_output)
ev_ret_code = DATA(lv_ret_code)
ev_err_text = DATA(lv_err_text)
es_err_resp = DATA(ls_err_resp).
IF lo_client->is_success( lv_ret_code ).
cl_demo_output=>display_data( ls_output-result-address-formatted_address ).
ELSE.
MESSAGE lv_err_text TYPE 'E'.
ENDIF.
* Close HTTP Connection
lo_client->close( ).
CATCH /goog/cx_sdk INTO DATA(lo_exception).
MESSAGE lo_exception->get_text( ) TYPE 'E'.
ENDTRY.
⭐️Execute the program to see the corrected and completed address.
You now have access to a system hosted on Google Cloud Platform for evaluating the ABAP language, Fiori, and related tools. You also received your first introduction to ABAP SDK for Google Cloud.
The SAP trial system will allow you to explore more about ABAP SDK. At the time of writing this article the SAP trial license was valid till 19-Sep-2023. In case you want to renew the SAP trial license, you do so by requesting it here.
For clean up use the below commands to delete the VM, the firewall rules and the service account.
gcloud compute instances delete abap-trial-docker
gcloud compute firewall-rules delete sapmachine
gcloud iam service-accounts delete \
abap-sdk-dev@abap-sdk-poc.iam.gserviceaccount.com
Delete the project abap-sdk-poc
using Manage Resources.
⭐️Happy Learning and Happy Innovating !!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
9 | |
7 | |
6 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |