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: 

Trying to call HANA procedure via ABAP

Former Member
0 Kudos

Hi everyone,

   I am using ABAP in Eclipse in order to call a HANA procedure within a BPC process chain. While referring to an SCN blog written by Baris Cekic, I have put together a working ABAP Class. This works as my proxy to a functioning HANA stored procedure. My issue is with the ABAP program I am using for the process chain. I believe that I'm passing my input parameter using the wrong format. Please bear with me, as I am not an ABAP programmer! Any help would be much appreciated! Please take a look at the screenshots. Thanks!

ABAP CLASS - ZCL_BPC_AMDP:

HANA PROCEDURE - ZPROC_BPC_AMDP:

ABAP PROGRAM - ZBW_BPC_AMDP:

This is my issue!! -----> INPUT of SP Name: (I've tried with and without the schema):

ABAP PROGRAM ERROR:

1 ACCEPTED SOLUTION

jasmin_gruschke
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Anand,
you should preferentially use "NVARCHAR" instead of the non-unicode derivate "VARCHAR". As ABAP supports both unicode and non-unicode systems, we only allow the mapping of Strings/character literals from ABAP to NVARCHAR variables in HANA in all ABAP on HANA systems.

Please find an example of a _SYS_BIC procedure in an AMDP in class CL_EPM_OIA_SIMP_BP_CLSF_AMDPDT (method AMDP_GET_BP_CLASSIFICATION). Should be available in your system.

And you can additionally try to execute the call you put into the AMDP directly in the HANA SQL console.

Cheers,

  Jasmin

6 REPLIES 6

jasmin_gruschke
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Anand,
you should preferentially use "NVARCHAR" instead of the non-unicode derivate "VARCHAR". As ABAP supports both unicode and non-unicode systems, we only allow the mapping of Strings/character literals from ABAP to NVARCHAR variables in HANA in all ABAP on HANA systems.

Please find an example of a _SYS_BIC procedure in an AMDP in class CL_EPM_OIA_SIMP_BP_CLSF_AMDPDT (method AMDP_GET_BP_CLASSIFICATION). Should be available in your system.

And you can additionally try to execute the call you put into the AMDP directly in the HANA SQL console.

Cheers,

  Jasmin

0 Kudos

Thank you Jasmin, this was very helpful!

0 Kudos

Could you solve the problem ?

0 Kudos

Hi Sreehari,

   It ends up that I was pulling the stored procedure recursively. The abap program was calling the stored procedure which in turn was calling itself. I basically had to start over! I created a new stored proc, a new abap class, and finally a new abap program. It was my lack of ABAP experience that made this tough. By the way, I really liked your "AMDP What's Happening" article. Awesome stuff and very helpful! 

0 Kudos

Thanks Anand BTW Close the thread .

Former Member
0 Kudos

First thread...thanks.