on 06-17-2017 8:19 AM
Dear Experts,
I would like to use a user defined table function in a cds view. But I will get a syntax error in CDS code editor.
Function definition:
FUNCTION "xyz.db.function::getUserClientIdsFromRoles" ( )
RETURNS TABLE ( "Id" NVARCHAR(10) )
LANGUAGE SQLSCRIPT SQL
SECURITY INVOKER
AS
BEGIN ..... END
View definition:
DEFINE VIEW UserClientView AS
SELECT FROM "xyz.db.function::getUserClientIdsFromRoles"()
{
Id AS "Client"
};
The WebIDE CDS Editor is showing an error in the view definition:
"CDS: error: Unexpected token "(""
Regards
Achim
Hi Achim!
Table functions were not available in Core Data Services view definition since XS and HANA 1.0. I don't know reason why, and it's not clearly stated in SAP official docs. There are workarounds how to overcome this, but they are weird and I gave up and implemented same logic into the view itself.
Regards, Valery
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Achim:
I don't know what causes that problem, but I have alerted some colleagues on the WebIDE team to the problem you are seeing.
Regards,
Carl Soane
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
10 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.