2009 Mar 25 10:20 AM
Hello,
Is it possible to send a Adobe form as a email body and not as attachment? I know it is possible with smartforms. I am interested to know if it is also possible with ADOBE forms
Dose anyone have some solution?
Thanks.
Hello,
Is it possible to send a Adobe form as a email body and not as attachment? I know it is possible with smartforms. I am interested to know if it is also possible with ADOBE forms
Dose anyone have some solution?
Thanks.
2009 Mar 26 10:20 AM
Hi
The PDF file generated is available in the parameter fp_formoutput which is returned by the generated function module.
call function fm_name
exporting
/1bcdwb/docparams = fp_docparams
Z_VNDBNK = wa_vndbnk
importing
/1BCDWB/FORMOUTPUT = fp_formoutput.
The next step would be to extract this PDF and send it using BCS.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = fp_formoutput-PDF "PDF file from function module
TABLES
binary_tab = lt_att_content_hex.
Add your PDF content lt_att_content_hex to Mail body as you do in Smartforms
You can use 'SO_NEW_DOCUMENT_ATT_SEND_API1' to send the mail or use Objects to send the mail as below.
CLASS cl_bcs DEFINITION LOAD.
DATA:
lo_send_request TYPE REF TO cl_bcs VALUE IS INITIAL.
lo_send_request = cl_bcs=>create_persistent( ).
***Message body and subject
DATA:
lt_message_body TYPE bcsy_text VALUE IS INITIAL,
lo_document TYPE REF TO cl_document_bcs VALUE IS INITIAL.
Add your PDF content lt_att_content_hex to lt_message_body
lo_document = cl_document_bcs=>create_document(
i_type = 'RAW'
i_text = lt_message_body
i_subject = 'Vendor Payment Form' ).
2009 Mar 26 10:24 AM
2009 Mar 26 6:50 PM