on 02-13-2013 12:32 AM
Hello Everyone,
I have to check output tables in procedure and also want to test the procedure.
This proc contains all input and output as table types.Not sure how to test it.Can anyone help me to understand with an example.
I found the below syntax:
Syntax:
CALL <proc_name > (<param_list>)
Syntax Elements:
<param_list> ::= <param>[{, <param>}...]
Specifies procedure parameters.
<param>::= <in_table_param> | <in_scalar_param> |<out_scalar_param> |
<out_table_param>
Parmeters can be of table or scalar type.
<in_table_param> ::= <read_variable_identifier>|<sql_identifier>
Thanks,
Kiran
Hello Kiran,
Please explain from where you want to test. Do you want to test with HANA Studio?
If yes then you need to create a wrapper test procedure to pass the input table type to called procedure. The code would look like below for the test procedure.
After that you can directly use call test_procedure() from studio.
/********* Begin Procedure Script ************/
BEGIN
-- Generate multiple rows for input test. Dummy is really a HANA dummy table
-- If you have test data in some other table then you can use that as well
lt_input_tab = select 'f11' as field1, 'f12' as field2 from dummy
union
select 'f'21' as field1, 'f22' as field2 from dummy;
call <schema>.<procedure> (:lt_input_tab, et_output_tab);
select * from :et_output_tab;
END;
/********* End Procedure Script ************/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.