cancel
Showing results for 
Search instead for 
Did you mean: 

File upload to backend transaction using gateway and sap UI5

Former Member
0 Kudos

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?

Accepted Solutions (0)

Answers (3)

Answers (3)

SyambabuAllu
Contributor
0 Kudos

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

Former Member
0 Kudos

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.

0 Kudos

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 Kudos

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