Skip to Content
Former Member
Apr 20, 2011 at 05:36 AM

Problem for Mail with PDF attachment


Hello all,

I have a problem regarding sending mail with a PDF attachment from SAP. The attachment contains Payslip of employee that is being generated from a Submit program of the respective HRFORM. I have used the Submit program within a JOB and the spool request generated. From the spool request i am extracting the pages using FM RSPO_GET_PAGES_SPOOLJOB.

Now to convert the spool job to PDF am using FM CONVERT_OTFSPOOLJOB_2_PDF. And after the job is being finished, am deleting both the JOB and SPOOL.

To change the output of the FM CONVERT_OTFSPOOLJOB_2_PDF, into attachment with line width of 255 am using FM SX_TABLE_LINE_WIDTH_CHANGE. Then after filling all the required parameters for FM SO_DOCUMENT_SEND_API1, am sending the mail with the attachment. I have kept the format as PDF.

But the problem here is, the attachment is going as .DAT file and not as .PDF file!!!

Please help to resolve this issue.

with regards,