01-10-2017 6:14 PM
Hello,
We upgrade to SAP ehp 7 and now when I try to send emails to sender (sender_address = itbcardsclasses-sender) with ‘Ñ’ in its name the FM SO_DOCUMENT_SEND_API1 throws sy-subrc 6 X_error example: “PABLO NIÑO [corganizacion@com.mx]” before the upgrade there was no problem to used that address.
For a quick fix a will change Ñ to N, but I would prefer to leave the name like it used to work.
Please let me know if someone knows how to fix this.
01-10-2017 11:08 PM
Hello Sandra,
No, Our system always has been Unicode, it not changed
01-10-2017 7:33 PM
Did you move from a non-Unicode to a Unicode system?
01-10-2017 11:08 PM
Hello Sandra,
No, Our system always has been Unicode, it not changed
01-11-2017 7:19 AM
I guess you should check SAP notes or ask SAP support. Did you check the note 1789073 - Renewal of e-mail address validation?
01-12-2017 12:53 AM
Thanks a lot Sandra, the note solve my problem.
01-11-2017 8:48 AM
Use the CL_BCS framework instead. It's far less problematic.
01-12-2017 12:38 AM
Thanks Matthew,
I tried with CL_BCS but I cant send mails with sender format like: "MARIO SOTO [msotol@com.mx]"
REPORT z_mail_otro_sender.
DATA:
gv_sent_to_all TYPE os_boolean,
gr_send_request TYPE REF TO cl_bcs,
gr_bcs_exception TYPE REF TO cx_bcs,
gr_recipient TYPE REF TO if_recipient_bcs,
gr_sender TYPE REF TO if_sender_bcs,
bcs_exception TYPE REF TO cx_bcs,
ls_sender TYPE ad_smtpadr VALUE 'user@com',
ls_recipient TYPE ad_smtpadr VALUE 'test@sap.com'.
TRY.
"Create send request
gr_send_request = cl_bcs=>create_persistent( ).
gr_sender = cl_cam_address_bcs=>create_internet_address(
i_address_string = ls_sender ).
"Add sender to send request
gr_recipient = cl_cam_address_bcs=>create_internet_address(
i_address_string = ls_recipient ).
"Add recipient to send request
CALL METHOD gr_send_request->add_recipient
EXPORTING
i_recipient = gr_recipient
i_express = 'X'.
"Send email
CALL METHOD gr_send_request->send(
EXPORTING
i_with_error_screen = 'X'
RECEIVING
result = gv_sent_to_all ).
IF gv_sent_to_all IS INITIAL.
MESSAGE i500(sbcoms) WITH 'user'. "mailto.
ELSE.
MESSAGE s022(so).
ENDIF.
"Exception handling
CATCH cx_bcs INTO gr_bcs_exception.
MESSAGE gr_bcs_exception->error_text TYPE 'I'.
MESSAGE i865(so) WITH gr_bcs_exception->error_type.
ENDTRY.
01-12-2017 7:29 PM
Did you try that: (https://archive.sap.com/discussions/thread/3952008)
result = cl_cam_address_bcs=>create_direct_address(
i_address = 'user@server.domain'
i_addr_type = 'INT'
i_visname = 'User name'
i_incl_sapuser = sy-uname ).