Application Development and Automation 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: 
Read only

FM : SO_OBJECT_SEND

Former Member
0 Likes
1,037

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

1 ACCEPTED SOLUTION
Read only

suresh_datti
Active Contributor
0 Likes
739

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

5 REPLIES 5
Read only

suresh_datti
Active Contributor
0 Likes
740

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

Read only

Former Member
0 Likes
739

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

Read only

Former Member
0 Likes
739

Hi OSk,

i feel you are missing some configuration to send the mail to outside SAP , try to contact your BAsis.

Regards

vijay

Read only

0 Likes
739

Check this for configuration help..

http://www.sapgenie.com/interfaces/sapconnect.htm

Regards

vijay

Read only

Former Member
0 Likes
739

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&#8217s</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