cancel
Showing results for 
Search instead for 
Did you mean: 

Using table types in hdbprocedure - CAP

jmtrujillogalan
Explorer
0 Kudos

Hi everyone,

Can be used table types as Store Procedure parameter? I read this post https://answers.sap.com/questions/459163/using-table-type-in-hdbprocedure-in-xs-advanced.html but I think only hdbtabletype is valid in CAP application.

Thanks!

vitaly_kozyura
Participant
0 Kudos

HI, Please explain in more details what do you plan to implement. Do you use node.js or Java? Regards, Vitaly

jmtrujillogalan
Explorer
0 Kudos

Hi Vitaly

I'm using node.js. I created a stored procedure with table parameters and i called it like this tutorial: developers.sap.com/tutorials/hana-cloud-cap-stored-proc.html. I want to use table type as parameter to avoid large structures:

//This is my code
Procedure "test" ( IN pi_parameter TABLE ( "Field1" NVARCHAR(10), "Field2" NVARCHAR(5)...)

//I Want
Procedure "test" ( IN pi_parameter tt_test )

But I can't use table type created with .hdbtabletype file because the system gave me an error: Table type isn't provided by any file....

Thanks and regards!

jmtrujillogalan
Explorer
0 Kudos

thomas.jung could you please help me? Thanks in advance!

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

So you talk about CAP but I'm not sure how that plays into this error. If I understand right you are creating an hdbtabletype and want to use that in the interface of the stored procedure? Is that correct? Or you are you referencing a table type generated out of CAP? This error that the type isn't provided by any file - is that error coming during the HDI deployment?

0 Kudos

Hi,

do you also have a file containing corresponding table type? Did you deploy them together to the same schema? Also please try to put double quotations around table type name like "tt_test"

Also, please, double check if using table type as input parameter is at all supported by npm packages "hdb" or "@sap/hana-client" as I am not sure about it.

Best regards,

Mikhail

Accepted Solutions (0)

Answers (0)