08-21-2007 11:40 AM
Hi,
This is a report program. I have an internal table with the data (it has a line of 72 characters). I want it to be sent as PDF attachment.
When i am passing the data directly to the CONTENTS_BIN parameter. The mail is being sent. The attachment with the .PDF extension can be seen, but am unable to open it. It gives an error.
Kindly provide a solution. This is not related to smartforms. No spool generation.
Points will be definitely awarded.
Thanks & Regards,
Goutham.
08-21-2007 2:04 PM
In function group STXW there is a function CONVERT_ABAPSPOOLJOB_2_PDF which can take spool output and format it as PDF. There are a number of other functions for OTF (Sapscript) to PDF.
If you call function PRINT_TEXT passing it your data in the TDLINE field of the LINES (TLINE) table with appropriate formatting characters in the TDFORMAT field, and if you set field TDGETOTF in the OPTIONS (ITCPO) structure to 'X', it will return the OTFDATA table which you can covert to PDF.
To email the resulting PDF you will need to convert from lines of 134 characters to lines of 255 characters required by the send email function modules. Be careful not to compress spacing when doing this - PDF is sensistve to this as it is binary data.
Andrew
08-21-2007 11:45 AM
08-21-2007 11:53 AM
Hi Premalatha,
Thanks for your response. But i have Acrobat reader 8 installed on my system. I can read other PDF files. I suppose this is not the problem.
Regards,
Goutham
08-21-2007 2:04 PM
In function group STXW there is a function CONVERT_ABAPSPOOLJOB_2_PDF which can take spool output and format it as PDF. There are a number of other functions for OTF (Sapscript) to PDF.
If you call function PRINT_TEXT passing it your data in the TDLINE field of the LINES (TLINE) table with appropriate formatting characters in the TDFORMAT field, and if you set field TDGETOTF in the OPTIONS (ITCPO) structure to 'X', it will return the OTFDATA table which you can covert to PDF.
To email the resulting PDF you will need to convert from lines of 134 characters to lines of 255 characters required by the send email function modules. Be careful not to compress spacing when doing this - PDF is sensistve to this as it is binary data.
Andrew
08-21-2007 2:51 PM
Hi Andrew,
Thank you very much for your response.
Is it mandatory to have the OTF form of the internal table data and then convert it to PDF format for the PDF attachment creation.
Is there any direct way to send the internal table data and get the content in it in the PDF attachment.
Regards,
Goutham
09-02-2008 4:32 PM