08-17-2010 10:01 AM
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.
08-17-2010 11:14 AM
there are many useful functions in function group SPOX for your purposes.
08-17-2010 11:21 AM
to create new spool refer to form 'SET_LIST_PRINT_PARAM in include RFFORI07, i.e. use the same function: CALL FUNCTION 'GET_PRINT_PARAMETERS'
then;
SUBMIT zprogam TO SAP-SPOOL
SPOOL PARAMETERS lw_print_parameters
WITHOUT SPOOL DYNPRO
WITH p_unxfil EQ p_lw_unxfil
WITH p_job EQ l_jobname
WITH rb_aud EQ rb_aud
WITH rb_ada EQ rb_ada
VIA JOB l_jobname
NUMBER lw_jobcount
AND RETURN.
08-17-2010 11:54 AM
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.
08-18-2010 7:11 AM
hi,
One way to create multiple spools in ABAP code is through the NEW-PAGE
command. Check out the PRINT ON/OFF in the help.
I hope this will help you..
Regards,
Kiran
08-19-2010 10:15 AM
Hi all,
Thank u for ur valuable inputs. now i will tell u the exact requirement.
we need to send customer ledger for all the customers in pdf. for this we will be creating a back ground job to execute cust ledger report. and now i need to convert each customers ledger into pdf and have to send a mail to them with this attachment . but my problem is if u take the sppol request it will give all the customers data into a single spool.
for this what iam doing is i have created a 2nd program. and iam submitting the customer ledger report by passing each customer individualy. now what happenng was sendcond report is getting(customer ledger report) is getting failed in backguond job. and what should i do to solve this one.
01-14-2015 3:52 AM
hey rakesh,
i have the same requirement. can u help me how to generate the pdf for every customer???