03-11-2014 9:51 AM
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
03-11-2014 11:45 AM
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
03-11-2014 11:44 AM
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
03-11-2014 11:45 AM
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
03-12-2014 11:10 AM
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
03-13-2014 1:49 PM
03-13-2014 2:41 PM
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