Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to call a Hana Calculation View from HDB Procedure

Hi,

   I am implementing a hdb procedure which internally calls a Calculation view by passing a set of parameters.

One of these parameters is a variable .. defined in the procedure itself.

Can someone guide me on how I can call a calculation view (by passing variable parameters) from a hdb procedure.

Any help is highly appreciated.

Thank You.

Alekhya

Tags:
replied

Hello Alekhya,

the syntax in SQLScript is a little bit different than described above (which is for SQL queries).

Example

...

BEGIN

DECLARE lv_variable nvarchar(10) := 'dummy';

  lt_data = SELECT * FROM calculation_view ( PLACEHOLDER."$$PARAMETER_NAME$$ => :lv_variable );

END;

You have to address your parameters with PLACEHOLDER."$$<your parameter name$$".

So your query would look like following:

SELECT distinct "CASE_KEY" FROM "_SYS_BIC"."Deloitte.Innovation.saint.models/CASELISTFILTERS"

(

   PLACEHOLDER."$$EVT_SERIOUS_IND$$" => NULL,

   PLACEHOLDER."$$EVT_RELATED_IND$$" => NULL,

   PLACEHOLDER."$$FILTERTYPE$$" => 'S',

   PLACEHOLDER."$$BASECASEKEY$$ => :basecasekey

)

Best Regards,

Florian

2 View this answer in context
Not what you were looking for? View more on this topic or Ask a question