Merging Spool No's
Hi Friends,
I created one new output type . In that i entered 3 different sap script program name and script name's . In va03 after entering invoice No and click on print button now it is creating 3 different spool No's . My requirement is in one spool no i need all the three spool's output . I copied the standard progarm RSNAST00 and I created Z program . So please tell me which part of the code generating spool No's or give me the suggestion to merge the spool No.
Thanks & Regards
R.Vijayakumar
Hi,
Please go through the below linlk...
http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=134545580
hope this will help you..
Regards,
Kiran Kumar..
Similar Messages
-
Merge spool from two SAP Scripts
In a report using two separate forms for output. On report execution first output is displayed & then it display the second one. Thus two separate spools are generated.
Is there any way to merge these two spools in one spool list through program.
Kindly advise.
Thanks
anuHi,
Glad to let you know, it is <b>possible</b>.
Have a look at the function modeules <b>RSPO_RETURN_ABAP_SPOOLJOB</b>, <b>RSPO_SR_OPEN</b> and <b>RSPO_SR_WRITE</b>.
The first one extracts lines from a spool request. The second one creates a new spool request. The last one write lines into a spool request.
you can use these three to split up small parts or combine into single
Feel free to revert back.
--Ragu -
Hallo,
I am trying to merge several spools of Type PDF into a single PDF document. How can I merge PDF spools or the resulting PDF documents? Or can I convert the spools into another type (e. g. OTF spools) and merge them subsequently?
kind regards,
Sebastiansteps to merge spools of type pdf to single pdf
Have a lock on FM RSPO_RETURN_ABAP_SPOOLJOB, FM RSPO_SR_OPEN and FM RSPO_SR_WRITE.
The first one extracts lines from a spool request. The second one creates a new spool request. The last one write lines into a spool request.
I used these to three to split up huge request into several small requests ...
And after merging your spool requests into one you can convert it to PDF...
try this also
The abap program RSTXPDF4 (called from FM CONVERT_OTFSPOOLJOB_2_PDF) has the code which performs the conversion for one OTF. At one point it gathers the OTF data into an internal table. If you can figure out the content of the OTF, then you may be able to manipulate it such that you can strip out the EOF stuff and append another OTF internal table (perhaps you will also need to update the TOC - remember I said not straightforward!!).
I guess the first step would be to make a z version of RSTXPDF4 and then just play with appending one spool file OTF twice (before going into all the detailed code of accessing temse yourself).
follow the link
Re: How to merge multiple spools into single PDF file? - 100k
Do Reward if Useful
Edited by: sharad narayan on Mar 5, 2008 11:42 AM -
How to take print of original po and amendment po from po transaction
hi everybody i want a print out for original po and amendment po.actually my original po is sended to vendor after that i made some amendments for the same po .i.e., amended one depending upon versions i want printout anybody can suggest me.....
Hi Sai,
You can create one more program and read spool based on nast table entry and merrge both spool in single document and send for printing both spool paralleley from single PO or you can check NAST entry for the original PO and set some condition in your amendement PO and after that you can set the job for printing original PO as well as amendement PO.
for merge spool , you can see the below doc.
Program to merge spool requests for a given job
Regards,
Prasenjit Mishra -
Hi all,
Please help me to solve this:
1) convert bmp file to PDF( using FM) .
2)There can be many such bmp files ..append them to single pdf file after converting them.
Thanks and Regards,
KCAs has been discussed many times here before, you can't really merge PDF files programmatically in ABAP after they have been created. Your best bet with this 'unique' requirement is to use a form-based approach I think.
With a smartform one approach is to create a single page with a window with a graphics node (dynamic name) in it, with the bitmap name specified in the form interface. Unless you have already loaded the bitmaps in the graphics manager (SE78), you would load the bitmaps at runtime from the presentation server or the application server and then create the graphics dynamically using the methods of class CL_BDS_DOCUMENT_SET prior to calling the form for each bitmap (a topic discussed recently in the ABAP forums or you can view how SE78 does it by checking the code). Create a merged spool and then use the standard function to convert the OTF data to PDF format.
A similar approach can be used with Adobe forms, but you would need to load the bitmaps to the web repository, not the graphics manager.
What exactly is in the bmp files and where are they stored? Are they form templates? You may get a better answer with more details. -
How to merge multiple spools in one PDF
hi all,
i have a requirement to merge multiple spools into one PDF.
I have the code to merge 2 spools into one PDF but acc to my requirement this number can be any( say 100). hence i need help to merge N number of spools in one PDF.
Regards
geeta guptaTake the data of all spools into a internal table then create a new spool with this data then downlad this data into pdf format.
By this method you can download any number of spools into a single pdf file. Please see the below code
Fetch spool number
Select rqident from tsp01 into table g_t_data
where...............
Read sool data and take this data into a internal table
Loop at g_t_data.
Call program to read spool as follows
SUBMIT rspolst2 EXPORTING LIST TO MEMORY AND RETURN
WITH rqident = g_t_data-rqident
WITH first = '1'
Read memory where spool data is stored
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = mem_tab
Convert spool data to Ascii
IF NOT mem_tab[] IS INITIAL.
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
list_index = -1
TABLES
listasci = g_t_text1(table type c length 10000)
listobject = mem_tab(LIKE TABLE OF abaplist)
APPEND LINES OF g_t_text1 TO g_t_text.
ENDIF.
ENDLOOP.
Create new spool with internal table data
NEW-PAGE PRINT ON
KEEP IN SPOOL l_keep(variable type c default u2018Xu2019)
LINE-SIZE 300
LIST NAME l_list (variable(30) TYPE c default 'combined_pdf')
NO DIALOG.
LOOP AT g_t_text.
WRITE: g_t_text-data.
ENDLOOP.
NEW-PAGE PRINT OFF.
COMMIT WORK.
Fetch this spool number from TSP01
SELECT rqident rqcretime FROM tsp01 INTO TABLE l_t_pdf(internal table having two fields rqident LIKE tsp01-rqident and rqcretime LIKE tsp01-rqcretime)
WHERE rqowner = sy-uname AND
rq2name = 'COMBINED_PDF'.
Download spool data into pdf format
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = l_t_pdf-rqident
IMPORTING
pdf_bytecount = l_size(variable type i)
TABLES
pdf = g_pdf(table like table of tline)
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = l_size "size
filename = l_data
filetype = 'BIN'
TABLES
data_tab = g_pdf.
Hope this will help you. -
OTF formatted Spool and ABAP spool to be merged into a pdf
I am creating a program which merges two spools into one pdf document. Now, the two spools are different, one is in otf format since its a SAP script. Other is a ABAP list. I use function modules CONVERT_ABAPSPOOLJOB_2_PDF & CONVERT_OTFSPOOLJOB_2_PDF to get data in internal table in pdf format. Then I append one after the other & then download. The problem with this is only one of the spools can be seen in output(pdf file) and not both.
Can somebody assist.
Thanks.
ShivHi Shiv,
We have similar issue when merging two smartforms.
We have applied the following logic :
First populated an internal table OTFDATA1 with OTF data of both forms:
Ex:
LOOP AT JOB_OUTPUT_INFO-OTFDATA INTO WA_OTFDATA.
APPEND WA_OTFDATA TO OTFDATA1.
CLEAR OTFDATA1.
ENDLOOP.
The we have called the following function:
First populated an internal table
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
IMPORTING
BIN_FILESIZE = G_FILESIZE
TABLES
OTF = OTFDATA1
LINES = I_PDF_TAB
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 4.
Then send to File syatem :
CALL FUNCTION 'FILE_GET_NAME_USING_PATH'
EXPORTING
LOGICAL_PATH = L_LOGICALPATH
FILE_NAME = L_INFILE
IMPORTING
FILE_NAME_WITH_PATH = L_FILE
EXCEPTIONS
PATH_NOT_FOUND = 1
MISSING_PARAMETER = 2
OPERATING_SYSTEM_NOT_FOUND = 3
FILE_SYSTEM_NOT_FOUND = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE S000(ZV) WITH 'Unable to download PDF file'.
ELSE.
MESSAGE S000(ZV) WITH 'PDF file downloaded Successfully'.
ENDIF.
May be this will help.
Lanka -
HELP!! Very Large Spooling / File Size after Data Merge
My question is: If the image is the same and only the text is different why not use the same image over and over again?
Here is what happens...
Using CS3 and XP (P4 2.4Ghz, 1GB Ram, 256MB Video Card) I have taken a postcard pdf (the backside) placed it in a document, then I draw a text box. Then I select a data source and put the fields I wish to print (Name, address, zip, etc.) in the text box.
Now, under the Create Merged Document menu I select Multiple Records and then use the Multiple Records Layout tab to adjust the placement of this postcard on the page. I use the preview multiple records option to lay out 4 postcards on my page. Then I merge the document (it has 426 records).
Now that my merged document is created with four postcards per page and the mailing data on each card I go to print. When I print the file it spools up huge! The PDF I orginally placed in the document is 2.48 MB but when it spools I can only print 25 pages at a time and that still takes FOREVER. So again my question is... If the image is the same and only the text is different why not use the same image over and over again?
How can I prevent the gigantic spooling? I have tried putting the PDF on the master page and then using the document page to create the merged document and still the same result. I have also tried createing a merged document with just the addresses then adding the the pdf on the Master page afterward but again, huge filesize while spooling. Am I missing something? Any help is appreciated :)The size of the EMF spool file may become very large when you print a document that contains lots of raster data
View products that this article applies to.
Article ID : 919543
Last Review : June 7, 2006
Revision : 2.0
On This Page
SYMPTOMS
CAUSE
RESOLUTION
STATUS
MORE INFORMATION
Steps to reproduce the problem
SYMPTOMS
When you print a document that contains lots of raster data, the size of the Enhanced Metafile (EMF) spool file may become very large. Files such as Adobe .pdf files or Microsoft Word .doc documents may contain lots of raster data. Adobe .pdf files and Word .doc documents that contain gradients are even more likely to contain lots of raster data.
Back to the top
CAUSE
This problem occurs because Graphics Device Interface (GDI) does not compress raster data when the GDI processes EMF spool files and generates EMF spool files.
This problem is very prominent with printers that support higher resolutions. The size of the raster data increases by four times if the dots-per-inch (dpi) in the file increases by two times. For example, a .pdf file of 1 megabyte (MB) may generate an EMF spool file of 500 MB. Therefore, you may notice that the printing process decreases in performance.
Back to the top
RESOLUTION
To resolve this problem, bypass EMF spooling. To do this, follow these steps:1. Open the properties dialog box for the printer.
2. Click the Advanced tab.
3. Click the Print directly to the printer option.
Note This will disable all print processor-based features such as the following features: N-up
Watermark
Booklet printing
Driver collation
Scale-to-fit
Back to the top
STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Back to the top
MORE INFORMATION
Steps to reproduce the problem
1. Open the properties dialog box for any inbox printer.
2. Click the Advanced tab.
3. Make sure that the Print directly to the printer option is not selected.
4. Click to select the Keep printed documents check box.
5. Print an Adobe .pdf document that contains many groups of raster data.
6. Check the size of the EMF spool file. -
Merge multiple spools into a new big spool (OTF) ???
Hi.
I just want to know how to merge multiples otf (or spool) into a new big spool.
All OTF are starting with something like that:
//XZSIMM 046B 0000000000
IN01FZVINVOICE_BPB01 FIRST
OPDINA4 P 144 240 1683811906000010000100000
When changing page we got a:
EP
All OTF are terminated with a EOF symbol:
How can i merge these OTF ????
Should I remove all // except the last one ?
I tried to remove the first line and the last line of each OTF but it doesn't work.
Please help me.
Message was edited by:
fabien couedelHi Fabien,
Here is the solution to merge multiple OTF data....
EP is the command which indicates end of page.
Suppose the two OTF data are like this:
// XHPLJIIID 0620 00000000001
IN 04EZSHAIL_SMFORM1
IN 05%PAGE1
OP DINA4 P 144 240 3495731000100289301000
IN 06MAIN
EP
// XHPLJIIID 0620 00000000001
IN 04EZSHAIL_SMA1
IN 05%PAGE1
OP DINA4 P 144 240 238974761890001001100010
IN 06MAIN
EP
The merged OTF should be like this:
// XHPLJIIID 0620 00000000001
IN 04EZSHAIL_SMFORM1
IN 05%PAGE1
OP DINA4 P 144 240 3495731000100289301000
IN 06MAIN
EP
IN 04EZSHAIL_SMA1
IN 05%PAGE1
OP DINA4 P 144 240 238974761890001001100010
IN 06MAIN
EP
The idea is like this:
Each OTF data has to begin and end with '//'.
Each page should end with 'EP'.
So, to merge multiple OTF data, after each EP command, append the data
part of each OTF data.(DON'T INCLUDE THE FIRST LINE ie: // XHPLIIID ....)
This is how you merge multiple OTF data to one OTF data...
<b>Award points if found useful.</b>
Regards,
SP. -
Spool to Pdf the russian characters are grabled or merged
Hi All,
i have a requirement to created a delivery note in russian and convert the spool to pdf.till the print preview it is correct.once the spool is converted into pdf using standard report i am getting russian characters merged or grabbled,i tried changing the printer setting etc nothing works,please help me .
Regards,
AchuHi,
Please refer the following article :
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00adf4da-76f1-2910-43aa-81ad2a67332c
Best regards,
Prashant -
Smartform internal_error when merging forms into 1 spool request
Hi,
I have 2 smartforms - a letter and a certificate. The user has the option to print either one of these forms or both, per employee. I'm using 1 spool request.
As soon as I call the second smartform there is an INTERNAL_ERROR. Why does this happen and how do I solve the problem?
Please refer to the code sample below:
loop at i380.
make sure the spool is not closed
control_parameters-no_open = 'X'.
control_parameters-no_close = 'X'.
AT FIRST.
control_parameters-no_open = ' '.
ENDAT.
AT LAST.
control_parameters-no_close = ' '.
ENDAT.
call smartform 1
call function 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZLETTER'
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'ERROR 1'.
endif.
CALL FUNCTION FM_NAME
EXPORTING
CONTROL_PARAMETERS = control_parameters
OUTPUT_OPTIONS = output_options
USER_SETTINGS = ' '
pernr = i380-pernr
IMPORTING
JOB_OUTPUT_INFO = otf_info
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
endif.
second smartform - certificate
call function 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZCERTIFICATE'
IMPORTING
FM_NAME = FM_NAME2
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'ERROR 1'.
endif.
CALL FUNCTION FM_NAME2
EXPORTING
CONTROL_PARAMETERS = control_parameters
OUTPUT_OPTIONS = output_options
USER_SETTINGS = ' '
pernr = i380-pernr
IMPORTING
JOB_OUTPUT_INFO = otf_info
EXCEPTIONS
FORMATTING_ERROR = 1
<b> INTERNAL_ERROR = 2</b> SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
ENDIF.
endloop.
I cleared output_parameters, output_options and otf_info when calling form ZCERTIFICATE but this does not solve the problem. When ZCERTIFICATE is called seperately, there is no problem. The forms should be printed directly without conversion to PDF.
Your help will be appreciated.Hi,
In the loop AT Last is in wrong place. May be that could be the reason for your problem. Then the second call to samrt from is will be working on a closed session.
regards
austin
Message was edited by: Joseph Austin Prabhu Paulthas -
Merge Different Spools containing a Single PDF page into a Single PDF file.
Greetings,
I am developing a custom object where in i need to read PDF file from many different Spools(Range given on Input Screen), where each spool has a single PDF page in it. I need to combine all these PDF Pages into a single PDF file & either create a new Spool or save it on an Application Server.
At present i have developed the code where in i am able to read the PDF files from different spools & convert them into Binary but i am not able to generate it back to PDF file.
Kindly find my code for your reference.
CODE:-
START-OF-SELECTION.
PERFORM f_get_spool_1000 .
PERFORM g_conv_pdf_to_bin_2000 .
*& Form F_GET_SPOOL_1000
text
FORM f_get_spool_1000 .
SELECT * FROM tsp01
INTO TABLE gt_tsp01
WHERE rqident IN s_spool
ORDER BY rqcretime DESCENDING.
IF sy-subrc = 0.
SORT gt_tsp01 BY rqident .
ENDIF.
ENDFORM.
*& Form G_CONV_PDF_TO_OTF_2000
text
DATA: lv_filename_out TYPE string,
lv_len TYPE i,
lt_tab TYPE tsfixml .
DATA: lwa_print_parms LIKE pri_params,
lv_valid(1) TYPE c .
DATA: lv_linsz LIKE sy-linsz VALUE 132, " Line size
lv_paart LIKE sy-paart VALUE 'X_65_132'. " Paper Format
DATA : lt_tsp01 TYPE STANDARD TABLE OF tsp01 ,
lwa_tsp01 TYPE tsp01 .
CLEAR : gv_pdf, gwa_tsp01, gv_renderpagecount .
LOOP AT gt_tsp01 INTO gwa_tsp01.
CALL FUNCTION 'FPCOMP_CREATE_PDF_FROM_SPOOL'
EXPORTING
i_spoolid = gwa_tsp01-rqident
i_partnum = 1
IMPORTING
e_pdf = gv_pdf
e_renderpagecount = gv_renderpagecount
e_pdf_file = gv_pdf_file
EXCEPTIONS
ads_error = 1
usage_error = 2
system_error = 3
internal_error = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CLEAR lv_len .
REFRESH gt_bin .
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = gv_pdf
IMPORTING
output_length = lv_len
TABLES
binary_tab = gt_bin.
CLEAR gwa_bin .
LOOP AT gt_bin INTO gwa_bin.
APPEND gwa_bin TO gt_listout.
CLEAR gwa_bin .
ENDLOOP.
ENDLOOP.
Get FP reference
DATA: lo_fp TYPE REF TO if_fp VALUE IS INITIAL,
lo_pdfobj TYPE REF TO if_fp_pdf_object VALUE IS INITIAL,
lo_exc TYPE REF TO cx_root,
lv_xslt_message TYPE string .
lo_fp = cl_fp=>get_reference( ).
For handling exceptions
DATA: lo_fpex TYPE REF TO cx_fp_runtime VALUE IS INITIAL.
TRY.
lo_pdfobj = lo_fp->create_pdf_object( connection = 'ADS' ).
Set document
lo_pdfobj->set_document(
EXPORTING
pdfdata = gt_listout ).
Tell PDF object to extract data
lo_pdfobj->set_extractdata( ).
Execute the call to ADS
lo_pdfobj->execute( ).
CATCH cx_root INTO lo_exc.
lv_xslt_message = lo_exc->get_text( ).
ENDTRY.
Your quick reply would be of great help.
Regards.Thank Your for your concern, there are many replies & posts but all of them points only to Try what they have said. As being said that trying to convert PDF to binary & appending many PDF similarly would not let you generate a single PDF again.
Your Kind guidance would be really appreciable.
Regards. -
Hi all,
I have created a smartform for printing the shipping labels depending upon the delivary number. For each delivary number it creates several spool based on the label.
Now the requirement is that we want all the labels(spool) under one spool requests for each delivary number.
Please let me know how it can be done .
Thanks and Regards,
SyedHi Senthil,
Can you please tell me how to make use of this NO_CLOSE and NO_OPEN option in the smartforms .
I populated this in the control parameters but did not get a single spool for one delivary document . i mean it is not generating a single spool for one delivery document.
Can you please explain via code if possible.
Thanks
Syed -
How to merge ABAP spools into a single PDF
Hi
I have some ABAP spools each with different no-of fields with different formats(Colors of ALV)
I need to combine all these sppols into one PDF without disturbing their formats.
Canu plz write ur suggestions.
NarendraHi
Maybe this document will help you:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8cd6adbb-0301-0010-39ba-938c601d5db9
Cheers, -
Print Archived document - and get it into spool
Hi
I need to merge the ServiceOrder - shoppaper - with another pdf document.
My suggest will be to print the shoppaper again, and pick it up in the spool - the issue with that is, I need the service order to be printet in the spoolfile, so I can pick it up later by selecting from the spooltable.
The problem with this, is that I can't get the service order number to be printet on the spool.
Any who know how I can do that ?
Another solution could be to reach the pdf file from the archive server, and run a copy of program RSPO0023, so the pdf file can be "moved" into the spool.
The problem with this is that I don't know how to point out the pdf file on the archive server.
Any who know how I can do that?
Or do any have a better suggest than above?
Thanks,No other application can open PageMaker files, only PageMaker. You'd need a copy of PageMaker (and license) and a Mac of ancient vintage, one with a floppy drive. The ancient Mac is needed not just to read the floppied but to run PageMaker which won't run on modern Macs.
Frankly, if you have a paper copy, scan it and start from that!
Maybe you are looking for
-
Video chat connects, but I can't see my buddy.
Every time I video chat with a friend, it connects and I can hear them and they can see me, but I am unable to see them. Any suggestions?
-
Hello All, We noticed performance issue when tryi ng to select data from a view. Below is the detail on this view: 1. View Definition: CREATE OR REPLACE FORCE VIEW baninst1.sgvacur (sgvacur_pidm, sgvacur
-
JavaScript - Is opener.document.getElementById() Necessary?
I have a JS script in the Page HTML Header of a page that I open as a pop-up, that runs a page process and then closes the pop-up. It works fine in FF but in IE it throws an error. Here's the code, <script language="JavaScript"> function passBack(
-
EM Error - Error Opening logfile
We have an issue with Database Control on one of our nodes and I cannot quite figure out what could be causing this; was hoping someone could have an idea why the error below might be popping up. C:\>emctl start dbconsole Oracle Enterprise Manager 10
-
Macbook Pro Color Profile and Calibration for Photo processing.
Hello Friends, May be it has already discussed in many forums but somehow I got confused about different solutions of the questions and due to this asking once again here. I am using Macbook pro of 2012 and there exist many color profiles in the Disp