Skip to Content

how to convert spool to PDF if pages more than 100

Hi

I want to convert spool to PDF if pages more than 100 and send it to application server.

if pages are less than 99 then it is working fine.

CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'

EXPORTING

src_spoolid = wv_rqident

no_dialog = wc_x1

TABLES

pdf = wt_pdf

EXCEPTIONS

err_no_otf_spooljob = 1

err_no_spooljob = 2

err_no_permission = 3

err_conv_not_possible = 4

err_bad_dstdevice = 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.

CONCATENATE '/expc_var//EGYPT/' ws_regup-laufd ws_regup-laufi '.PDF' INTO wv_file.

OPEN DATASET wv_file FOR OUTPUT IN BINARY MODE.

LOOP AT wt_pdf INTO ws_pdf. TRANSFER ws_pdf TO wv_file.

ENDLOOP.

CLOSE DATASET wv_file.

Please suggest me how to achieve it?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Dec 15, 2016 at 05:45 PM

    The note 1833550 - Creating or Converting Large PDF Files explains that if the PDF is more than 99 pages, it may go to a background job (and so nothing is returned by the function module); you may avoid this drawback by passing the parameter NO_BACKGROUND = 'X' which does not start a background job, and more than 99 pages may be returned by the function module.

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 15, 2016 at 03:52 PM
    Add comment
    10|10000 characters needed characters exceeded