on 09-16-2019 5:56 AM
Dear Experts,
Could you please let me know what is the best approach while sending more than thousands or records(rows with columns to the tune of 7 to 10 columns) from an SAPUI5 application(like Exel Upload) to SAP Backend System vial an OData service?
Should we club each of the 100 records to a single OData call followed by 100-200 in second call followed by 200-300 etc?
Kindly let me know your thoughts.
Thank you,
Jakes
Hi Arun,
There could be performance issues if you process the file at UI layer and send the data in multiple batch calls. Instead I would suggest to send the whole file as an attachment to the back-end.
Now, if the file content is to be processed in to some transaction in backend, for huge files, the suggested method is to push contents of excel to a staging table with status (Z table) and return to UI with a message.
Contents of the staging table could be processed in background jobs updating the status. Once processing is complete you could update user with a Push Notification (Fiori Niotifications). Its better to take a reference/description from user while uploading and include this in the Fiori Notification. This way user could figure out which of his uploads has completed.
On click on notification, you could take user to a list report which shows processing status of the reference's execution.
As a rule of thump - Keep the UI simple and only for presentation
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arun Jacob,
I would suggest you to use the stream operations in odata service and upload the attachment to the backend system and there you can read the attachment and the data using the excel tools. For e.g., https://github.com/ivanfemia/abap2xlsx or anyother FM if you have.
for ui5 and odata stream functionality, lots of blogs are there, one such:
https://blogs.sap.com/2018/06/22/media-handling-in-odata-in-sap-ui5/
Then in the backend, just process the data as you wish. This would increase the performance of your application by many times.
Thanks,
Mahesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mahesh,
Thank you for your response. I am not looking at how to process Excel Data at Backend. I would like to know how we would split the OData calls from the Frontend(at SAPUI5 application processing step). Instead of passing all the data rows(for example, if the excel sheets had 500 rows), we would pass 1-100 rows in one OData call and 101-200 in second OData call etc.
Is there any better way?
Thank you,
Jakes
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.