Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Call procedure with overview from xsjs

Hi Experts,

I'm facing a problem when calling a procedure with overview from my web app. See here below the procedure:

create procedure "WEB".save" (in name varchar(100), in lastname varchar(100), out person "PERSON")

  LANGUAGE SQLSCRIPT

  SQL SECURITY INVOKER

  DEFAULT SCHEMA "WEB"

  AS

BEGIN

    PERSON = select :name as NAME, :lastname as LASTNAME from dummy;

END;

Using the with overview statement, the procedure should fill the OUT parameter that I'm informing with the result. When I call it from studio directly, works fine:

call "WEB"."save"('Roberto', 'Falk', WEB.person) with overview;

Here, table WEB.person is filled correctly, but when I call it from the xsjs, the table is not filled, and my try / catch in the xsjs file do not shows any errors.

Here how I'm calling from the xsjs file:

var conn  = $.db.getConnection();

var pc = conn.prepareCall("CALL \"WEB\".\"save\"('Web1', 'Web2', WEB.person) with overview");

pc.execute();

pc.close();                                                                         

conn.close();

Any ideas? I thought that might be an authorization issue, but the thing is that I'm connected with the same user in both tests.

Thanks and regards,

Roberto Falk

Tags:
Former Member
Former Member replied

Hi All,

a conn.commit(); solved the problem. I remembered that studio usually autocommits, so, commiting in the xsjs file solved the problem.

Thanks anyway.

Best regards,

Roberto Falk

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question