on 08-25-2015 4:20 PM
please repost at ABAP forum or take abap expert help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.