2012 Dec 14 5:45 PM
I am using the commands below, to generate PDF in background. The file was generated, but there is a lack on the file, some characters disappeared. Any idea why it happens?
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = v_spool_nr
IMPORTING
pdf_bytecount = v_pdf_filesize
TABLES
pdf = tg_pdf_output.
v_spool_nr_del = v_spool_nr.
CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
EXPORTING
spoolid = v_spool_nr_del.
v_bin_filesize = v_pdf_filesize.
OPEN DATASET v_arquivo FOR OUTPUT IN LEGACY BINARY MODE.
LOOP AT tg_pdf_output.
TRANSFER tg_pdf_output-tdline TO v_arquivo.
CLEAR wg_line-tdline.
ENDLOOP.
2012 Dec 14 6:27 PM
Solved, the problem was:
OPEN DATASET v_arquivo FOR OUTPUT IN LEGACY BINARY MODE.
LOOP AT tg_pdf_output.
TRANSFER tg_pdf_output-tdline TO v_arquivo.
TRANSFER tg_pdf_output TO v_arquivo.
CLEAR wg_line-tdline.
ENDLOOP.
2012 Dec 14 6:27 PM
Solved, the problem was:
OPEN DATASET v_arquivo FOR OUTPUT IN LEGACY BINARY MODE.
LOOP AT tg_pdf_output.
TRANSFER tg_pdf_output-tdline TO v_arquivo.
TRANSFER tg_pdf_output TO v_arquivo.
CLEAR wg_line-tdline.
ENDLOOP.