Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

The PDF mail attachment is not opening

Hi,

I am sending mail to initiator with attachment after final release of the PO through workflow . But attachment is not opening , the following error is coming .

I am fetching the spool request of the particular PO (Spool type is PDF)  and pass it into FM : 'CONVERT_ABAPSPOOLJOB_2_PDF'. Finally I am

sending the mail using the FM :  SO_NEW_DOCUMENT_ATT_SEND_API1.

Please find the attached code.

Regards,

Shamsu.

code.txt.zip (2278 B)
Former Member
Former Member replied

Hi All,

It is corrected by myself.

Earlier I was passing the PDF file which is getting from the FM CONVERT_ABAPSPOOLJOB_2_PDF and the same is passing to the following parameter of the  FM SO_NEW_DOCUMENT_ATT_SEND_API1


           contents_bin              = t_contents_bin


But now I convert the PDF using the standard subroutine   create_pdf_from_spool and convert this PDF which is getting from this subroutine is like below.


*--->Convert xstring to solix

         so_solixtab = cl_bcs_convert=>xstring_to_solix( p_pdf ).


and the same is passing to the following parameter of the  FM SO_NEW_DOCUMENT_ATT_SEND_API1

     contents_hex               = so_solixtab.

Thanks & regards,

Shamsudheen

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question