How to create Spool ??
Hi Gurus,
Here is my scenario:
I am running std t.code F.17, which is a sapscript.
I am using standard function module "SAMPLE_PROCESS_00002410" (BTE - customer enhancement)
to get a pop-up asking the user "wish to send fax or not ?"
once i execute t.code F.17, the function module gets triggered givin pop-up askin "wish to send fax or not ?"
If user selects 'Yes' fax is sent and the form is displayed on "No'.
now my question is "how to generate a spool once the user wish to send fax" ??
Awaiting your response.
Regards,
Madan.
Whenever u give print command for the printing the invoice spool request will get generated.If you don't want to print immediately that can be controlled by maintaing the setting IN print options, through these options u can control your request and take printout whenver required.
I think the spools are normally generated for docs created in the background process runs, such as, while creating invoices or output docs generated after the background jobs complete running successfully. You may check out the spools created in transaction SP01.
I hope this information is useful to you in your work.
Thanks & Regards,
Harini
Similar Messages
-
How to create Spool through ABAP program
How to create spool request for Smartforms through program. So I can go in TCODE SP01 and see the output of my smartforms.
Include the below code in ur program .......
DATA: PRINT_PARAMETERS TYPE PRI_PARAMS,
VALID_FLAG TYPE C LENGTH 1.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
IMMEDIATELY = 'X' "C_IMMEDIATELY
*LAYOUT = 'Z_48_144'
*LINE_COUNT = '48'
LINE_SIZE = '255'
*NEW_LIST_ID = C_NEW_LIST_ID
NO_DIALOG = 'X'
RELEASE = 'X'
IMPORTING
OUT_PARAMETERS = PRINT_PARAMETERS
VALID = VALID_FLAG
EXCEPTIONS
ARCHIVE_INFO_NOT_FOUND = 1
INVALID_PRINT_PARAMS = 2
INVALID_ARCHIVE_PARAMS = 3
OTHERS = 4 .
G_PDEST = PRINT_PARAMETERS-PDEST.
NEW-PAGE PRINT ON PARAMETERS PRINT_PARAMETERS
NO DIALOG.
List of write statements to be output.......
NEW-PAGE PRINT OFF.
Reward if useful.............. -
How to create spool in a RFC? I have the data in an internal table in the RFC, How to send this data to a spool.
hello,
i'm facing at the same probelm, do you solved it ?
tks,
Roberto. -
How to create spool in an online report
Hi All,
I have a requirement where the ALV report output has customers and details related to it.For example My report output has three customers(with a check box against it) and each customer has 5 line items.The user will select first and the last customer and press a push button provided.Once he clicks this push button, I should get the customers which are selected by the users and the line items related to this customers.I am able to capture all this.Now the real problem here is that I have to create a pdf document for each customer along with line items and send it as an email.In effect, in this scenario I have to create two pdf documents since the user has selected two customers on the output screen and send it to the email of that particular customer.Is there any FM available to create spool in the background for each of these customers(along with line items data) and make use of this spool number to generate a pdf document using CONVERT_ABAPSPOOLJOB_2_PDF.Once I get this I can send the email.
Please help!
Thanks in advance
SandeepThe following steps shows how to download the output data in to PDF.
1.Provide Spool Parameters using following function module 'GET_PRINT_PARAMETERS'.
--This function module will provide the print parameters for creating the output in the spool; the required parameters are passed to the OUT_PARAMETERS import parameter.
2.Submit the report to generate the output in the spool.
SUBMIT (sy-repid) TO SAP-SPOOL WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS wa_mstr_print_parms
WITH SELECTION-TABLE i_int_tab
AND RETURN.
--Submit the report to generate the output in the spool as i_int_table is an internal table with structure RSPARAMS. As variant allows you to set the names and contents of the parameter and selection options dynamically at runtime, we need to use the function module RS_REFRESH_FROM_SELECTOPTIONS to read the contents of the parameters and selection options of the current program into an internal table i_int_table with the structure RSPARAMS and pass that internal table in above manner.
3.To Find the spool number from the table TSP01
Data: l_rq2name LIKE tsp01-rq2name.
*Concatenate the report and User name as per the value available in the table
TSP01.
CONCATENATE f_repid+0(9)
f_uname+0(3)
INTO l_rq2name.
*Fetch the most recent spool from the TSP01 table
SELECT * FROM tsp01 WHERE rq2name = l_rq2name
ORDER BY rqcretime DESCENDING.
l_rqident = tsp01-rqident.
EXIT.
ENDSELECT.
4.Convert Spool to PDF using the FM : CONVERT_ABAPSPOOLJOB_2_PDF.
5.Download to local file by using the FM : DOWNLOAD
This function module returns an internal table data_tab contains the PDF formatted output.
Using above points your can create the output in the PDF from there you can send the email.
Hope your reqirement can met using the above five points.
Reward points please
Thanks,
Ravi Kanth -
How to create spool when running a report in background
hi folks,
i am running a bdc report in bkgrnd... and i want all the success and eror messages to be displayed in a spool... plz explain with example as to how this can be achieved .Hello Nishant,
You could use this sample code to create the spool.
DATA : X_NAME LIKE TSP03D-NAME,
X_DEST LIKE TSP03D-PADEST VALUE 'LOCL',
X_ROWS LIKE SXPCKLSTI1-BODY_NUM VALUE 0,
X_STARTROW LIKE SXPCKLSTI1-BODY_START VALUE 1,
X_PAGES LIKE RSPOTYPE-PAGES VALUE 1,
X_PAGES_1 TYPE P DECIMALS 2,
X_RQTITLE LIKE SXPCKLSTI1-OBJ_DESCR,
X_RQCOPIES TYPE I VALUE 1,
X_RQOWNER LIKE TRDYSE01CM-USERNAME,
X_IMMEDIATE LIKE PRI_PARAMS-PRIMM VALUE ' ',
X_RQID LIKE TSP01-RQIDENT,
I_CONTENTS LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
X_PAGES = 1.
X_RQOWNER = SY-UNAME.
X_DEST = 'LOCL'.
X_STARTROW = 1.
X_RQCOPIES = 1.
X_IMMEDIATE = ' ' .
I_CONTENTS-LINE = 'I Got your Childhood PHOTO'.
APPEND I_CONTENTS.
CALL FUNCTION 'RSPO_SX_OUTPUT_TEXTDATA'
EXPORTING
name = x_name
DEST = X_DEST
ROWS = X_ROWS
STARTROW = X_STARTROW
PAGES = X_PAGES
RQTITLE = X_RQTITLE
RQCOPIES = X_RQCOPIES
RQOWNER = X_RQOWNER
IMMEDIATELY = X_IMMEDIATE
IMPORTING
RQID = X_RQID
TABLES
<b> TEXT_DATA = I_CONTENTS</b> <b>Your Message Table</b>
EXCEPTIONS
NAME_MISSING = 1
NAME_TWICE = 2
NOT_FOUND = 3
ILLEGAL_LAYOUT = 4
INTERNAL_ERROR = 5
SIZE_MISMATCH = 6
OTHERS = 7.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF.
ENDIF.
WRITE: X_RQID
If useful reward.
Vasanth -
Creating spool file for Mass printing of smartforms
Hi all
My requirement is Mass printing of Development Plans,
In this case is i need to select all the smartforms depending upon the selection screen data.& i need to pass all the smartforms to newly created spool file..
how should I use TSP01 & Function Module 'GET_PRINT_PARAMETERS' for this smartform spool.
so can any body explain me in detail..
How to create spool ID, ?
how to create spool file in this case..??
How to pass smartform data to that new spool file../??
Any sample codes for this ./??
Thanx in advance,
Regards,
Kalam A.Check the links -
Re: How to create a spool?
How to create a spool request
Regards,
Amit
Reward all helpful replies. -
How to create the multiple spool requests for a single report.
Hi gurus,
I have one requirement to be completed , i need to send the out put of the report via mail in pdf format. for that what i did was, iam executing report in background and creating spool request and converting it to pdf and sending the file.
now the problem is, its a customer ledger report, for each customer i need to create a new spool request and send mail to that particular customer, now my dought is how to create multiple spool requests for a single pro and how i need to go about it.
And one more question is can we create a spool request for a report which is running in online.
waiting for inputs frm gurus.Hello,
As per my knowledge for creating new spool id you will have to set
output_options-tdnewid = 'X'.
and then using
job_output_info-spoolids
create a pdf using
call function 'CONVERT_OTFSPOOLJOB_2_PDF'
Rachana. -
How to get the spool id or how to create a spool id for the report .
hi,
how to get the spool id or how to create a spool id for the report .
this spool id i have to use it in CONVERT_ABAPSPOOLJOB_2_PDF fm to get the pdf download file.
my requirement is to download a pdf file from the alv grid list.Hi Raghu,
Execute this program.
REPORT ZTEST_3318 .
tables: usr01.
perform send_report_to_spool.
*& Form send_report_to_spool
text
form send_report_to_spool.
data: loc_dest like pri_params-pdest,
wf_listname type char12,
wf_listtext like PRI_PARAMS-PRTXT,
wf_copies type i,
wf_days type i,
wf_PARAMS LIKE PRI_PARAMS, " achieving file PRI_PARAMS.
wf_valid type c.
clear : wf_listname , loc_dest , wf_listtext .
move: 'AP interface' to wf_listname .
move: 'AP interface' to wf_listtext .
select single spld into usr01-spld from usr01 where bname eq sy-uname .
if sy-subrc eq 0 .
move: usr01-spld to loc_dest .
endif .
call function 'GET_PRINT_PARAMETERS'
EXPORTING
destination = loc_dest
copies = 1
list_name = wf_listname
list_text = wf_listtext
immediately = ' '
release = ' '
new_list_id = 'X'
expiration = 1
line_size = 200
line_count = 65
layout = 'X_65_200'
sap_cover_page = 'X'
receiver = 'SAP*'
department = ''
no_dialog = 'X'
IMPORTING
out_parameters = wf_params
valid = wf_valid.
if wf_valid <> space.
new-page print on parameters wf_params no dialog.
perform write_summary .
new-page print off.
endif .
endform. "send_report_to_spool
*& Form write_summary
text
--> p1 text
<-- p2 text
FORM write_summary .
data: begin of itab occurs 0,
matnr type matnr,
end of itab.
select matnr
from mara
into table itab
up to 10 rows.
loop at itab.
write: / itab-matnr.
endloop.
ENDFORM. " write_summary
This will create spool in SP01.What data you want to put in Spool write it in form write_summary.I have done coding for testing purpose
After that use that spool for your purpose.
If Useful award point -
Hi, some answers would be greatly appreciated.
In an ABAP program there is this internal table full of data, and I have to write its contents into a PDF. The only way it seems is to make a spool and then use CONVERT_ABAPSPOOLJOB_2_PDF function to convert that spool into PDF.
The question is how do I make a spool within the ABAP program?
Thanks!Hi Welcome to SDN.
Check out the following code sample to create spool withing program.
data: loc_dest like pri_params-pdest .
clear : wf_listname , loc_dest , wf_listtext .
move: 'List name' to wf_listname .
move: 'List header text' to wf_listtext .
select single spld into usr01-spld from usr01 where bname eq sy-uname .
if sy-subrc eq 0 .
move: usr01-spld to loc_dest .
endif .
call function 'GET_PRINT_PARAMETERS'
exporting
destination = loc_dest
copies = wf_copies
list_name = wf_listname
list_text = wf_listtext
immediately = ' '
release = ' '
new_list_id = 'X'
expiration = wf_days
line_size = 200
line_count = 65
layout = 'X_65_200'
sap_cover_page = 'X'
receiver = 'SAP*'
department = ''
no_dialog = 'X'
importing
out_parameters = wf_params
valid = wf_valid.
if wf_valid <> space.
new-page print on parameters wf_params no dialog.
perform write_summary .
new-page print off.
endif .
within the write_summary do a normal write operation.
loop at <itab> .
write:/
endloop .
Hope this is clear.
REgards
Raja -
How to create multiple spool requests at once?
We are setting up alarms in CCMS for when the spool is about to get full.
I want to create several thousand spools automatically to try the alarm settings out and make sure that it works.
This doesn't seem possible to do in SPAD, as only one spool is created, and the maximum to create at a time is 250.
It also seems that it the minimum value that the system takes is 99.000 so I'm not able to lower this value to make an easier percentage alarm test.
I would like to either fake the number of spools so that the alarm is triggered, or if anyone can explain how to create a job that increases the number of spoolrequests so that I can verify the alarm thersholds.
Thanks
TomasHi ..
One thing you can do. Create two separate test program. In one program write simple one write statement and from another program submit the previous prog via job .
do 1000 times.
call function 'JOB_OPEN'
exporting
jobname = l_name "Job Name
importing
jobcount = l_number "Job Number
exceptions
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
others = 4.
if sy-subrc = 0.
Submit the job in background
submit z2nd_prog
via job l_name number l_number and return.
if sy-subrc = 0.
call function 'JOB_CLOSE'
exporting
jobcount = l_number
jobname = l_name
strtimmed = 'X'
exceptions
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
others = 8.
enddo. -
Hi all,
Can anybody tell me how to create a spool request for a background job programatically
Regards
Yathish
Message was edited by: Yathish
Rich thanks for your reply,
But there is no write statement in the backbround job. Can u please explain me how to do it in detail
Thanks in advance
Yathish
Yathish GundlupetThat's right, in order for a program to produce a spool request, it either must create a list output using WRITE statements, or it must produce a sapscript or smartform output.
In the first case, a simply WRITE statement at the end of your program will work.
WRITE:/ 'Program has completed successfully'.
Regards,
Rich Heilman -
FM "open form ; how to craete create SPOOL REQUEST
Hi.
I have a Z program n layout . We have used a FM "open form."
But when I run, i dont get spool
In this case I want to create SPOOL REQUEST whenever I run program.Can anyone
suggest what fields I need to mark in ITCPO and NAST or more than these.Hi,
Check this link :
http://www.thespot4sap.com/articles/SAPscript_example_code.asp
Regards
Appana -
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 create a new job in sm36 and how do we know the job has been created. where to look for that job name.
please explain.
thanks,
phyroseHi,
Save the variant of report.
Go to sm36. create a new job.
In start condition, specify all the day and time.
and in Step specify the report name and variant.
and then go to sm37 and run that report..........
In sm37, got to that job, select that job and click on display spool list to see the output of that job.
See the status of the JOB whether it is finised or executed with errors etc
If it is executed and the status shows FINISHED then go to the related transaction and see the output of that Report.
see the details for JOb secheduling
Scheduling JOB in background:
Go to SM36 create a Job
click on Start Condition
Click on DATE and TIME enter date scheduled Start and END times
click on Period Values
Click on HOURLY/WEEKLY etc
CLick on RESTRICTIONS also to use further criteria.
so your job will be scheduled and run as per your requirement.
and in SM37 Transaction check the status of that JOB
Check this link for scheduling jobs..
http://help.sap.com/saphelp_nw2004s/helpdata/en/c4/3a7f87505211d189550000e829fbbd/content.htm
regards,
Ruchika
reward if useful........ -
How to create check in batch automatically after automatic payment program
Hello
SAP Experts i am getting a issue
how to create check in batch automatically after automatic payment program ( t code is f110)
Thanks & Regards
Narendra.GHi Narendra,
Please note the process below for cheque Printing:-
1. The pre requisite for Cheque printing is you have used program RFFOUS_c/or the Z version of this program in FBZP and that you have maintained the form name in the field Form name for Payment medium in FBZP.
2. You have a pre printed stationary on which you want to print and the Program & the form has been modified to print as per this.
3. In F110, you must have assigned the Variant name, which would specify the cheque lot no. and this should exactly match with the current cheque no. in the pre printed stationary.
4. Now, after all this setting, when you run Payment run in F110, then also only the Payment documents are posted but the cheque no.s are not updated in the Payment document no. nor the PAYR table is updated. It is only when you run the Print out tab, that a spool is created in SP01 for cheque printing as per the Payment documents.
5. Then in SP01, you can print the spool on your pre printed stationary.
This is the complete process of printing cheques from F110. Hope this helps..
Regards,
SAPFICO
Maybe you are looking for
-
How do I download 64-bit Premier Elem 11 to new (replacement) computer
Hi everyone, I am replacing my old 32 bit Win 7 laptop with a new 64 bit Win 8.1 model. I have a valid license for Adobe Prim. Elem. 11. I originally downloaded the 32 bit version of Prim. Elem 11 (used it on the old machine) but when I tried install
-
Statement: SELECT{ CROSSJOIN({ [Product].[Product] }, { [Measures].[Shipping Units] })} ON ROWS FROM [Shipment] com.interlacesystems.iquery.QueryException: COLUMNS axis specification missing Statement: SELECT{ CROSSJOIN({ [Product].[Product] },
-
How do I save my Prel file as a .MOV file or other movie file in Prel 12?
I'm trying to upload an edited video to YouTube I made in Prel 12 but it had an error when I tried to share it in Prel but it said the video was too long even though my video was only 4 minutes long. So how do I fix that or save my project under some
-
Why is Leica raw more difficult than Nikon to import to light room?
-
Hi, Pls explain how ABAP and JRE works in XI environment ? Thx, Sofia