on 01-03-2014 2:07 PM
hi,
is it possible to return two tables in a function...as we can return two scalar variables in a function in hana?
thanks& regards
sonchita
Hi Sonchita,
As of now,we can only return one Table in a function, two or more tables are not yet supported.
You can refer this link [http://help.sap.com/hana/SAP_HANA_SQL_Script_Reference_en.pdf] [Page No. 39].
Just a suggestion, you can use HANA DB procedure to achieve the same above usecase. There you can create one more tables type structures as output.
Hope this helps.
Best Regards,
Vaibhav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Viren,
You can create procedure in HANA under package of "Content" folder by right click on package then click on procedure[Refer screenshot 1].
Then on right side, you can create multiple outputs let say [OUT_1 and OUT_2] and input parameter[IV_TOP].[Refer Screenshot 2].
OUT_1 and OUT_2 are of Table Type and IV_TOP is of scalar type.
Then, you can populate those output parameters using SQL SCRIPT like mentioned below.
BEGIN
OUT_1 = select top :iv_top COMPANY_NAME from SNWD_BPA;
OUT_2 = select top :iv_top SO_ID from SNWD_SO;
END;
Hope this helps.
Best Regards,
Vaibhav
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.