on 02-03-2016 2:47 AM
Experts,
I am building a custom Fiori application to display files that were attached by users in DMS. While testing the service in Gateway, I am getting output as below,
As seen above, I am not able to display my PDF file in Gateway. I am only getting <RESPONSE_BODY/> in the lower right pane and lower left pane file preview which is expected is missing.
I tried with XLS & XLSX files and output is the same. No preview in Gateway.
I am converting the file uploaded in DMS (CV01N Tcode) to XSTRING & then using GET_STREAM method of DPC class, I am trying to show it gateway.
Code used is as below,
ls_stream-mime_type = 'application/pdf'. " (For Excel, I pass as 'application/msexcel')
ls_stream-value = lv_fileasxstring. " --> This is XSTRING value of uploaded file
copy_data_to_ref( EXPORTING is_data = ls_stream
CHANGING cr_data = er_stream ).
To confirm whether file to xstring conversion is correct, I added code to re-convert the xstring back to binary(original file format) and downloaded it to my desktop. This works perfectly & file contents are displayed without any issues.
I read blogs in SCN related to file attachments in Gateway & still could not resolve my issue.
Can you please tell me what I am missing.
BR,
Aspire
Experts,
Can someone please help me in this regard. Kindly let me know if my explanation about issue is not clear.
BR,
Aspire
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.