cancel
Showing results for 
Search instead for 
Did you mean: 

user defined function does not work in select statement

Former Member
0 Kudos

Hello,

I have a user defined function. But it does not work in select statement.

------------------------------------------------------

drop function FN_TEST2;

create function FN_TEST2

(vInput nvarchar(100))

returns vReturn nvarchar(100)

LANGUAGE SQLSCRIPT

as

begin

    vReturn := 'Hello_' || vInput;

end;

--------------------

select FN_TEST2('abc123') as X from dummy;

----> It works. Output: Hello_abc123

--------------------

select FN_TEST2(BUKRS) as X from T001;

----> It doesn't work.

------------------------------------------------------


Error message:

Could not execute 'select FN_TEST2(BUKRS) as X from T001' in 183 ms 883 µs .

SAP DBTech JDBC: [2048]: column store error: search table error: [6900] Attribute engine failed;L execution failed with rc=1697 ......



Where is my mistake???

BR

Y.Hu

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Please see thread

lbreddemann
Active Contributor
0 Kudos

Works for me on rev. 91...

Former Member
0 Kudos

Hi, Lars.

We were having a lot of troubles with something very similar.

We thought that this is kind of a bug, but I couldn't find any note about this.

Do you have a SAP Note about this error?

We have rev 85 and have similar issues with UDF, but we don't have rev 91 to test in that environment.

lbreddemann
Active Contributor
0 Kudos

Nope, I don't have a SAP note on that.

You can open a support incident to have that confirmed, though.