Skip to Content

Consume oDataService to create a document

May 30, 2017 at 02:00 PM


avatar image

Dear Experts

I followed the Blog 'File Upload/Download through NetWeaver Gateway' .

Now I would like to consume this oDataService from a SAPUI5 Application. The View Type of the Application is XML and I am using the sap.m.UploadCollection.

On the Gateway I have the following Request-URI:


Where in the Controller.js file do I have to call the oDataService?
And how do I call the oDataService?

Thanks for the kind support.

Best regards

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

1 Answer

Sharath M G May 30, 2017 at 03:47 PM

Check the link for uploading the files.

The oData service can be used when the user clicks on the upload button/event accompanying the control.



Show 2 Share
10 |10000 characters needed characters left characters exceeded

Dear Sharath

thank you for the reply. I did already look at this documentation and example but I don't get it. The Example is using Json but the type of my application is XML and I was not planning to use any Json. Do I have to?

And even more important what is the exact Syntax I have to use to call my oDataService (/sap/opu/odata/sap/<MY-FUNCTION>/FileSet('<my_filename>')/$value)?

and in which function do I need to place the call? Is it 'onUploadComplete'?

I already called oDataServices with filters and stuff in other projects but never a 'PUT' oDataService.

Thanks and best regards


Hi Christoph,

Have you managed to made UploadCollection UI element working.

After going through many blogs I noticed that CREATE_STREAM method of DPC_EXT class is called when we try to upload document using this UI element.

But in my case CREATE_STREAM method is not triggering.

Do you have working code for this UI element. It will be really helpful if you can share the same so that I can understand how this UI element works.