cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Hana Procedure designtime and optional parameters

Former Member
0 Kudos

I am trying to create a stored procedure in Hana Studio. In the stored procedure ,I am trying to give a default value to the input. my code is,

CREATE PROCEDURE defaultSchemaName.procedureName (IN INPUT NVARCHAR(10) DEFAULT 'TEST')

This runs fine when I am trying to create a .hdbprocedure but fails when I want to create a .procedure. Is there any way to use a default procedure in Design Time?

From a previous discussion which was carried on almost 2 years ago I understood that this feature would be available in SP06, we are now at SP09 but I still cant see it.

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>his runs fine when I am trying to create a .hdbprocedure but fails when I want to create a .procedure.

Why would you want to use a .procedure?  The .procedure format is obsolete and replaced with .hdbprocedure. You even receive a "Deprecated" message in the Studio when you try to create new .procedures.

0 Kudos

Dear Thomas,

This is because of legacy reasons where .procedure is already present in customer deployments. We want to enhance that procedure with an optional parameter to introduce new functionality. So is there a possibility to achieve this ?

Regards

Sreekanth

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>So is there a possibility to achieve this ?

Yes by changing the procedure over to an HDBProcedure. The process isn't really difficult and the runtime object remains the same. Don't expect new features to come to the old .procedure format since its deprecated. If new features are desired, that makes for a fine time to switch over to the new format.

Former Member
0 Kudos

Hi Thomas,

As I was scouring SCN for this issue, I came across this post which states that such a feature is available or rather should be available with Hana SP06.

If it is so, then such a feature should already be available with Hana SP09 on which we are currently.

So we aren't expecting a new feature but rather something that should already be available.

Thanks and regards,

Hitesh Jolly

Former Member
0 Kudos

Is the DEFAULT keyword not supported while creating scalar functions in HANA (.hdbscalarfunction) ?

We are trying to create a function with the default keyword. The function gets activated successfully, but while trying to invoke the function it throws an error :

mismatch input argument count for user defined function


We are receiving the error in Hana Rev 85