Skip to Content
avatar image
Former Member

File upload to backend transaction using gateway and sap UI5

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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Jun 06, 2017 at 03:41 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 06, 2017 at 08:35 AM

    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.

    Add comment
    10|10000 characters needed 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

  • Jun 14, 2017 at 07:16 AM

    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

    Add comment
    10|10000 characters needed characters exceeded