Skip to Content
Nov 22, 2016 at 02:57 AM

HANA Procedure with Dynamic from clause and returning a table as output parameter


Hi guys, I am facing a problem here, still not working. I created a select procedure with table name as input and a table as an output.

Input: ip_tablename

Output: table_return_pos

Then, I have concatenate my SQL in a variable, like this:

lv_sql := 'select MY_POS_LIS from ' || :ip_tablename || ';';

During my check, I am getting the following error, which means, I am still missing my output parameter

Message :

some out table variable is not assigned: TABLE_RETURN_POS

I have tried many ways to include that in my script with no success. Each time is a different message. If I create same procedure with no return and use CALL, works fine, but, I need to get the records back.

I am calling it from an ABAP code.

Thanks in advance,