Quantcast
Channel: SCN : Discussion List - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 5653

Pass multiple parameters via IN statement to HANA procedure

$
0
0

I have a requirement where I need to pass multiple single values to a procedure in HANA -

For example: I create a procedure called HANA_PROCEDURE with following input and output parameters.

 

  • INPUT: is a Scalar Parameter; has  data type VARCHAR and has length = 200

 

     Document number > VARCHAR(200)

     Account > VARCHAR (10)

 

HANA_PROCEDURE CODE:

 

BEGIN

"OUTPUT" = SELECT "DOCUMENT_NUMBER" "ACCOUNT" FROM _SYS_BIC_ANALYTICAL_VIEW

 

WHERE "ACCOUNT" IN (:INPUT)

GROUP BY "DOCUMENT_NUMBER" "ACCOUNT";

END;

 

Next i call the procedure -

call "_SYS_BIC"."user/HANA_PROCEDURE"(?,?)

pops up a "Prepared SQL tab" that prompts me to enter the input values. I enter one value =  input1 ....and it returns values

as soon as i enter 'value1', 'value2' it chokes and does not return anything.

NOTE: if i hard code the input values int he procedure code in this exact same format i,e, 'value1', 'value2'....works just fine and returns records for both the values.

 

I think the internal format for the input variables is getting messed up somehow. ANy ideas how i can get these multiple single inputs to work?

 

Thank you in advance.

 

  • OUTPUT: Table type with following fields

Viewing all articles
Browse latest Browse all 5653

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>