05-18-2006 10:22 AM
Hi .
I am editing std sap code wherein sap is using FM: SO_OBJECT_SEND .
I am trying to send mail to external email address however it is not going. sy-subrc = 0 !
However if I try for internal sap address it is working.
Below is code for external address
MOVE 'U' TO X_RECEIVERS-RECESC. " Receiver type "A
MOVE 'X' TO X_RECEIVERS-SNDCP. " Send as a copy
MOVE 'X' TO X_RECEIVERS-SNDEX. " EXPRESS DOCUMENT
X_RECEIVERS-RECEXTNAM = 'abc@anywhere.com'.
X_RECEIVERS-SNDART = 'INT'.
APPEND X_RECEIVERS.
Below is code for internal address
MOVE RECEIVER TO X_RECEIVERS-RECNAM. " user id
MOVE 'B' TO X_RECEIVERS-RECESC. " Receiver type "B
MOVE 'X' TO X_RECEIVERS-SNDCP. " Send as a copy
MOVE 'X' TO X_RECEIVERS-SNDEX. " EXPRESS DOCUMENT
APPEND X_RECEIVERS.
please suggest
05-18-2006 10:26 AM
Hi Osk,
You have to put an explicit COMMIT WORK statement in the Program immediately after the function call to SO_OBJECT_SEND. This statement is required from version 47 & upward.
Regards,
Suresh Datti
05-18-2006 10:26 AM
Hi Osk,
You have to put an explicit COMMIT WORK statement in the Program immediately after the function call to SO_OBJECT_SEND. This statement is required from version 47 & upward.
Regards,
Suresh Datti
05-18-2006 10:29 AM
Hii
try by step mode execution through SE37 for the function module 'SO_OBJECT_SEND'
check this link
<b>http://www.sap-img.com/fu016.htm</b>
Regards
Naresh
05-18-2006 10:31 AM
Hi OSk,
i feel you are missing some configuration to send the mail to outside SAP , try to contact your BAsis.
Regards
vijay
05-18-2006 10:34 AM
05-18-2006 10:48 AM
Hai Osk Osk
report zemail no standard page heading line-size 220.
data: message_content like soli occurs 10 with header line,
receiver_list like soos1 occurs 5 with header line,
w_object_hd_change like sood1.
start-of-selection.
Receivers
receiver_list-recextnam = 'dude@domain.com'.
receiver_list-recesc = 'E'.
receiver_list-sndart = 'INT'
receiver_list-sndpri = '1'.
append receiver_list.
General data
w_object_hd_change-objla = sy-langu.
w_object_hd_change-objnam = 'Object name'.
w_object_hd_change-objsns = 'P'.
w_object_hd_change-file_ext = 'HTM'. "<--this is important
Mail subject
w_object_hd_change-objdes = 'HTML from SAP/ABAP'.
Mail body
append 'Message content' to message_content.
append '<b>How''s this for sending HTML E-mail from SAP?</b>' to
message_content.
append '<p>New paragraph</p>' to message_content.
append '<p>Apostrophe’s</p>' to message_content.
Call function to send email - SAPConnect needs to be configured
call function 'SO_OBJECT_SEND'
exporting
object_hd_change = w_object_hd_change
object_type = 'RAW'
owner = sy-uname
tables
objcont = message_content
receivers = receiver_list.
Thanks & regards
Sreenivasulu P