cancel
Showing results for 
Search instead for 
Did you mean: 

XSODATA with .hdbprocedure in SAP HANA Web Development Workbench

former_member494689
Participant
0 Kudos
247

Hi Experts,

When the xsodata with procedure is created, the following error is occurred.

What action should do to solve this? Please.

1) Create table which named "MY_TABLE".

CREATE COLUMN TABLE "TEST"."MY_TABLE"(

"EMP_ID" CHAR(10) CS_FIXEDSTRING NOT NULL,

"EMP_NAME" VARCHAR(50) CS_FIXEDSTRING NOT NULL,

"DEPARTMENT" VARCHAR(50),

PRIMARY KEY ( "EMP_ID" ) );

2) Create the .hdbprocedure using hana development workbench.

PROCEDURE "TEST"."demo.test01::MyTable" (

IN NAME STRING,

OUT resultFlg INT )

LANGUAGE SQLSCRIPT

SQL SECURITY INVOKER

--DEFAULT SCHEMA <default_schema_name>

AS

BEGIN

/************************************* Write your procedure logic *************************************/

delete from "TEST"."MY_TABLE" where NAME = :NAME;

select count(*) into resultFlg from "TEST"."MY_TABLE" where NAME = :NAME;

END

3). Create the xsodata using the created procedure.

service {

"TEST"."MY_TABLE" as "MyTable"

delete using "demo.test01::MyTable";

}

As a result, cannot activate the xsodata successfully. The following error is occurred.

・Invalid parameter type in signature of procedure "demo.test01::MyTable". Only table types are allowed.

Best Regards,

Thiri

Accepted Solutions (1)

Accepted Solutions (1)

pfefferf
Active Contributor

The interface of your procedure does not match the requirements for an SQLScript procedure exit.

It can only have two parameters:

  • One input parameter typed to the entity.
  • One output error parameter.

For details please check the documentation here.

former_member494689
Participant
0 Kudos

Hi Florian,

Thanks for your feedback.

I have tried the provided link and it is working when I changed the parameter.

But, two 'IN' parameters and one 'OUT' parameters are needed for 'UPDATE'.

So, I created the hdbprocedure and xsodata with 「update using "demo.test01::EmpUpdate"」.

Normally, the update process is 「oModel.update (sPath, oEntryData, {success: function(){}, error: function(){}}」.

The problem is how can we pass that two parameters for update using xsodata from SAPUI5.

Please kindly point us.

Best Regards,

Thiri

pfefferf
Active Contributor
0 Kudos

What is your additional question here? In your original question you talked about deletion, now you are talking about updates and it seems it is more a UI5 related question, than regarding the XSOData procedure exit. So what problem you have exactly now.

former_member494689
Participant
0 Kudos

Hi Florian Pfeffer,

Sorry for confused question.

Yes, correct. My original inquiry is about xsodata.

My main target is to call the created xsodata from SAPUI5.

As first step, the hdbprocedure and xsodata is created for Create, Update and Delete operations.

For the next step, I need to call the created xsodata from SAPUI5.

So, I questioned above and would like you to answer if you could provide.

(I am sorry for deviation from original question).

Best Regards,

Thiri

former_member494689
Participant
0 Kudos

Hi Florian Pfeffer,

I got it (calling xsodata of 'UPDATE' from SAPUI5).

Thank you.

Best Regards,

Thiri

Answers (0)