on 08-07-2015 8:50 AM
Hello,
I am trying to fetch image via odata service. To do this i have redefined GET_STREAM and filled the raw data and using below GET request.
/sap/opu/odata/SAP/ZTESTATTACHMENTS_SRV/AttachmentSet(Pernr='12345678')/$value.
I get the status code = 200, but in the response body i only see <RESPONSE_BODY/>, can't see photo..what could have gone wrong...
Regards
Pradeep
Hello Pradeep,
Please check if appropriate mime_type is sent back in GET_STREAM method.
Say for example,
If file is 'jpeg' then with value, mime type should be mapped back so that it will be rendered correctly.
DATA: ls_stream TYPE ty_s_media_resource.
ls_stream-value = <value>.
ls_stream-mime_type = 'image/jpeg'.
Regards,
Ashwin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.