Are you an ABAP developer who can’t wait to explore the intricacies of ABAP on HANA coding? Do you want to set up a sandbox environment where you can try out things such as consuming HANA Calculation Views or Stored Procedures from ABAP programs, and learn how to accelerate your ABAP applications with HANA or build entirely new ones? Then this is for you.
Set up your HANA One system
HANA One is a 60 GB HANA instance in the cloud. It runs in Amazon’s EC2 cloud and is very easy to set up. My system was in fact up and running within minutes. Here’s the link to the Quick Start Guide: http://www.saphana.com/docs/DOC-2437.
Please note that it isn’t free. Explore http://www.saphana.com/community/learn/cloud-info for more detailed information.
Download and install SAP HANA Studio
Once your HANA One instance is up and running, you can download the HANA Studio and HANA Client libraries directly from it. Start playing around with HANA Studio.
(Note: You’ll need to install Java 1.7 before you can install SAP HANA Studio, for example the Java SE Development Kit 7u17 for Windows x64 from http://download.oracle.com/otn-pub/java/jdk/7u17-b02/jdk-7u17-windows-x64.exe.)
Import the SFLIGHT sample dataset
There is a database schema available for download which contains a number of tables from the SFLIGHT tutorial data model. You can download it from the following location: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0c49112-c9ab-2f10-d591-9d40e658f7ce?QuickLink=index&overridelayout=true&55963423911188
To import it into your HANA One instance, execute File > Import > SAP HANA Studio > Catalog Objects.
The result will be visible under schema SFLIGHT.
Set up a Windows server for your ABAP system
I also run my ABAP system in the cloud, although this isn’t necessary if you have a server that meets the requirements, most notably:
- Windows Professional or Server 2008R2 (English)
- 4 GB RAM
I use Amazon EC2 as my cloud provider. You can get started by going to http://aws.amazon.com/en/ec2/. Because I was impatient and wanted the installation to complete quickly, I chose a relatively large instance type: “m1.large”, with 7.5 GB RAM and 4 CPU units (2 cores).
You might want to check the hourly fee and perhaps go for a smaller one (in terms of RAM and CPUs) if you plan to spend many hours with the system.
The image I chose is “Windows_Server-2008-R2_SP1-English-64Bit-Base-2013.03.14 (ami-ceb129a7)”.
The default 30 GB of storage isn’t enough for the installation of the ABAP Systems. I chose 100 GB just to be on the safe side, especially during the installation process when more space is needed. Now that my system is up and running, 75 out of the 100 GB are in use:
Setup your AS ABAP 7.03 server
Download and install the AS ABAP 7.03 SP04 64-bit Trial system from SAP Community Network: http://www.sdn.sap.com/irj/scn/downloads?rid=/library/uuid/30a6dbb2-a774-2e10-ee83-9f6432973545
Because I’m running this on a large and fast virtual machine, the installation went through rather quickly. I didn’t use a stopwatch, but I think it took about 30 to 60 minutes until the system was up.
Install SAP HANA Client on your ABAP server
You can download SAP HANA Client directly from your HANA One instance to your ABAP server. Extract the Rev48ClientWin86_64.zip archive and run the hdbsetup.exe binary:
Copy the HANA database libraries to your ABAP server’s directory
Locate the following libraries:
You will find them in the directory to which you installed SAP HANA Database Client – probably in one of the following locations:
- C:\Program Files\SAP\hdbclient
Copy them into a directory where there ABAP kernel finds them. The easiest way is to copy them to directory “C:\usr\sap\NSP\DVEBMGS00\exe”, so that they can be found at the following locations:
Configure a secondary database connection
Go to transaction SM31 and maintain entries for table DBCON.
Create a new entry with the following information:
- DB Connection: the symbolic name you give this database connection (similar to the name of an RFC destination)
- DBMS: enter “HDB” for SAP HANA
- User Name: enter the name of the HANA database user (typically this is also the name of the database schema you’re going to work in)
- DB password: enter the password of the HANA database user
- Connection info: enter the IP address with the one assigned to your HANA One instance by Amazon EC2, followed by “:30015”.
(I recommend you to use Amazon EC2’s “Elastic IP” feature and reserve an IP address you can keep using. Otherwise, you will have to change the IP address each time your HANA One instance starts because a new address will be assigned each time.)
Start coding: ABAP on HANA
Disclaimer: At this point I have to confess that I had to use some black magic to open the system for development. Normally in NSP trial systems, user BCUSER comes with a pre-installed developer key and can start creating programs directly. I don’t know why this wasn’t the case with my installation or where to get the developer key – applying my black magic (which I’m not at liberty to share) was faster but you might have to find your own way around it if the same obstacle occurs here.
Update: Ian MacGregor was so kind to share this in the comment section – I’ve copied it into the blog post so readers won’t miss it:
“Other readers could try 14421119653247674476 as the developers access key for BCUSER, it worked for the SAP-INTERN installation when following this blog to setup AS ABAP 7.02 (and 7.03) with Gateway on AWS.”
Thanks a lot, Ian.
*& Report Z_ABAP_ON_HANA
lt_sflight TYPE TABLE OF sflight,
lr_salv TYPE REF TO cl_salv_table.
SELECT * FROM sflight INTO TABLE lt_sflight
CALL METHOD cl_salv_table=>factory
r_salv_table = lr_salv
t_table = lt_sflight.
Finally – the beginning!
Get into the flow – happy HANA modeling and ABAP coding!
Things left to be desired
Because I don’t have any Basis/administration skills worth mentioning, there are still some things left to be desired:
- LT replication from ABAP to HANA,
- FQDN configuration,
- ICM configuration (server ports for HTTP and HTTPS),
- installation of the Cryptolibs for HTTPS connections.
Still, it’s a start and there are many things we can now try out!