cancel
Showing results for 
Search instead for 
Did you mean: 

call hana stored procedure with table type parameter from abap

Former Member
0 Kudos

Hi, everyone, I'm new here and I'm new to SAP, either...So I need your help, please...

At this moment I am dealing with a job which needs to send a table variable to a Hana stored procedure. I created a test procedure in Hana like this:

drop type slt_dee300.tst_tb_in;

create type slt_dee300.tst_tb_in as table (

    tb_para_in nvarchar(10)

);

drop type slt_dee300.tst_tb_out;

create type slt_dee300.tst_tb_out as table (

    tb_para_out nvarchar(10)

);

drop procedure slt_dee300.tst_pr;

create procedure slt_dee300.tst_pr (

    in para_in slt_dee300.tst_tb_in,

    out para_out slt_dee300.tst_tb_out

)  

language sqlscript as

begin

    para_out=select tb_para_in as tb_para_out from :para_in;

end

And call this from ABAP like this:

data: begin of line,

       para_nvchar_in(10) type c,

       end of line.

data: tab_in like table of line.

line-para_nvchar_in = 'test1'.

append line to tab_in.

data: tab_out like table of line with header line.

EXEC SQL.

   connect to 'HANA' as 'CONN1'

ENDEXEC.

EXEC SQL.

   EXECUTE PROCEDURE SLT_DEE300.TST_PR_GK ( IN  :tab_in, OUT :tab_out )

ENDEXEC.

exec sql.

   disconnect 'CONN1'

endexec.

loop at tab_out.

   write: tab_out-para_nvchar_in.

endloop.

The program can be actived successfully, but come up with an error says: " feature not supported: Parameterized input table parameter is not allowed ".

Can anybody tell me why this occurs, and indeed how to solve my problem?

Thanks!

Accepted Solutions (0)

Answers (1)

Answers (1)

rindia
Active Contributor
0 Kudos

Hi Sheck,

ABAP 7.4 has new syntax

CALL DATABASE PROCEDURE TST_PR_GK IMPORTING....EXPORTING......

Please go through this document.

Regards

Raj