cancel
Showing results for 
Search instead for 
Did you mean: 

Input parameter using a scalar UDF

former_member351460
Discoverer
0 Kudos

I am trying to use a scalar UDF in an input parameter.  I can use a stored procedure but when I try to find the function, it doesn't come up.  As you see below, the function is available and I can use it in a normal Select statement.  But when I try to find the function in the Input Parameter definition, it comes up 'No results found'.  Is there anything I need to specifically to make it available?  I copied the function code below.


CREATE FUNCTION ZFCC.Z_FISCAL_MONTH (ip_yyyymm_from nvarchar(6))

RETURNS ip_yyyymmm_from nvarchar(7)

LANGUAGE SQLSCRIPT

SQL SECURITY INVOKER AS

BEGIN

ip_yyyymmm_from := left(:ip_yyyymm_from,4) || '0' || right(:ip_yyyymm_from,2);

END;

Accepted Solutions (0)

Answers (1)

Answers (1)

RashmiAcharya
Advisor
Advisor
0 Kudos

Hi Hussein,

I think Scalar UDFs as repository artifacts (.hdbscalarfunction) are only supported for using inside input parameter.

You can create same scalar UDF from SAP HANA Developement perspective in you package and try to search the same after activation in your view's input parameter.

Goto SAP HANA Developement perspective > goto Repositories tab > Right click on your system and Create Repository Workspace. After creating workspace, right click on you package > New > Other... > search text Scalar. Select Scalar Function > Next > Give name of your scalar UDF > Finish. Enter you function code> Save. Right click on the .hdbscalarfunction created > Activate.

Now try to search this scalar UDF in you input parameter in Modeler perspective.

Hope this resolves your issue.

Regards,

Rashmi