cancel
Showing results for 
Search instead for 
Did you mean: 

Call user-defined functions/procedures in SQL Views on DWC

06-16-2021 4:53 PM
Yong-Eun Participant
1754 views 2 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Dear SAP Community,

I would like to know if it is possible (or will be possible) to call user-defined functions/procedures in SQL Views on DWC using SQLScript language.

First, I tried to create a dummy function within a SQL View but it didn’t work as DWC said that DDL statements other than “CREATE/DROP TABLE” are not supported.

Then, using my Database User Group in System->Configuration, I went to the SAP Hana Database Explorer of DWC to access the schema corresponding to the space I use in DWC side.

Here I created my dummy function called TEST_FUNCTION.

I went back to DWC and I try to call my function. DWC recognize it but I get a privilege error.

Are we allowed to call user-defined function/procedures in SQL Views on DWC ? If so, what is the correct process to do so ?

Thank you for your help.

Best regards,

Yong-Eun KIM

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

kpsauer
Product and Topic Expert
Product and Topic Expert

Hi Young-Eun,

the way you have tried it does not work, but there is a way.

Create an Open SQL Schema in your Space with WRITE access. Then you can use the Database Explorer with that user to create and run your function, as well as CREATE and DROP tables. The Open SQL Schema allows more than just READ access as you have it with your Space-schema.

I wrote a blog some months ago with another use case (screens look slightly different now), but the same steps needed to create the Open SQL Schema as well as using SQL function in my second use case inside the blog.

Hope that helps

Best regards
KP Sauer

Yong-Eun
Participant

Hi klaus-peter.sauer4,

Thank you for your response and for your interesting blog link.

Using my dummy function in a view within the Open SQL Schema works.

Thank you for your help.

Best regards,

Yong-Eun KIM

Answers (0)