Skip to Content
author's profile photo Former Member
Former Member

How to combine multipe ABAP spool in to PDF/HTML and send email?

Hi All,

I have a custom report (good old classical report), the output of which is to be distirbuted to different people (on external mail-id). Everyone get different report based on what they are responsible for.

Life was good until i was testing it with small amount of data where report output is 30-40 pages for each person (everyone gets a report which is 30-40 pages). I was using <b>CONVERT_ABAPSPOOLJOB_2_PDF</b> to convert the spool to pdf.

The issues started when i executed the report for large amout of data. I came to know that if the number of pages in spool are more than '99', this FM submits the job in background to convert the spool to pdf. In this case i cannot get the PDF data back from this FM, so i cannot send the mail. I tried reading the spool of this batch job (submitted by FM to convert to PDF) but the spool data is in binary format and is of no use.

Now i started splitting the ouput of report at every '98' page and then starting the new spool. I thought that i can keep on converting 98 pages and keep on appending it to another table and then send the mail. But the issue here is, it only sends the PDF of last spool. For example if output has 100 pages, the first spool has 98 pages and the second has 2. Eventhough i convert both spool to PFD and append it to another table, the email attachment only has last two pages. (this might be because of the EOF line at the end of each PDF data).

Since this did not work out, i though of sending a HTML attachment. For that i used FM RSPO_RETURN_SPOOLJOB to read spool data and then send it as a email (which send it as a HTML). Since my report can be as big as couple of thousand pages, i have to split the spool here and i am stuck with the same issues as spliting spool and converting to PDF. (it sends only one spool of many)


<u>So my questio is:</u></b>

<b>[1].</b> Is there anyway to combine two (or more) spools and send it as attachment in mail (PDF or HTML).

<b>[2].</b> In SDN someone has given a solution to combile two OTF spool to HTML. But i do not know if there is a way to convert ABAP spool to OTF. Does anyone know how to convert ABAP Spool to OTF.

I can really appreciate some help here. I am breaking my head for couple of days to find the solution.



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Sep 21, 2007 at 04:18 AM


    Please refer this thread:


    BEst regards,


    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member


      Thanks for your reply Prashant.

      I have already gone through this thread before and is of no help to me. It gives the solution of how to combine two OTF spool <b>NOT</b> how to combine to ABAP spool. (see the second point in my question). It still does not answer to any of my question.

      Let me know if you have any ideas.


  • author's profile photo Former Member
    Former Member
    Posted on Sep 22, 2007 at 09:39 PM


    Anybody has any idea on this?



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.