Skip to Content

How to insert data into a table type in sap hana?

Apr 21, 2017 at 02:05 PM


avatar image
Former Member

Hi all,

Requesting your help to recreate a row type data entry and data retrivel kind of operations in sap hana.

I am unable to assign any data or variable information into sap hana table type variable.

I am to access the data only as a out parameter in a stored procedure for those which return a specified result set.

Kindly help me out to put data in table type and do manipulative operations above it.

Thanks in advance

With warm Regards

Aswin Sankar M

10 |10000 characters needed characters left characters exceeded

Please show your example and describe with that example what issues you have.

Former Member

Hi Florian,

i am developing the replica of a oracle procedure in sap hana.

Now i have code like below

create procedure proc1

( var0 in pls_integer

,var1 out table1%rowtype



var1 table1%rowtype

cursor c1 as

select * from table1

where c1 = var0;


open c1

fetch c1 into


close c1


here as a substitute for row type i am utilizing the table type of SAP hana but as such it is not allowing me enter the data in the table type variable and only cache the data from some procedure.

Please help me in sorting this out thanks !

With warm Regards

Aswin Sankar M


Maybe you can describe your business case and why you wanna fetch data from a cursor and store it in a table variable instead of doing the select directly (with storing the data in a table variable).

* Please Login or Register to Answer, Follow or Comment.

1 Answer

Sergio Guerrero Apr 21, 2017 at 02:31 PM

if on HANA 2.0 SPS1 - here is a blog from Rich

for prior releases ...

you will need to select into the var... like

varA = select * from :varA inner join <other table> on condition .....


varA = select * from :varA union select * from :varB; /// make sure the columns are the same

hope this helps

10 |10000 characters needed characters left characters exceeded