Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

FM SO_DOCUMENT_SEND_API1 x_error with Sender name contains Ñ

fsandovalz1
Explorer
0 Kudos

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.

1 ACCEPTED SOLUTION

fsandovalz1
Explorer
0 Kudos

Hello Sandra,

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

7 REPLIES 7

Sandra_Rossi
Active Contributor
0 Kudos

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

fsandovalz1
Explorer
0 Kudos

Hello Sandra,

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

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

Thanks a lot Sandra, the note solve my problem.

matt
Active Contributor
0 Kudos

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

fsandovalz1
Explorer
0 Kudos

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.

0 Kudos

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