04-01-2009 9:19 AM
hi,
i am sending an adobeform as pdf in an email body to an external address.ie. i need an output in my outlook account as : an email with PDF document as the body of the Email.
Problem --> I am getting the PDF as an attachment always.
here is my code
TRY.
send_request = cl_bcs=>create_persistent( ).
lp_pdf_size = XSTRLEN( ls_formoutput-pdf ).
pdf_content = cl_document_bcs=>xstring_to_solix(
ip_xstring = ls_formoutput-pdf ).
document = cl_document_bcs=>create_document(
i_type = 'PDF'
i_hex = pdf_content
i_length = lp_pdf_size
i_subject = 'test created by BCS_EXAMPLE_6' ). "#EC NOTEXT
send_request->set_document( document ).
recipient = cl_cam_address_bcs=>create_internet_address(
i_address_string = p_email ).
send_request->add_recipient( i_recipient = recipient ).
sent_to_all = send_request->send(
i_with_error_screen = 'X' ).
can someone help here
Thanks
04-01-2009 9:24 AM
Hi,
check the link , i think u will get a solution
link :
https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/convertSmartformtoPDFformat
Reards ,
Sachhi
04-01-2009 10:46 AM
TRy this FM, CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
Regards,
Joan