Hi Everyone,
New scenario: uploading and downloading file using SAP Netweaver Gateway .
Dont know how to solve this one .
I like to have ur valuable suggestion and Advice for this requirement.
Thanks in Advance,
Regards,
Jibin JOy
Request clarification before answering.
Hi john.patterson3
https://answers.sap.com/questions/13885261/downloaded-file-not-working-with-uploadset-sapui5.html
this is my get_stream. File downloads with 1 KB but corrupted.
Could you please advise on what might be going wrong?
METHOD /iwbep/if_mgw_appl_srv_runtime~get_stream.
DATA ls_lheader TYPE ihttpnvp.
DATA : ls_media TYPE zdtt_insp_media.
DATA(lt_keys) = io_tech_request_context->get_keys( ).
DATA(lv_inspid) = VALUE #( lt_keys[ name = 'INSP_ID' ]-value OPTIONAL ).
DATA(lv_filename) = VALUE #( lt_keys[ name = 'FILENAME' ]-value OPTIONAL ).
ls_lheader-name = 'Content-Disposition'.
* ls_lheader-value = 'outline; filename="Mobile.pdf";'.
ls_lheader-value = |outline; filename={ lv_filename };|.
set_header( is_header = ls_lheader ).
IF lv_inspid IS NOT INITIAL AND lv_filename IS NOT INITIAL.
SELECT SINGLE FROM zdtt_insp_media
FIELDS insp_id, filename, cr_date,cr_time,value, mimetype
WHERE insp_id = @lv_inspid
AND filename = @lv_filename
INTO ( @ls_media-insp_id,@ls_media-filename,@ls_media-cr_date,@ls_media-cr_time,@ls_media-value, @ls_media-mimetype ).
IF sy-subrc EQ 0.
copy_data_to_ref( EXPORTING is_data = ls_media
CHANGING cr_data = er_stream ).
ENDIF.
ENDIF.
ENDMETHOD.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.