Skip to Content
Technical Articles
Author's profile photo Uwe Fetzer

SAP HANA Express and ABAP Developer Edition: new BFFs :-)

You may remember the possibility to attach a HANA Database (for example the HANA Express Edition) in a more or less legal way to the ABAP Developer Edition by simply copying one or more database drivers from the HANA Linux system to the ABAP Linux system (just google it, if you want furher information).

Last week I was preparing a small workshop for my collegues (“What is SAP HANA”) where I wanted to demonstrate, among other things, this “sidecar” architecture model. Because the last time a set up this kind of scenario is a couple of yeras ago, I couldn’t remember anymore which driver file I had to copy to the ABAP system. But what I could remember was, that a dump would appear with the needed/missing filename in it when I’m trying to call the HANA database from within an ABAP programm.

Because my laptop is not _that_ powerfull to run a HANA Database _and_ an ABAP system, I’ve created a HANA instance on AWS (see https://developers.sap.com/tutorials/hxe-xsa-aws-setup.html ) and only my ABAP System stays on my laptop.

Creating dumps or at least error messages is one of my simpler exercises, so I’ve created the database connection with ST04 and tried to create the dump with this little program:

    TRY.
        DATA(sql) = NEW cl_sql_statement( con_ref = cl_sql_connection=>get_connection( 'MYHANA' ) ).

        DATA airportcodes TYPE STANDARD TABLE OF char03.

        DATA(statement) = |SELECT "airportCode" FROM "TRAVEL"."Airports";|.

        DATA(result) = sql->execute_query( statement ).

        result->set_param_table( REF #( airportcodes ) ).
        result->next_package( ).

        cl_demo_output=>display( airportcodes ).

      CATCH cx_sql_exception INTO DATA(lcx).
        cl_demo_output=>display( lcx->get_text( ) ).

      CATCH cx_parameter_invalid INTO DATA(lcx_parameter).    "
        cl_demo_output=>display( lcx_parameter->get_text( ) ).

    ENDTRY.

But quelle surprise: no dump nor an error message but instead values from my HANA Express database!!!!!

What happend? Should it be that the new ABAP Developer Edition 7.52 can connect to the SAP HANA Express Edition 2.0 SP03 without further tweeking? I’ve tried with calling stored procedures, views, bigger selects -> everything worked fine πŸ™‚

Here’s my ST04 setup, if you want to try the same on your own:

Call transaction ST04, logon and press “add”

Enter a system name and a proper description

Enter a database connection name (this will be the name you’ll use later in your ABAP program), select “SAP HANA database” as platform, enter SYSTEM as DB user, the password, IP address of your AWS instance (this may change every time you start the instance!) and port 39015.

After you entered all your data, you can press “test connection”. If you’re as lucky like me, a success message should appear

continue, continue, finish (or so) and the overview should look like this

Happy sidecar programming….

Assigned Tags

      9 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Lucia Subatin
      Lucia Subatin

      Nice sidecaring, Uwe! I'm super curious now, what are you planning to do with it?

      Author's profile photo Uwe Fetzer
      Uwe Fetzer
      Blog Post Author

      Hi Lucia,

      currently I'm searching for use cases. I'm working for a municipal energy supplier (IS-U), there must be use cases ("big data", machine learning, Graph database) ?

      Next step will be to connect one of our real SAP systems to our HANA instance.

      Author's profile photo Gregor Wolf
      Gregor Wolf

      Thank you Uwe for this great description. The great thing is that this also works with the HANA MDC that is provided in the SAP Cloud Platform Trial. You just get SAP Cloud Connector and create a On-Premise to Cloud connection:

      Author's profile photo Babu Kilari
      Babu Kilari

      Hi Greg - the HANA MDC in SCP trial comes only with HANA 1.0 SP01 version right ?

      Author's profile photo Gregor Wolf
      Gregor Wolf

      Correct for the Neo Environment. In the Cloud Foundry Trial you also have access to HANA 2.0 HDI Containers.

      Author's profile photo Babu Kilari
      Babu Kilari

      Thanks Greg. I didn't notice the Cloud Foundry trial. Let me explore that a bit. Having said that, perhaps it is a good opportunity to explore Uwe's Graph model via CF trial πŸ™‚

      Author's profile photo Babu Kilari
      Babu Kilari

      Hello Gregor Wolf - I was looking for setting up the HDI containers for HANA 2.0 and came across the below blog. Is it the same one that you were referring to in terms of "how to setup 2.0 HDI containers in Cloud Foundry trial" ?

      https://blogs.sap.com/2019/02/14/steps-to-create-a-hdi-container-type-db-using-sap-web-ide-in-the-cloud-foundry/

      Author's profile photo Gregor Wolf
      Gregor Wolf

      Yes, but check out also the linked tutorial and try also the way using the CAPM.

      Author's profile photo Babu Kilari
      Babu Kilari

      Thanks Greg. I was able to add the HDI Container using CF Trial through WebIDE full stack (Database Explorer). Next step is to try out Uwe's Graph modelling πŸ™‚ Thanks to both of you your help and guidance.