The PDF mail attachment is not opening
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.
shamsudheen k replied
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,