Skip to Content
0

FM SO_DOCUMENT_SEND_API1 x_error with Sender name contains Ñ

Jan 10, 2017 at 06:14 PM

123

avatar image

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.

10 |10000 characters needed characters left characters exceeded

Did you move from a non-Unicode to a Unicode system?

0
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Fernando Sandoval Jan 10, 2017 at 11:08 PM
0

Hello Sandra,

No, Our system always has been Unicode, it not changed

Show 2 Share
10 |10000 characters needed characters left characters exceeded

I guess you should check SAP notes or ask SAP support. Did you check the note 1789073 - Renewal of e-mail address validation?

2

Thanks a lot Sandra, the note solve my problem.

1
Matthew Billingham
Jan 11, 2017 at 08:48 AM
0

Use the CL_BCS framework instead. It's far less problematic.

Share
10 |10000 characters needed characters left characters exceeded
Fernando Sandoval Jan 12, 2017 at 12:38 AM
0

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.
Show 1 Share
10 |10000 characters needed characters left characters exceeded

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 ).
0