Skip to Content

How to implement GET_ENTITYSET for Media Stream

Hi Experts,

I have implemented GET_STREAM method to download the media entity. When I execute the service as /zservice/photo/$value media steam is getting downloaded.

I need to implement the GET_ENTITYSET method as well because this will be used in SMP Mobile and from mobile it will need to register the service by calling /zservice/photo. If this method is implemented its throwing "Invalid or no mapping to system data types found" error.

Please advise how to implement GET_ENTITYSET. Method doesn't need to return any results.


Regards,

Murthy

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Nov 19, 2015 at 10:58 AM

    Hi

    You can bind property "{__metadata/media_src}" - contain ../yourEntitySet/photo/$value.

    data.results[n].yourData

    .__metadata/media_src.

    Example

    sap.ui.Image({

    src: "{__metadata/media_src}"

    });

    OR

    oButtonOpenFile = new sap.ui.commons.Button({

    text: "Open",

    customData: [{ key: "URL"

    value: "{__metadata/media_src}"

    }],

    press: function(e){ window.open(e.getSource().data("URL", "blank") }

    });

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 26, 2016 at 07:21 AM

    Hi Murthy,

    Can you please suggest how you managed to achieved your requirement.

    Thanks,

    Laxman

    Add comment
    10|10000 characters needed characters exceeded