Splitting print files for forward distribution

pts.
Tags:
Basis
SAP ABAP
I'm looking for a solution that will enable us to split, for onward forwarding, print spool files from SAP standard reports. The scenario we are trying to solve is that we need to produce reports that are to be distributed widely within our customer's organisation. Our problem is that the spool files produced from SAP Standard reports cannot be split other than with human intervention. What I envisage is that we can run the standard SAP report, producing a huge spool file. We then read in that spool, split it & then email the splits to various locations. Another possible solution we are thinking about is to create a utility the runs a job, essentially dynamically creating variants, that submits the standard report multiple times. Each submission would produce a spool that we could then send from the unix layer. Has anyone else had this type of problem & how did you solve it? Is there another usable solution?

Answer Wiki

Thanks. We'll let you know when a new response is added.

Here is SAP Solution:

Parallel printing to all the SAP device printers If you have a situation where reports need to be send to multiple printers, you can configure a pool device type. A pool device type contain a list of SAP printers which the reports will be directed to.
Do this in transaction code SPAD for spool administration.
For example, in SPAD, type ZXXX next to the field ‘Output devices’, Click the button Output devices.
In change mode, click the Create button.
Specify the Device type of your printer.
Click the tabstrips ‘HostSpoolAccMethod’.
In the field “Host spool access method” set to “P: Device Pool”.
Click the tabstrips ‘DevicePool’
Click the options “Send to all devices in pool”.
Type in the list of the SAP printers device you want the report to go to in this pool under the section ‘Pool Device List’.
Now, when the users send a print to the new device for e.g. ZXXX, it will print to all the spool device you have specify.
The above step is done using SAP 4.6c

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • JPLamontre
    I think you have a better choice to rework your spool at a higher level : it is not easy to split a spool. you target email, think html or pdf. first look at RSTXPDFT4 Convert SAPscript (OTF) or ABAP List Spool Job to PDF (in V4.0). this will give you a sample to retrieve a spool in a internal table. (see below my abap to convert spools to pdf) Easyer : run your own sql to obtain data to publish. here you have reclaim the data. now you convert to pdf, or you can also convert in html. to convert an interactive report to html you can use following function module: DATA: html LIKE w3html OCCURS 0 WITH HEADER LINE. CALL FUNCTION 'WWW_LIST_TO_HTML' EXPORTING list_index = 0 TABLES html = html EXCEPTIONS OTHERS = 1. it needs to rework the converted itable (error bad splitting keyword at the end of each line) (in V4.0) whath ever solution you run, here you have splitted you pages. you can email them. abap to convert spools (sapscripts & reports) to pdf : *---------------------------------------------------------------------- * Topic : The program read TSP01 table to select spools * and export then to PDF format. * Implem: The program reads TSP01 tables * depending on selection criterias, * check authority same as SP01 transaction, * convert to pdf and download to local file (CDROM) *----------------------------------------------------------------------* report x "NO STANDARD PAGE HEADING line-size 170 line-count 58 message-id y_local_fr22. *=-------------------------------------------------------------------=* tables: tsp01, rspotype. *----------------------------------------------------------------------* data: defdir(256) value 'G:SAPEtat Reference' ,_tsp01 like tsp01 occurs 0 with header line, authority like rststype-authcheckd, client like rststype-client, name like rststype-name, part like tst01-dpart, charco like rststype-charco, creater like rststype-creater, credate like rststype-credate, deldate like rststype-deldate, max_credate like rststype-credate, max_deldate like rststype-deldate, non_uniq like rststype-sel_ok, noof_parts like tst01-dnoparts, rectyp like rststype-rectyp, size like tst01-dsize, stotyp like tst01-dstotyp, type like rststype-type, objtype like rststype-type, numbytes type i, pdfspoolid like tsp01-rqident, jobname like tbtcjob-jobname, jobcount like tbtcjob-jobcount, pdf like tline occurs 0 with header line, p_file like rlgrap-filename value 'C:tempfile.pdf'. ranges: s_rqfin for tsp01-rqfinal. ranges: _cretime for tsp01-rqcretime. *----------------------------------------------------------------------* select-options: _rqident for tsp01-rqident, _rqowner for tsp01-rqowner, _credate for rspotype-credate, "_cretime FOR tsp01-rqcretime, _rq2name for tsp01-rq2name, _rqdest for tsp01-rqdest . parameters: dir like rlgrap-filename default defdir. *----------------------------------------------------------------------* at selection-screen on value-request for dir. *----------------------------------------------------------------------* call function 'WS_FILENAME_GET' exporting def_filename = '*.*' def_path = defdir mask = ',All files,*.*.' mode = 'O' title = 'Get filename for directory' importing filename = dir exceptions inv_winsys = 01 no_batch = 02 selection_cancel = 03 selection_error = 04. if sy-subrc 0. sy-subrc = sy-subrc + 0. endif. defdir = dir. *=-------------------------------------------------------------------=* start-of-selection. *=-------------------------------------------------------------------=* *here inspiration comes from RSPOSP01 (transaction SP01) refresh s_rqfin. " select all C & . required for index!!! s_rqfin-low = 'C'. s_rqfin-sign = 'I'. s_rqfin-option = 'EQ'. append s_rqfin. s_rqfin-low = '.'. append s_rqfin. clear _cretime. refresh _cretime. loop at _credate. _cretime-sign = _credate-sign. _cretime-option = _credate-option. if _credate-low is initial. clear _cretime-low. else. _cretime-low(8) = _credate-low. _cretime-low+8(8) = '00000000'. endif. if _credate-high is initial. clear _cretime-high. else. _cretime-high(8) = _credate-high. _cretime-high+8(8) = '23595900'. endif. append _cretime. endloop. *find the spool list select * from tsp01 into corresponding fields of table _tsp01 where rqfinal in s_rqfin and rqident in _rqident and rqowner in _rqowner and rqcretime in _cretime and rq2name in _rq2name and rqdest in _rqdest . loop at _tsp01. move-corresponding _tsp01 to tsp01. *authority to work with spool call function 'RSPO_CHECK_JOB_PERMISSION' exporting access = 'BASE' spoolreq = tsp01 exceptions no_permission = 1 others = 2. *check authority check sy-subrc = 0. *here inspiration comes from RSTXPDFT4 *retrieve spool attributes client = tsp01-rqclient. name = tsp01-rqo1name. call function 'RSTS_GET_ATTRIBUTES' exporting authority = 'SP01' client = client name = name part = 1 importing charco = charco creater = creater credate = credate deldate = deldate max_credate = max_credate max_deldate = max_deldate non_uniq = non_uniq noof_parts = noof_parts rectyp = rectyp size = size stotyp = stotyp type = type objtype = objtype exceptions fb_error = 1 fb_rsts_other = 2 no_object = 3 no_permission = 4 others = 5. if sy-subrc 0. message e020 with sy-subrc client name. continue. endif. *spool a traiter write:/ tsp01-rqident , tsp01-rq0name , tsp01-rq1name , tsp01-rq2name , tsp01-rqowner , (19) tsp01-rqcretime using edit mask '____/__/__ __:__:__', tsp01-rqdest , tsp01-rqpaper. " client , " name , " part , " charco , " creater , " credate , " deldate , " max_credate , " max_deldate , " non_uniq , " noof_parts , " rectyp , " size , " stotyp , " type , " objtype . if objtype(3) = 'OTF'. call function 'CONVERT_OTFSPOOLJOB_2_PDF' exporting src_spoolid = tsp01-rqident no_dialog = ' ' * DST_DEVICE = * PDF_DESTINATION = importing pdf_bytecount = numbytes pdf_spoolid = pdfspoolid * OTF_PAGECOUNT = btc_jobname = jobname btc_jobcount = jobcount tables pdf = 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. case sy-subrc. when 0. write: / 'Funktion CONVERT_OTFSPOOLJOB_2_PDF erfolgreich'(001) color col_positive. when 1. write: / 'Kein OTF- und kein ABAP-Spoolauftrag'(002) color col_negative. exit. when 2. write: / 'Spoolauftrag existiert nicht'(003) color col_negative. exit. when 3. write: / 'Keine Berechtigung zum Lesen Spoolauftrag'(004) color col_negative. exit. when others. write: / 'Fehler bei Funktion CONVERT_OTFSPOOLJOB_2_PDF'(005) color col_negative. exit. endcase. else. call function 'CONVERT_ABAPSPOOLJOB_2_PDF' exporting src_spoolid = tsp01-rqident no_dialog = ' ' * DST_DEVICE = * PDF_DESTINATION = importing pdf_bytecount = numbytes pdf_spoolid = pdfspoolid * LIST_PAGECOUNT = btc_jobname = jobname btc_jobcount = jobcount tables pdf = 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. case sy-subrc. when 0. write: / 'Funktion CONVERT_ABAPSPOOLJOB_2_PDF erfolgreich'(006) color col_positive. when 1. write: / 'Kein OTF- und kein ABAP-Spoolauftrag'(002) color col_negative. exit. when 2. write: / 'Spoolauftrag existiert nicht'(003) color col_negative. exit. when 3. write: / 'Keine Berechtigung zum Lesen Spoolauftrag'(004) color col_negative. exit. when others. write: / 'Fehler bei Funktion CONVERT_ABAPSPOOLJOB_2_PDF'(007) color col_negative. exit. endcase. endif. * download PDF file translate tsp01-rq2name using '/ : * | ? '' " '. condense tsp01-rq2name no-gaps. concatenate dir '' tsp01-rq2name '-' tsp01-rqcretime '.pdf' into p_file. call function 'WS_DOWNLOAD' exporting bin_filesize = numbytes filename = p_file filetype = 'BIN' importing * act_filename = p_file filelength = numbytes tables data_tab = pdf. write: / numbytes, 'Bytes heruntergeladen in Datei'(009), (100) p_file. uline. endloop.
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following