Skip to Content
0

File upload to backend transaction using gateway and sap UI5

Jun 02, 2017 at 05:53 AM

427

avatar image
Former Member

Hi,

My requirement is to upload a image/document to attachment list in back end ie02 transaction using sap UI5 file up loader i have created an entity set of media type My question is that how would i get the key parameters from ui like equnr filename and xstring when i m redefining create stream method how would i create pay load in this case?

Can anyone suggest how to proceed in this case?

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

3 Answers

Nitin Mishra Jun 06, 2017 at 03:41 AM
0

Hi,

You need to pass the parameters like EQUNR, File name etc are as the SLUG parameters in Request header. Content type should be image/jpeg.

Please check below link where I have described image upload in MIGO from SAP UI5.

https://blogs.sap.com/2016/02/16/file-attachment-in-material-document-migo-using-sap-gateway/

Regards,

Nitin

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Jun 06, 2017 at 08:35 AM
0

Hi Nitin,

Thanks for the reply, as i see in your document you have used 'Add file ' feature to get the content of the image (Media resourse- value) but in my case image will be uploaded from SAP UI5 how would i get XString to gateway and pass to Create_stream method ? ..can i pass xstring in slug Parameters as key?

Regards,

Sailaja.

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

Hi Sailaja,

You dont need to pass the xstring in Slug parameter. In gateway Create Stream method will be used to receive the xsstring.

is_media_resource-value hold the string passed from UI.

In slug parameter you can pass file name or document number etc.

Regards,

NM

0
Syam Babu Jun 14, 2017 at 07:16 AM
0

Hi Sailaja,

Check with below link for how you will get the X STRING and send it back to GATEWAY Method

Attachment Upload through UI5

Thanks,

Syam

Share
10 |10000 characters needed characters left characters exceeded