Spool number
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 number
hi ,
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.
Similar Messages
-
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...) -
How to get spool number when using SUBMIT job
Hi All,
I am calling standard program using SUBMIT through JOB as below. Now I need spool number for this job to covert the output to PDF and send to mail. See the below code and guide me.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = name
IMPORTING
jobcount = number
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc = 0.
data: Zscreen type table of RSPARAMS with header line.
Zscreen-selname = 'PM_AENNR'.
Zscreen-kind = 'P'.
ZSCREEN-LOW = '500000000125'.
APPEND ZSCREEN.
SUBMIT RCC00130 WITH selection-table Zscreen TO SAP-SPOOL
SPOOL PARAMETERS print_parameters
WITHOUT SPOOL DYNPRO
VIA JOB name NUMBER number
AND RETURN.
IF sy-subrc = 0.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = number
jobname = name
strtimmed = 'X'
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5Hi,
Do this way, first get print parameters by using function module 'GET_PRINT_PARAMETERS'
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
destination = 'LP01'
list_name = 'TEST'
list_text = 'SUBMIT ... TO SAP-SPOOL'
immediately = ' '
line_size = '1023'
no_dialog = 'X'
IMPORTING
out_parameters = wa_pri_params
valid = w_valid.
If it returns success then
IF w_valid EQ 'X'.
CONCATENATE 'R'
w_tabix
sy-datum+4(4)
sy-uzeit INTO
wa_pri_params-plist.
ENDIF.
SUBMIT rprccc00
WITH firmennr = w_cid
WITH bel_clus = 'X'
WITH testlauf = ' '
WITH not_lokl = 'X'
WITH file_in = w_arc_out
TO SAP-SPOOL WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS wa_pri_params AND RETURN.
COMMIT WORK AND WAIT.
SELECT rqident
FROM tsp01
INTO w_rqident
UP TO 1 ROWS
WHERE rq2name = wa_pri_params-plist.
ENDSELECT.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = w_rqident
no_dialog = 'X'
dst_device = 'LP01'
pdf_destination = 'X'
TABLES
pdf = t_pdf.
Hope it solves your problem
Regards
Krishna -
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 -
How to find out spool number from a jobname.
Hi,
If I know the jobname and jobcount how to find the spool number of it. Jobname and Jobcount are in table TBTCO and spool number is in TSP01. Is there any link between these tables.
Your help will be appreciated.
Thanks & Regards,
Soumya.Hi,
Check the below link
[Re:Spool request;
Regards,
Surinder -
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 -
Spool number of purchase order
Hi experts
How do I get the spool number of a purchase order to send email?
I need to know this spool because I use the FM 'CONVERT_OTFSPOOLJOB_2_PDF' and 'SO_NEW_DOCUMENT_ATT_SEND_API1' to send email with purchase order in PDF format.
Thanks.Thanks Ernesto.
I get the number spool otherwisw.
temprally in Device, I change MAIL for PRINTER.
then in the call function 'CLOSE_FORM'
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = RESULT
rdi_result = rdi_result.
I get the spool number in RESULT-TDSPOOLID
Thanks -
How to crate a spool number for the abap program
hi
how to create a spool number for the abap programHi,
Check this thread
how to create a spool requset for 'z program'.
Regards,
Satish -
Hi All,
Im trying to fetch spool number based on object name(program name).
The table TSP01 has the field RQ2NAME has the program name in it, with some additional characters.
For example, if the program name is ZQRR1234 , its showing it as ZQRR1234_ABC.
Is there any other way to fetch spool numbers other than this? Please let me know.
The other issue is, Spool created for ReportWriter reports, are having a different name in the RQ2NAME field(Totally different from the above case). For example if the report name is Z31L, its showing as GP3ITN115113. Im not sure whether this name will be same in Quality and production system.
Finally please let me know how to fetch spool numbers based on program name in either case.Hello Saravanan,
Please use FM RSPO_OUTPUT_SPOOL_REQUEST to display your spool.
Have a Nice Day,
Regards,
Sujeet -
SCRIPT: second page is not print but need spool number
Hi Friends,
I'm creating a script. It has only one page. if the line item is exceeds in main window then it automatically print the next page.
now my requirement isgiven below
I need to print the first page and the second page should not print. But i need seperate spool request for 2nd page. whenever the user wants second page at that time he use the 2nd page spool number to take the print.
is there any solution or alternative method?
Thanks in Advance.
Vallamuthu.MHmmm if i knew your exact requirement i would be able to propose something better i guess, since this seems a little weird to be honest.
E.G. having a own output type for your page 2.
Anyway, returning to what you asked. You opened your form using FM OPEN_FORM. and when you are ready you use CLOSE_FORM to close it again.
You could make use of END_FORM followed by START_FORM when page 2 is to be printed.
This will give you page 1 and page in seperate spools.
you could as well close your form and open it again with ITCPO-TDNEWID = 'X' inmstead of using end_form and start_form.
But still i highly doubt that complete scenario. -
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 -
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 -
Changing the next spool number
Hello,
Can anyone tell me in what transaction I control the next spool number that
will be created when a job is sent to a device in SAP R/3 ?
Thanks,
MarkHi
Please CheckT Code SPAD and SP01 for this
Rewards point if helpful
Thanks
Pankaj Kumar -
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 -
Getting only one spool number for every print out
hi guys,
when i execute my customize program i suppose to get a form in my screen, showing customer statement, when I exicute customer A out put as expected with 5 pages but after that if i exicute customer B which is supposed to be 3 pages but I am getting 8 pages which is including first out put also, its repeating same spool number for every thing and keep on adding every page , please let me know where to see for this ??
for spool request RS38L_FNAM
and to display 'COM_SE_SPOOL_DISPLAY'Change ur table declaration as shown below, replace the word <b>TYPE</b> with <b>LIKE</b>
DATA: BEGIN OF i_final OCCURS 0,
srno TYPE i, " Serial no
anln1 LIKE anla-anln1, " asset code no
txt50 LIKE anla-txt50, " Brief Description of Assets
txa50 LIKE anla-txa50, " Further Description
ktogr LIKE anla-ktogr, " Asset Class No.
ktgrtx LIKE t095t-ktgrtx, " Asset Class Name
sernr LIKE anla-sernr, " Serial Number
invnr LIKE anla-invnr, " Assets Identification No
menge LIKE anla-menge, " Qty
meins LIKE anla-meins, " UOM
raumn LIKE anlz-raumn, " Location
lifnr LIKE anla-lifnr, " Vendor
liefe LIKE anla-liefe, " Capitalisation Date
aktiv LIKE anla-aktiv, " Date put to use
g_kansw LIKE anlc-kansw, " Opening Gross Block
b_kansw LIKE anlc-kansw, " Additions during the period
b_answl LIKE anlc-answl," Deductions/ Adjustmentsduring d period
g_total LIKE bsis-dmbtr, " Closing Gross Block
d_open LIKE anlb-afabg, " Dep on opening block
d_sold LIKE anlb-afabg, " Dep on assets sold/written off
d_add LIKE anlb-afabg, " dep on additions during the period
afabg LIKE anlb-afabg, " Total dep for the period
cd_sold LIKE bsis-dmbtr, " *** Dep on assets sold
cd_asst LIKE bsis-dmbtr, " *** Dep on assets written off
cd_dep LIKE bsis-dmbtr, " Total *** dep on deductions
ccd_dep LIKE bsis-dmbtr, " Closing Acc Dep
a LIKE bsis-dmbtr, " WDV of assets sold
b LIKE bsis-dmbtr, " Selling Price
c LIKE bsis-dmbtr, " Profit / (Loss) on sale
d LIKE bsis-dmbtr, " Loss on write off
e LIKE bsis-dmbtr, " Opening WDV
f LIKE bsis-dmbtr, " Closing WDV
END OF i_final.
Maybe you are looking for
-
Xperia Z2 L50u -sim free only on chinese rom
hello. i recently bought a sony xperia z2 in china, (the simfree china unicom model l50u ) i discovered that the device is censored and i cannot use any services or apps that i usually use (google play~) only sony select that is in chinese and wont l
-
i have written a query using joins inorder to get data from various tables.i have used FROM CLAUSE QUERY property and placed the quuery in the property pallate.now when Find button is pressed the data is not getting populated..please guide me in gett
-
Mass Removal of Billing Block at Sales Order item level
Dear Experts, Does any one know how to remove billing block at sales order item level at mass level ? Is there any standard t code for the same. Kindly let me know the same thnx in advanve regards, Sagar
-
Default role with membership login
I am creating a new instance of our portal. Right now, I have the login set to membership. If I create a new user, I get a serious desktop error. (error below) I noticed when I go into the admin this new user has no role assigned. How do I set it up
-
Hi Folks! I have a small problem in RDI format printing. Does anybody know if RDI format recognises the displayable/non-displayable characters? I mean characters like $, EURO symbol, ~, etc. When I am generating the output the special characters are