Smarform generating spool number zero
Hi
I got a smartform to print invoices though VF01, VF02, VF03
Some of the invoices are returning zero (0) in JOB_OUTPUT_INFO-SPOOLIDS,
The structure is NOT blank, it returns a line but with zero (0) in it.
This happens with some invoices, most of invoices returns a valid spool request number.
What can it be?
<< Moderator message - Please do not promise points >>
Thanks,
Nico.-
Edited by: Rob Burbank on Oct 28, 2011 12:40 PM
Hi Nico,
Ddi you check which invoices are printing and which id failed to generate a spool.
Regards,
Madhu.
Similar Messages
-
Spool number of sumitted program
Hello,
does somebody know, how I can get the generated spool number of a submitted program?
Unfortunately, the system variables sy-spono or sy-sponr will be deleted, when the submitted program will be left.
Is it possibly feasible to get the spool number between the function modules 'JOB_OPEN' and 'JOB_CLOSE'?
Thanks a lot and regards.
SergejHello Sergej,
Yes, you can get the Spool Number from the Job created.
1. Use the FM: 'GET_JOB_RUNTIME_INFO' to get the Background Job Runtime Data.
2. Then use the table TBTCP to get the Spool Number.
* get the job details
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
eventid = gd_eventid
eventparm = gd_eventparm
external_program_active = gd_external_program_active
jobcount = gd_jobcount
jobname = gd_jobname
stepcount = gd_stepcount
EXCEPTIONS
no_runtime_info = 1
OTHERS = 2.
* Get the spool number
SELECT * FROM tbtcp
INTO TABLE it_tbtcp
WHERE jobname = gd_jobname
AND jobcount = gd_jobcount
AND stepcount = gd_stepcount
AND listident '0000000000'
ORDER BY jobname
jobcount
stepcount.
IF sy-subrc = 0.
READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
IF sy-subrc = 0.
gd_spool_nr = wa_tbtcp-listident. "gd_spool_nr --> contains spool no.
ENDIF.
Hope this helps.
BR,
Suhas -
Spool - Page Number Adds to the same spool number
Hi Gurus,
I have a scenario here. Whenever I print an invoice (Using Output Types) the total page of that number adds up to only a single spool number.
For example I printed the invoice number1 and it generated spool number 00001 with 1 pages. And then I printed another invoice lets say number2 having two pages. when i look my own spool requests, the spool number 00001 now has 3 pages.
Is this normal?
Regards,
AndreHi,
Will it not must create two spool numbers for the two Invoices?
Regards,
Andre -
Generate spool req number for report output list
Hi,
How to generate spool request number for report output list while executing the report.Please provide if you have any sample code.
Thanks and Regards,
BSR.HI srinivas,
welcome to sdn.
Exporting the Contents of a Spool Request
Use
You want to export the content of a spool request in one of the following ways:
· As a text file to the SAP GUI working directory
· Unconverted or as a table, RTF, or HTML to a directory of your choice
· As a PDF file to a directory of your choice
Procedure
Follow the procedure below:
Exporting to the SAP GUI Working Directory
If you are exporting large quantities of data, downloading the spool request as a text file to the SAP GUI working directory is a good solution.
Choose Spool Request ® Forward® Export as Text.
The entire text is stored in your SAP GUI working directory in ASCII format.
A file of this type is named using the following pattern:
.txt
Example: ABC0000004327.txt
You require appropriate authorization for this function from your administrator.
Exporting Unconverted or as a table, RTF, or HTML to a Directory of Your Choice
With this method of exporting a spool request, the content of the spool request is first displayed, and you then download the content in the format of your choice to a directory of your choice.
1. Select the spool request to be exported and choose Display Contents.
2. In the case of SAPscript/Smart Forms documents, activate list display by choosing Goto.
3. Choose System ® List ® Save ® Local File.
4. Choose one of the available formats and confirm your choice.
5. Choose a directory and save the spool request.
By default, only the first 10 pages of a spool request are saved in a file. You can increase the number of pages to be saved by choosing Goto ® Display Requests ® Settings and making the desired entries in the Display Area group box.
Exporting as a PDF File
You want to export the contents of a spool request as a PDF file to a directory of your choice, and print the file as required. The PDF file contains the print data in the format in which it would be output by the printer.
The following procedure is irrelevant for the printing of PDF-based forms, since a PDF file is already returned with this method. See also Displaying and Printing PDF-Based Forms.
You also require authorization from your administrator to run this report.
The PDF file is generated as follows with report RSTXPDFT4:
1. Generate a spool request from the document to be printed.
2. In transaction SE38, start report rstxpdft4.
3. In the displayed window, enter the spool request number and the directory in which the PDF file is to be stored.
Leave the Download PDF File option selected.
Choose Execute.
4. In the next window, you can confirm or change the path in which the file is be stored.
Save your entries.
5. The system displays a log from which you can see whether the report was successfully performed.
You can then open the file from the directory and print it as required.
Restrictions for Exporting as a PDF File
· The PDF conversion only supports true bar codes for Smart Forms, which were generated with the new bar code technology as of SAP NetWeaver 04. In all other cases, the bar code is only simulated.
· PDF conversion, especially of ABAP lists, is slower and is therefore not suitable for mass printing. However, you can speed up the conversion to PDF using the FASTLISTCONV option in report RSTXPDF3.
· The font selection for ABAP lists is predefined in the PDF converter and cannot be changed.
For more information about constraints, see SAP Note 323736 in the SAP Service Marketplace
see this links
http://help.sap.com/saphelp_40b/helpdata/en/d9/4a98f351ea11d189570000e829fbbd/content.htm
http://web.mit.edu/SAPR3/docs/webdocs/reports/rpRFprint.html
regards
shankar
reward me if usefull -
How to find Spool number for a 2 steps background job.
Hi All,
How to find spool number (and also the background job name ) for a 2 steps background job.
in the table TBTCO i can see step numbers but i dont get the spool number. Is there any link between TBTCO and TSP01.
Also after getting the spool number i need to drill down on ALV report. I hard coded the spool number and was able to drill down using BDC and call transaction but when i press back button it is not returning to the ALV report.
Thanks,
Shiva.Which one creates the spool? (first one I guess)
What kind of spool? (WRITE, sapscript, smartform, pdf...)
Do you use special statements like NEW-PAGE, or other things?
Are you sure that the spools are generated by these jobs? (did you compare the spool generation times and job run dates to be sure...) -
Hwo to get the spool number from report output
Hi,
I am displaying some output in the report using write statements and within my program I need to collect the output written by write statements and send it as an email.So for that I need to generate the spool number and I am using the below code to do that
CONSTANTS:
l_linsz TYPE sy-linsz VALUE 201, " Line size
l_paart TYPE sy-paart VALUE 'X_65_132'. " Paper Format
l_uname = sy-uname .
l_repid = sy-repid .
*-- Setup the Print Parmaters
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
authority = space
copies = '1'
cover_page = space
data_set = space
department = space
destination = space
expiration = '1'
immediately = space
new_list_id = k_x
no_dialog = k_x
user = l_uname
IMPORTING
out_parameters = l_mstr_print_parms
valid = l_mc_valid
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
*-- Make sure that a printer destination has been set up
*-- If this is not done the PDF function module ABENDS
IF l_mstr_print_parms-pdest = space.
l_mstr_print_parms-pdest = k_lp01.
ENDIF.
*-- Explicitly set line width, and output format so that
*-- the PDF conversion comes out OK
l_mstr_print_parms-linsz = l_linsz.
l_mstr_print_parms-paart = l_paart.
l_variante = sy-slset.
* submitting the spool request
*SUBMIT (l_repid) TO SAP-SPOOL*
*SPOOL PARAMETERS l_mstr_print_parms*
*WITHOUT SPOOL DYNPRO*
*AND RETURN.*
*Calculating the lenth of report name
lv_len = STRLEN( l_repid ) .
*consutrucing the database variable rq2name to search the spool
*request
IF lv_len >= 9 .
CONCATENATE l_repid+0(9)
l_uname+0(3) INTO lc_rq2name .
ELSE.
lv_len = 9 - lv_len .
DO lv_len TIMES .
CONCATENATE lv_temp '_' INTO lv_temp .
ENDDO.
CONCATENATE l_repid lv_temp
l_uname INTO lc_rq2name .
ENDIF.
*selecting the spool request using the above consructed varibale
SELECT * FROM tsp01 INTO TABLE lt_tsp01
WHERE rq2name = lc_rq2name .
*sorting the interbla table
SORT lt_tsp01 BY rqcretime DESCENDING .
*reading the first spool request
READ TABLE lt_tsp01 INTO ls_tsp01 INDEX 1.
but the problem with the above code is I am using variants to execute the report but when the above piece of code is getting executed it is clearing all the variant values on the selection screen and it is defaulting the values on the selection screen.
Is there any way i can execute the above code without any problem in the selection screen.
Thanks
Bala DuvvuriHello Bala,
I wouldn't SUBMIT the same program to get the Spool number. You can achieve the same by [NEW-PAGE PRINT ON|http://help.sap.com/abapdocu_702/en/abapnew-page_print.htm#!ABAP_ADDITION_1@1@] command.
Check the code snippet i've provided below:
DATA: spfli_wa TYPE spfli,
print_parameters TYPE pri_params,
valid_flag TYPE c LENGTH 1.
START-OF-SELECTION.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
no_dialog = 'X'
IMPORTING
out_parameters = print_parameters
valid = valid_flag
EXCEPTIONS
invalid_print_params = 2
OTHERS = 4.
IF valid_flag = 'X' AND sy-subrc = 0.
* 1. Write the output to the output list(no spool is generated)
SELECT carrid connid
FROM spfli
INTO CORRESPONDING FIELDS OF spfli_wa.
WRITE: / spfli_wa-carrid, spfli_wa-connid.
ENDSELECT.
* 2. Write the output to SAP spool(no list is displayed)
NEW-PAGE PRINT ON PARAMETERS print_parameters NO DIALOG.
SELECT carrid connid
FROM spfli
INTO CORRESPONDING FIELDS OF spfli_wa.
WRITE: / spfli_wa-carrid, spfli_wa-connid.
ENDSELECT.
NEW-PAGE PRINT OFF.
MESSAGE i000(zibi027) WITH 'Spool' sy-spono 'is generated!!!'.
"You can use the spool number (SY-SPONO) to email the list output
ENDIF.
Hope this helps.
BR,
Suhas -
Regarding running a report in background and generate spool
Hi,
I am developing a report [<b>REPORT1</b>].
It is taking long to execute if data is more.
Now i want to schedule this report in background and generate spool along with.
So once i execute REPORT1 it should run in background & generate spool?
Can anybody give inputs for the same!
Thanks,
Deep.Hi,
to generate spool, use below code
FORM create_spool .
CONSTANTS : l_c_device(4) VALUE 'LOCL'.
Create Spool Request
NEW-PAGE PRINT ON
LINE-SIZE 120
DESTINATION l_c_device
IMMEDIATELY ' '
KEEP IN SPOOL 'X'
NEW LIST IDENTIFICATION 'X'
NO DIALOG.
ENDFORM. " create_spool
And after createing spool to get the spool number use below code,
FORM obtain_spool_id .
TYPES : BEGIN OF t_tsp01,
rqident TYPE tsp01-rqident,
rqowner TYPE tsp01-rqowner,
END OF t_tsp01.
DATA : it_tsp01 TYPE STANDARD TABLE OF t_tsp01,
wa_tsp01 LIKE LINE OF it_tsp01.
SELECT rqident
rqowner
FROM tsp01
INTO TABLE it_tsp01
WHERE rqowner = sy-uname.
SORT it_tsp01 BY rqident DESCENDING.
READ TABLE it_tsp01 INTO wa_tsp01 INDEX 1.
IF sy-subrc = 0 .
v_spool_nr = wa_tsp01-rqident.
ENDIF.
Capture the immediate spool created for this report
v_spool_nr = sy-spono.
ENDFORM. " obtain_spool_id
<b>Reward points</b>
Regards -
How to get Spool Number after submtting the program and return
Hi All,
Could you please assist me on this issue. I have ABAP program which will create a spool number and this spool number is generated by submitting the same report. Now when try to retrive the spool number from sy-spono it is displaying as 000000 but it suppose to be the spool which is created during submit program. COuld you please assist me on this issue. I have added the part of code for your reference,
DATA: l_params TYPE pri_params,
l_valid TYPE string,
w_spool_nr like sy-spono,
p_m_werks like marc-werks.
export p_werks to memory id 'P_WERKS'.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
IMPORTING
out_parameters = l_params
valid = l_valid
IF sy-subrc <> 0.
ENDIF.
import p_werks from memory id 'P_WERKS'.
p_m_werks = p_werks.
SUBMIT zmmlist01 with p_werks eq p_m_werks
to SAP-SPOOL
spool parameters l_params
without spool dynpro and return.
write: sy-SPOno.
Thanks & Regards,
Nagaraj KalbaviHi,
You can use the code snippet as below :
SELECT MAX( RQIDENT ) INTO G_SPOOL_NUM
FROM TSP01
WHERE RQCLIENT = SY-MANDT AND
RQOWNER = SY-UNAME.
Also you can use the FM RSPO_FIND_SPOOL_REQUESTS' and pass the relevant parameters to this FM. This should get you the desired results.
Hope this would be of some help!!
Regards,
Lalit Kabra -
Long time for generating spool request for smartforms
Hi,
I'm have designed a smartforms for printing a Receipt form. It takes about 1 minute for generating spool request after pressing the PRINT button in PRODUCTION Server only.
The Code i used is below
CALL FUNCTION lv_fname
EXPORTING
p_belnr = p_belnr
p_bukrs = p_bukrs
p_gjahr = p_gjahr
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 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.
Please help me out to sort this issue.
Thanks,
Ramesh
Edited by: Rameshkumar Raamasamy on Mar 4, 2012 6:21 AMHi Rameshkumar,
you may look at the code sections of your smartform: If you have a lot more data in production than you have in development, it is especially important to use a fully specified primary key for any SELECTs.
You may also ask your basis people to check if any performance warnings have been recorded with database system. This happens quite frequently that growing database tables cause problems when table spaces are not properly assigned or table sizes are not maintained adequately.
Regards
Clemens -
Hi All,
I have a requirement in which I need to execute a Z report in the background,This report will be executed by another custom report. Output of Z report is in the form of ALV grid display.When it will be executed in the background it will generate a spool. That spool has to be converted to pdf format and has to be sent as an email ..
My query is how to determine the spool number which has been generated from the output of the Z report?
Once I have the spool number, rest part can be handled easily.Check the table TSP01
Also check this thread.
spool number
Regards,
Maha -
Hi,
I have a dout regarding Spool Request
Here in my program after calling the Function module 'GET_PRINT_PARAMETERS' , There is a codeing to generate Spool Request Number.
Codeing
TO SAP-SPOOL
SPOOL PARAMETERS V_PARAMS
ARCHIVE PARAMETERS V_ARPARAMS
WITHOUT SPOOL DYNPRO
My dout what is the need for generating the Spool request numberhi ,
A spool request is a document for which a print function has been selected. SPOOL is nothing but a buffer where the data given to print is stored .
The data is stored in a temporary format. You can also display the print document.
The system automatically assigns a 10 digit ID number to a spool request.
From the point of view of the SAP spool system, an output request is outputting the print data of a spool request on a particular output device.
So a spool number uniquely identifies the doc to be printed. This can be used in future if you want to take the output in various formats like PDF etc and also you can send EMAILS etc.
Thanks and regards. -
Get spool number for delivery output.
Hi,
Is it possible to get the spool number for a print output type generated for a delivery? I use the Tcode VL02N to view the output types generated for a delivery. I want to use this spool number to generate a PDF file.Hi,
The below mentioned link shows how to get the Spool Request Number for the Output type and convert it to PDF and download. It uses mainly NAST and CMFP table.
Link: http://wiki.sdn.sap.com/wiki/display/ABAP/GettingSpoolRequestNumberfortheOutput+type -
Hi all,
How to generate a spool number of a smartform.
Remember in the condition for that output type i have marked Print Immediately.
Regards,
Rajeswara Rao.JHi Rajeshwara,
Welcome to SDN.
Please check this link for sample code.
Re: PDF Output
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRSF/BCSRVSCRSF.pdf
Hope this will help.
Regards,
Ferry Lianto -
SAP database table name to get the PO number against Spool number
Hello,
I have a spool number which is generated against the Output of a PO. Can anybody let me know how can I find that PO number against that spool number.I populate the field 'Text for coverpage' in the communication data of the message-condition-record with the string
'&XNAST-OBJKY&' in TA MN05. This string will be replaced with the PO-Number during spool request creation.
KR
Alfons -
Spool number issue while printing the invoice through VF01
Hi Experts,
I have a custom program which will create invoices in the background through VF01 transaction. How do I know the exact spool number which has been generated when the invoice is created. I have checked TSP01 table but I want the exact spool number which got created for that invoice. Your response will be appreciated.
Thanks,
SurabNo, even sy-spono is also not returning any value. I have also checked it inside the called program.
Surab
Maybe you are looking for
-
Problem with placing Adobe files in InDesign
I'm working on a document in InDesign. I have CS3 Creative Suite. I have used this for a while now and not had this problem, but when I go to "place" and try to insert a "pdf" file, it will not allow me to do it any longer. The error says "Failed to
-
I want to post files onto our site in one place only but make it available in other areas (ie news main areas and also on the web frontpage) as recommneded by this forum. However, if I copy the item to the second page then it shows up twice in any se
-
Can any one tell me how to send Body in Email
Hi, I have a internal table which contain information Dear Sir, pls find attached file. Thanks and Regards chandra I want to send that message with attached PDF file, my PDF file is going as a attached format if email address is maintained in Custom
-
How to design infocube and ods
Hi all, How to design infocube and ods. What are the steps involved in this process. please send me to : [email protected] thanx in advance bhasakr
-
Execute BI query in browser using SNEAK version
Hi, I have NetWeaver 2004s - ABAP (SP6) installed along with NetWeaver 2004 - JAVA (SP15). Is it possible to execute a BI query in the web browser using these sneak versions. I get an error that an iView is missing - com.sap.ip.bi.bex I have read a