2007 Aug 23 12:52 PM
Hi,
i use the FM <b>SO_NEW_DOCUMENT_ATT_SEND_API</b>1 to send a mail with an attachements. For this, I put the data for ahe Attachmend to the Export-Parameter <b>contents_bin</b> of this FM.
In a 6.20 system without enabled Unicode - everything work fine.
In a 7.00 system with enabled Unicode - there is always a blank character after every character
Does anybody know this problems an can give me a usefull hint?
Regards,
Stefan
2007 Aug 23 1:37 PM
Try using the new CL_BCS object for sending emails - this is unicode compliant.
There are several examples in the ABAP forums for this.
Andrew
Hi,
Please check whether your program is unicode enabled? if not use UCCHECK and make it unicode enabled.
The fm SO_NEW_DOCUMENT_ATT_SEND_API1 will work with Unicode.
a®
2007 Aug 23 1:16 PM
In the program, start-of-selection event.. please use
SET LOCALE LANGUAGE 'EN'. or if its Japanese then 'JA' etc
2007 Aug 23 1:25 PM
2007 Aug 23 1:30 PM
Please refer following threads:
http://www.s001.org/ABAP-Hlp/abapset_locale.htm
The parameter value is exceeding the defined limit
2007 Aug 23 1:37 PM
Try using the new CL_BCS object for sending emails - this is unicode compliant.
There are several examples in the ABAP forums for this.
Andrew
2007 Aug 23 1:50 PM
Hi,
thank you. Do you have an example report to send a mail with an excel attachment by using the CL_BCS.
Regards,
Stefan
2007 Aug 23 2:07 PM
Take a look at my response to
There is a test program there for sending email with document text.
Adding attachments can be done by including the following code. I believe the input tables are the same or similar format to those used with the existing FM.
data: ATT_BIN_TYPE TYPE SOODK-OBJTP.
data: ATT_BIN TYPE SOLIX_TAB.
data: ATT_BIN_DESC TYPE SOOD-OBJDES.
data: ATT_TEXT_TYPE TYPE SOODK-OBJTP.
data: ATT_TEXT TYPE SOLI_TAB.
data: ATT_TEXT_DESC TYPE SOOD-OBJDES.
* Add Text Attachment if present
IF zatt_text[] IS SUPPLIED.
TRY.
CALL METHOD document->add_attachment
EXPORTING
i_attachment_type = att_text_type
i_attachment_subject = att_text_desc
i_att_content_text = att_text.
CATCH cx_document_bcs .
" 'Error creating text attachment'.
RAISE send_error.
ENDTRY.
ENDIF.
* Add BIN Attachment if present
IF zatt_bin[] IS SUPPLIED.
TRY.
CALL METHOD document->add_attachment
EXPORTING
i_attachment_type = att_bin_type
i_attachment_subject = att_bin_desc
i_att_content_hex = att_bin.
CATCH cx_document_bcs .
" 'Error creating BIN attachment'.
RAISE send_error.
ENDTRY.
ENDIF.
* Add document & attachment(s) to email object
TRY.
CALL METHOD l_obj->set_document
EXPORTING
i_document = document.
CATCH cx_send_req_bcs.
" 'Error linking document to email'.
RAISE send_error.
ENDTRY.
Hope this helps
Andrew
2007 Aug 24 11:54 AM
Hi Andrew,
<b>CL_BCS</b> works great!
Thank you very much for your help!
Regards,
Stefan
2007 Aug 23 2:20 PM
Hi,
Please check whether your program is unicode enabled? if not use UCCHECK and make it unicode enabled.
The fm SO_NEW_DOCUMENT_ATT_SEND_API1 will work with Unicode.
a®
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |