Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how to create the multiple spool requests for a single report.

former_member538160
Participant
0 Kudos

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.

6 REPLIES 6

former_member201275
Active Contributor
0 Kudos

there are many useful functions in function group SPOX for your purposes.

former_member201275
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

former_member538160
Participant
0 Kudos

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.

0 Kudos

hey rakesh,

i have the same requirement. can u help me how to generate the pdf for every customer???