cancel
Showing results for 
Search instead for 
Did you mean: 

Is this possible to do in calculation view?

iwan_santoso4
Participant
0 Kudos

I know how we can define a basic expression into a calculated field. I was wondering if we can attached a field either calculated field or in SQL Script based Calculation View where we can pass input parameters based on the selected fieds and defined a new field based on the returned value.

Let say a stored procedure ABC has 2 input parameters (both scalar parameter) and 1 output scalar parameter. I was wondering if we can call the procedure from select statement so that we can defined a new field based on this procedure.

SELECT field1, field2, Call ABC(field1, field2, result) as field3 from....

I could not find any such documentation and hoping someone experience this before and able to make this work.

Accepted Solutions (1)

Accepted Solutions (1)

former_member184768
Active Contributor
0 Kudos

Hi Iwan,

To my knowledge, I don't think this is possible in the format you need. You may write a complex select statement with subqueries / inner queries, case statements to some extend to have the complex logic involved in the procedure.

Alternatively, the procedure can return the result view after the complex calculation which can be used with select statement. But the output will not be scalar in that case.

Regards,

Ravi

iwan_santoso4
Participant
0 Kudos

That's what i thought so too... but looking at SQL for other databases, it seems feasible, well at least that;s what i hoped for. Thanks for confirming it though, I'll try the work around using multiple queries and or stored procedur

Answers (1)

Answers (1)

henrique_pinto
Active Contributor
0 Kudos

Unfortunately, HANA does not support the Function concept like Oracle does.

They'll probably come up with it in the following releases, since it's a constantly required functionality, but it's not there yet. 😕