/scripts/ahub.form.attachments.js
0

PROCEDURE call in XSODATA services

May 29, 2017 at 12:40 PM

333

avatar image

Hi Experts,

I am creating a XSODATA services file, where in i am using stored procedure(SQL Script) for updating the entries back in the HANA Custom table.

say for eg: "TEST" is my SCHEMA and "PROCEDURE" is my stored procedure.

XSODATA service file:

service namespace "Test.services" {

"TEST"."TABLE" as "mytable"

create using "TEST"."PROCEDURE";

}

When i'm using a procedure in xsodata services, getting the syntax error like below

Syntax error at line: 3, column:14.

Hence, i've tried creating a script view procedure under a test package with input & output parameters. I'm calling this procedure in my xsodata service file and getting this error saying "Invalid procedure or parameter list in procedure".

XSODATA service file:

service namespace "Test.Services"{

"TEST"."TABLE" as "mytable"

create using "TEST::PROCEDURE";

}

I am doing it for the first time, can you guys revert back with the solution.

I am confused of using the SQL script based procedure & hddbprocedure. which one i should use for this XSODATA services and what are the differences between these two types of procedures..!!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Florian Pfeffer
May 29, 2017 at 04:11 PM
0

From your description (last sentence) it is not clear what you are using, a procedure created via SQL or a procedure created via a design-time object (via the obsolete .procedure extension or via the .hdbprocedure extension).

You should go with .hdbprocedure. With that you define a procedure design-time artifact which creates a runtime procedure during activation. The name of the design-time artifact can be used in the OData write exit. Regarding the error of the wrong procedure or parameter list you should post here the name and the interface of the procedure, so that the people here are able to check it. But all points regarding the interface etc. are described in the offical help already: Custom Exits for OData Write Requests

Regards,
Florian

Show 3 Share
10 |10000 characters needed characters left characters exceeded

I've created a update_hddat2.hdbprocedure and i am calling this procedure using statement "CREATE USING" in my .XSODATA file.

while activating the services, i'm getting the below error

procedure.png (6.5 kB)
xsodata.png (7.3 kB)
error.png (2.7 kB)
0

One issue which can be seen is, that the procedure has no output parameter for the error(s). Check the documentation linked above please.

1

Exactly, the issue is resolved now. Output parameter is mandatory..!! Thank you very much Florian Pfeffer.

0
Skip to Content