cancel
Showing results for 
Search instead for 
Did you mean: 

Email is not getting triggered

Former Member
0 Kudos

Hi All,

I'm using the below FM to send the mail. But it's not working. Could you please help me to resolve the issue. Thanks

Thanks,

Dinesh

Accepted Solutions (0)

Answers (3)

Answers (3)

RamanKorrapati
Active Contributor
0 Kudos

please repost at ABAP forum or take abap expert help.

sander_vanwilligen
Active Contributor
0 Kudos

Hi Dinesh,

Please find below some sample coding which I recently used for sending an email. If you compare the coding, you can observe some differences. Also have a look at the table for email receivers.

DATA:

  g_s_docdata   TYPE sodocchgi1,

  g_s_content   TYPE solisti1,

  g_t_content   TYPE STANDARD TABLE OF solisti1,

  g_s_receiver  TYPE somlreci1,

  g_t_receiver  TYPE STANDARD TABLE OF somlreci1.

* Send e-mail with DTP monitor log to receiver list

*-- preparation

  LOOP AT s_email.

    IF s_email-low IS INITIAL.

      CONTINUE.

    ELSE.

      CLEAR g_s_receiver.

      g_s_receiver-receiver = s_email-low.

      g_s_receiver-rec_type = 'U'.    "internet address

      g_s_receiver-com_type = 'INT'.

      APPEND g_s_receiver TO g_t_receiver.

    ENDIF.

  ENDLOOP.

*-- send message

  CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'

    EXPORTING

      document_data              = g_s_docdata

      document_type              = 'RAW'

      put_in_outbox              = rs_c_true

      commit_work                = rs_c_true

    TABLES

      object_content             = g_t_content

      receivers                  = g_t_receiver

    EXCEPTIONS

      too_many_receivers         = 1

      document_not_sent          = 2

      document_type_not_exist    = 3

      operation_no_authorization = 4

      parameter_error            = 5

      x_error                    = 6

      enqueue_error              = 7

      OTHERS                     = 8.

I did not have to use any COMMIT WORK or trigger program RSCONN01 (what you are doing in the last part of the coding snapshot).

Note:that the SAPconnect configuration must be OK as a prerequisite (t/code SICF and SCOT).

Best regards,

Sander

mauro_blanc3
Active Participant
0 Kudos

What error message are you getting (if any)?.

also have you checked Tx SOST to see if the message is there?.

Finally, I would use CL_BCS class instead of this FM (check Package SBCOMS for examples).

Mauro