Skip to Content
author's profile photo Former Member
Former Member

Can't create HANA Scalar User Defined Function

I have this simple function, I get the usual not recommended to create a scalar UDF. In the SAP Hana Administration console it's created the UDF anyway. If I try to create the UDF from HanaCommand with ExecuteNonQuery it does not create the UDF. I've looked everywhere and I haven't found any way to pass through this.

I need help ASAP, as if this is not fixed I will have to tell the client's to manually install the AddOn because of the way SAP HANA is limited.

CREATE FUNCTION "Total"(DocEntry int) returns retVal decimal(19,6) LANGUAGE SQLSCRIPT SQL SECURITY INVOKER AS Begin select IFNULL(SUM("Price"*"LineTotal"), 0) into retVal from RDR1 where "DocEntry" = :DocEntry; End;

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Nov 23, 2016 at 09:57 PM

    Hi Youval,

    First things first: please bear in mind that this is not a 24x7 support channel. It's a public community and not suitable for critical cases (if that's your scenario). If you need urgent/critical support you can use SAP support.

    Now for your technical issue: you did not specify completely how you're reaching the issue here (nor its details). I'm guessing you tried to create a function over an ODBC ExecuteNonQuery method. Can you share your sample code and steps to reproduce that issue?

    Best Regards,

    Lucas de Oliveira - Moderator

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.