on 10-19-2015 7:15 PM
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
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
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.