on 02-27-2008 3:37 PM
Hi All!
We have an issue with the filedownload UI control.
we get data from R3 in a RFC modul, which makes use of the CONVERT_ABAPSPOOLJOB_2_PDF
We get the data in a TLINE.
We have tried to bind the TLINE directly to the FileDownload data, and then setting the mime to application/pdf.
This however does not work.
Can anyone please help?
Best regards,
Ronni Hostrup
Hi Thanks for helping!
The problem was on the RFC side, which was missing some details regarding how ot parse the PDF data to the right format.
But thanks all anyway
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ronni,
Does this help:
DATA:
lh_spoolno TYPE rspoid VALUE '26501', => just an example of a spoolid
lh_pdf_bytecount TYPE i,
lh_pdf_xstring TYPE xstring.
FIELD-SYMBOLS:
<lh_hex> TYPE x.
DATA:
lwa_pdf TYPE tline.
DATA:
li_pdf TYPE tlinetab.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = lh_spoolno
no_dialog = 'X'
pdf_destination = 'T'
IMPORTING
pdf_bytecount = lh_pdf_bytecount
TABLES
pdf = li_pdf
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
IF sy-subrc = 0.
LOOP AT li_pdf INTO lwa_pdf.
ASSIGN lwa_pdf TO <lh_hex> CASTING.
CONCATENATE lh_pdf_xstring <lh_hex>
INTO lh_pdf_xstring IN BYTE MODE.
ENDLOOP.
cl_wd_runtime_services=>attach_file_to_response(
i_filename = 'spool.pdf'
i_content = lh_pdf_xstring
i_mime_type = 'application/pdf'
i_in_new_window = 'X'
i_inplace = 'X' ).
ENDIF.
Kind regards,
Minda Bouland
Edited by: Minda Bouland on Feb 29, 2008 1:18 PM
Edited by: Minda Bouland on Feb 29, 2008 1:19 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
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.