Convert Spool To Pdf In Background

Convert Spool To Pdf In Background Rating: 6,4/10 5728votes
Iseries Convert Spool To Pdf

May 30, 2007 Convert Spool request to PDF and send as e-mail. *& This program can be run in background or online and a spool request *. PERFORM convert_spool_to_pdf. Converting Print spool output in to a PDF in. Enter the Second spool number(the one got in background job). And I need to figure out how to convert them to PDF.

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.

CLOSE DATASET wv_file. Please suggest me how to achieve it? Thanks Raymond. Implemented logic as below to place the data into application server but taking around one min time to finish the background job if spool have morethan 100 pages. In this case I am not getting spool number until background job finished so program should wait one min after the calling FM'CONVERT_OTFSPOOLJOB_2_PDF'. Can you please suggest me. CONCATENATE '/expc_var/archive/emi/EGYPT/' ws_regup-laufd ws_regup-laufi '.PDF' INTO wv_file.

IF wv_zbukr = '0845'. CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF' EXPORTING src_spoolid = wv_rqident no_dialog = wc_x1 IMPORTING btc_jobname = wv_jobname btc_jobcount = wv_jobcount 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.

IF wv_jobname IS NOT INITIAL AND wv_jobcount IS NOT INITIAL. SELECT listident FROM tbtcp UP TO 1 ROWS INTO wv_spool_nr WHERE jobname = wv_jobname AND jobcount = wv_jobcount. *REPORT TO DOWNLOAD PDF SPOOL TO GUI SUBMIT zfi_rstxpdft5 WITH spoolid = wv_spool_nr with fs_serv = 'X' WITH serv_fn = wv_file AND RETURN. ELSEIF wt_pdf[] IS NOT INITIAL. OPEN DATASET wv_file FOR OUTPUT IN BINARY MODE.

LOOP AT wt_pdf INTO ws_pdf. TRANSFER ws_pdf TO wv_file. CLOSE DATASET wv_file.

Author: Naresh Submitted: Dec. 11, 2007 The code below demonstrates how to retrieve a spool request and email it as a PDF document. Please note for the below program to process a spool request the program must be executed in background otherwise no spool request will be created. Once you have had a look at this there is an modified version of the program which works in both background and foreground. Also see transaction SCOT for SAPConnect administration Error rendering macro 'code': Invalid value specified for parameter 'lang' *&---------------------------------------------------------------------* *& Report ZSPOOLTOPDF * *& * *&---------------------------------------------------------------------* *& Converts spool request into PDF document and emails it to * *& recipicant. Dofantasy Download.

This entry was posted on 12/1/2017.