Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to Call HANA Procedure in ABAP

vivekbhoj
Active Contributor
0 Kudos

Hi Everyone,

I am new to ABAP

I have created a procedure in HANA that accepts two input parameters and outputs a table
I am using HANA as a Secondary Database
How can I call this procedure in my ABAP program?

Regards,

Vivek

1 ACCEPTED SOLUTION

jasmin_gruschke
Product and Topic Expert
Product and Topic Expert

Hi Vivek,
depends on how you would like to call it 🙂

1. Use native SQL to call the procedure (see report ADBC_DEMO_PROC_CALLS_HDB; available in any system with a minimum NetWeaver release 7.40 SP5).

2. Create a DB Procedure Proxy and call the DB Procedure Proxy ( only "directly" available if HANA is the primary DB underlying your system, for secondary DB system see discussion


3. (Method of choice available as of NetWeaver 7.4 SP5): Create an ABAP managed DB procedure (instead of the native HANA procedure) as described in

Cheers,

  Jasmin

5 REPLIES 5

former_member187673
Active Participant
0 Kudos

Hi Vivek, for secondary DB connection I think you will need to create a database procedure proxy programmatically as proxy cannot be created in ABAP Dev tools when HANA is secondary db. See here for details of the APIs for this - ABAP Keyword Documentation

Then you would use the CALL DATABASE PROCEDURE specifying the secondary HANA db connection to call your sqlscript procedure.

Peter

jasmin_gruschke
Product and Topic Expert
Product and Topic Expert

Hi Vivek,
depends on how you would like to call it 🙂

1. Use native SQL to call the procedure (see report ADBC_DEMO_PROC_CALLS_HDB; available in any system with a minimum NetWeaver release 7.40 SP5).

2. Create a DB Procedure Proxy and call the DB Procedure Proxy ( only "directly" available if HANA is the primary DB underlying your system, for secondary DB system see discussion


3. (Method of choice available as of NetWeaver 7.4 SP5): Create an ABAP managed DB procedure (instead of the native HANA procedure) as described in

Cheers,

  Jasmin

former_member213376
Participant
0 Kudos

Hi Vivek,

PFA the video link explaining the steps to call hana stored procedure with input parameters in ABAP. Hope you will find it useful.

Regards,

Prasana

balwant108
Explorer
0 Kudos

atul_mohanty
Active Contributor
0 Kudos

Hi Vivek -

1. Create a stored procedure in 'Modeler' OR in the project explore in the project explore view of 'SAP 'HANA development' prospective in HANA studio.

2. Create a proxy procedure in the ABAP prospective in HANA studio.

3. Then in the ABAP program you can call the procedure with  'CALL DATABASE PROCEDURE' by

   passing import and export parameters.

Here is wiki link - http://scn.sap.com/community/abap/hana/blog/2014/01/08/as

Might help you.

Regards,

Atul Mohanty