Skip to Content
avatar image
Former Member

Contents of Internal Table as PDF attachment to Outlook Mail.

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 21, 2007 at 01: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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • avatar image
    Former Member
    Aug 21, 2007 at 10:45 AM

    may b u dont have the acrobat reader to read the pdf file....

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • avatar image
    Former Member
    Sep 02, 2008 at 03:32 PM

    Thanks.

    Add comment
    10|10000 characters needed characters exceeded