cancel
Showing results for 
Search instead for 
Did you mean: 

HANA XSJS Bulk Update (PUT operation)

Former Member
0 Kudos

Hi all,

I have a scenario to do Batch operation/ bulk update on my Hana table.

To perform this I suppose to use HANA XSJS.

I have a SAPUI5 screen with 10 text boxes, as soon as user fills the text box and enters the save button, the complete 10 fields should get updated into HANA table via XSJS with serial numbers.

Can you please help me to figure this out.

Regards,

Vicky.

Accepted Solutions (0)

Answers (1)

Answers (1)

thamizharasan
Explorer
0 Kudos

Hi,

You can use odata update() method for the PUT request. Use this link for reference OData Write Support - UI Development Toolkit for HTML5 (SAPUI5) - SAP Library

Regards,

ThamizharasaN.

Former Member
0 Kudos

Hi Tamil,

I am looking for PUT operation in XSJS. The link which you gave has Odata operations.

Regards,

Vicky

Former Member
0 Kudos

Hi Vicky,

Using ODATA service you can only insert one record at a time, hence this will not be of use for your scenario.

As your using XSJS, you can create a procedure which accepts table type as input parameter, inserts all the records passed to this table type into your respective table as logic.

You can call this procedure inside XSJS and pass the captured input values from front end which will serve the purpose.

Regards,

Anil

Former Member
0 Kudos

Hi Anil,

Can you pls tell me whether this scenario is possible.

If we enter 10 values first in the text fields and press Next button, which pushes data into an array and enter next 10 values in the same text fields and press save button. How we can handle and update that request in our procedure via XSJS to our table?

Regards,

Vignesh.

Former Member
0 Kudos

Hi Vicky,

This is absolutely possible. Once the next button is pressed the captured values in the array has to be pushed to table, hence call the procedure.

Inside the procedure you can have an UPSERT statement which will insert the values into the table.

Once user enters next 10 values and presses save button, the same procedure can be called which will insert it if its new values or does update if its existing values.

This way concurrency can be maintained.

Regards,

Anil