Skip to Content

Passing multiple images in Get_Stream

Hi All,

I have to pass multiple images of a material in my ODATA webservice . Right now I am able to pass a single image using $value in my GET_STREAM. Since GET_STREAM returns a structure as XML , I can't send multiple mime objects.

CALL METHOD copy_data_to_ref

           EXPORTING

            is_data = ls_mime

           changing

            cr_data = ER_STREAM

As far as $batch operation is concerned , as per my knowledge , it works only for POST request and not for GET.

Can anyone tell what will be the best way to achieve this??

Regards

Amber

         .

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Apr 06, 2016 at 04:15 AM

    GET is supported in $batch. So you can trigger multiple GET requests in a $batch and get one image each for each GET request.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 06, 2016 at 08:50 AM

    Hello Amber,

    You can use batch to read all those attachments if you have the information of all the images of the material before hand. If not then need to find some other way.

    As far as i know i do not see direct way to send back all those images of a material in Get_Stream method.

    Fro now one way which i can think of here is, implement GetEntitySet method and get all the binary content of the images for that material. Then on the UI use this content and try to render all those images.

    Regards,

    Ashwin

    Add comment
    10|10000 characters needed characters exceeded