cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Execution of Stored Procedure using SELECT Statement

jyoti_senapati
Participant
0 Likes
2,880

Hi Experts,

Can a Stored Procedure execute from a Select statement in HANA

Example:-

SQL Stored Procedure MY_PROC(IN IP INTEGER, OUT MSG VARCHAR(10));

Can I execute above procedure using a select statement

like SELECT OUT_MSG FROM......

Please help me out here.

Regards,

Jyoti Prakash Senapati

View Entire Topic
pfefferf
Active Contributor
0 Likes

Hello Jyoti,

no, you cannot call a stored procedure from a SQL statement. If you wanna execute SQLScript coding from an SQL statement you have to use a User Defined Table Function.

With that you can write statements like SELECT * FROM myTableFunction().

Regards,

Florian

jyoti_senapati
Participant
0 Likes

Hi Florian,

Is there any way to call a stored procedure from a SQL Script Calculation View.

pfefferf
Active Contributor
0 Likes

Hi,

you can call read-only procedures within a scripted calc. view. But you should avoid to use scripted calc. views if possible. The way in the future is to use graphical calc. views and table functions if SQLScript is necessary.

Regards,

Florian

jyoti_senapati
Participant
0 Likes

Hi Florian,

Thanks for the information.

Need some thing that we can trigger a SQL Script Stored Procedure from BW.

So I thought keeping a SP inside a Script Calc View can help it.

Do you know any other way to achieve it ?

pfefferf
Active Contributor
0 Likes

Hello,

there are different ways how procedures or SQLScript can be called on BW. It is depending on what you wanna reach.

For instance you can

  • create ABAP Managed Database Procedures (containing your SQLScript logic and/or calling further procedures)
  • use AMDP transformations
  • use HANA procedures/functions in the Analysis process
  • ...

Regards,

Florian

jyoti_senapati
Participant
0 Likes

Hello,

Could please share any Document or link for Point 1 and 3.

It will be helpfull.

jyoti_senapati
Participant
0 Likes

Many Thanks Florian