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

Problem with SO_NEW_DOCUMENT_SEND_API1

Former Member
0 Likes
1,051

Hi,

I try to send a mail as follows:

...

CLEAR RECLIST.

RECLIST-REC_TYPE = 'U'. " internet address

RECLIST-RECEIVER = 'x.y@z.com'.

reclist-express = 'X'. " send with priority

reclist-com_type = 'INT'. " send via internet

APPEND RECLIST.

  • Send the document

CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'

EXPORTING

DOCUMENT_TYPE = 'RAW'

DOCUMENT_DATA = DOC_CHNG

PUT_IN_OUTBOX = 'X'

TABLES

OBJECT_CONTENT = OBJCONT

RECEIVERS = RECLIST

EXCEPTIONS

TOO_MANY_RECEIVERS = 1

DOCUMENT_NOT_SENT = 2

OPERATION_NO_AUTHORIZATION = 4

OTHERS = 99.

...

Return Code is 0.

If I send SAP mail:

*CLEAR RECLIST.

*RECLIST-RECEIVER = 'RREITZ'. " replace with <login name>

*RECLIST-REC_TYPE = 'B'.

*RECLIST-EXPRESS = 'X'.

*APPEND RECLIST.

it works fine.

---

How can I check where the problem lies when sending mail via Internet-Gateway?

1 ACCEPTED SOLUTION
Read only

former_member191062
Active Contributor
0 Likes
935

Hallo Rainer,

Can you please check wether the SAP Example from SAP note:

#190669 works? It contains an example how to use relased FM for sending mails.

If your system is above 6.10 you will need an explicite commit work. Check Note: #489286

If it would not help, can you please describe what you encounter? Is the mail visible in Tr. SOST what is the status?

Regards,

Dezso

6 REPLIES 6
Read only

former_member191062
Active Contributor
0 Likes
936

Hallo Rainer,

Can you please check wether the SAP Example from SAP note:

#190669 works? It contains an example how to use relased FM for sending mails.

If your system is above 6.10 you will need an explicite commit work. Check Note: #489286

If it would not help, can you please describe what you encounter? Is the mail visible in Tr. SOST what is the status?

Regards,

Dezso

Read only

Former Member
0 Likes
935

Hi Rainer,

1. SCOT Settings

2. In SCOT

there is a setting

WHERE / WHERE email is allowed to be sent

3. eg.

*@abc.om

*@yahoo.com

etc.

4. Contact ur basis team

so that they configure basis

to allow R/3 to send

emails to such @ ids.

regards,

amit m.

Read only

Former Member
0 Likes
935

Hi Rainer,

I got it what u trying.

the problem in the following code is as under:-

To send an e-mail to an internet address u have to fill the reclist as under:-

CLEAR RECLIST.

RECLIST-REC_TYPE = 'U'. " internet address

RECLIST-RECEIVER = 'x.y@z.com'.

APPEND RECLIST.

and what i suggest is use your own id to check it properly.

The above mentioned fields of reclist are necessery to send an e-mail to external internet address.

No need ti fill these fields:-

reclist-express = 'X'. " send with priority

reclist-com_type = 'INT'. " send via internet

in case of Internet add.

If u didin't recive n e-mail after doing this.

then goto Tx. code- SOST and check the mails are sent or still pending in the job queue.

then click on utilities n choose send jobs.

this will send all the pending jobs manually.

hope this will help U.

Plz do reward if find it helpful n ask for clarification.

Regards

-


Sachin Dhingra

Read only

0 Likes
935

Hi,

problem already solved by AMIT.

Solution for our system was:

'commit work.' as ABAP statement after call function 'SO_NEW_DOCUMENT_SEND_API1'.

Thanks.

Read only

0 Likes
935

Hi rainer,

1. problem already solved by AMIT

did i really solve it ??

regards,

amit m.

Read only

0 Likes
935

sorry, Dezso Pap did the job.