Skip to Content

SAPUI5 UploadCollection - send multiple files to GOS attachments?

Jun 09, 2017 at 08:47 AM


avatar image

Wondering if anyone has managed to get the SAPUI5 UploadCollection control to work with sending multiple files to the ABAP backend and saving them as GOS attachments.

I have long had this working with single files only. In the OData data extension class' create_stream() method I use the method cl_fitv_gos=>save() to save the atachment into GOS.

This works perfectly well and cl_fitv_gos=>get_links() can be used to read the attachments...

I'm using the UploadCollection in instantUpload="false" mode so that we have to call Upload() to get it to send the files.

However with the UploadCollection sending multiple files only the last file seems to be saved in the database. I have debugged the UploadCollection javascript and it is correctly processing the list of files on the frontend and using xHR to post each one separately to SAP Gateway.

If I debug the ABAP code the cl_fitv_gos class says its saves the file without error. But its not. Or - somehow subsequent files are overwriting the first file. I suspect the issue may be inside the internal SO_DOCUMENT_INSERT_API1 function call.

I also notice that this class (cl_fitv_gos) calls commit work and wait after creating the binary relation. So I have implemented the code in the class myself without the commit work in case that was causing the issue but there is no difference.

Any ideas.....?

Or has anyone managed to do this another way..?

(EHP8 ERP systems)

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

harish vyas Aug 28, 2017 at 04:10 AM

Hi Jason,

Need your inputs on UploadCollection UI element, I am developing a fresh application on UploadCollection UI element and still struggling to make it work.

For me CREATE_STREAM method of DPC_EXT class is not getting called, can you help me in knowing possible reason for this.

I assume you have working code, will it be possible to post here so that I can get some more insight.

-> "File Upload Failed" is the error message.



10 |10000 characters needed characters left characters exceeded