05-30-2012 3:30 PM
Hi All,
I am facing an issue while converting SPOOL TO PDF.Generated spool contains 2 pages but whn i use covert to pdf FM namely
'CONVERT_ABAPSPOOLJOB_2_PDF' generated pdf contains only half PDF.I am using
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = w_spool_num_1
* no_dialog = c_x
* get_size_from_format = c_x
IMPORTING
pdf_bytecount = w_size_bytes
TABLES
pdf = is_pdf
EXCEPTIONS
OTHERS = 12.
and
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
authority = space
copies = 1
cover_page = space
data_set = space
department = space
destination = c_locl
expiration = 1
immediately = space
new_list_id = c_x
user = sy-uname
* layout = 'X_135_280'
* line_count = 1024
* line_size = 600
no_dialog = c_x
IMPORTING
out_archive_parameters = e_arparams
out_parameters = e_mstr_print_parms
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
any suggestions??
Thanks In Advance
05-30-2012 3:38 PM
Can you try this after the FM call.
* Transfer the 132-long strings to 255-long strings
LOOP AT it_pdf_output.
TRANSLATE it_pdf_output USING ' ~'.
CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
ENDLOOP.
TRANSLATE gd_buffer USING '~ '.
DO.
it_mess_att = gd_buffer.
APPEND it_mess_att.
SHIFT gd_buffer LEFT BY 255 PLACES.
IF gd_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
ENDFORM.
Full code here: http://www.sapdev.co.uk/reporting/rep_spooltopdf.htm