Application Development 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: 

Sending mail to external address

Former Member
0 Kudos
2,247

Hi,

I'm using SO_NEW_DOCUMENT_ATT_SEND_API1 to send emails.

Everything is woring fine until I use an email address that is not in ADR6.

I've found that the system checks ADR6 for the email address before sending. Because of the amount of Business Partners on our system, ADR6 has millions of records and this sequential read is causing a timeout.

I am user REC_TYPE 'U' and COM_TYPE 'INT'

Is there anyway to bypass the ADR6 read?

I am on WAS 6.20.

7 REPLIES 7

sumit_joshi2
Advisor
Advisor
0 Kudos
965

Helllo Mac,

You can maintain an external email address into transaction SCOT. (SCOT- SMTP- Intrenet-SET).

After this you can send emails to that address.

Thnaks,

Sumit

Former Member
0 Kudos
965

Hi Sumit,

The email address is already in SCOT, however it is not in ADR6 fixed to an address record.

The function module for sending emails is attempting to read ADR6 (even though it is an external address) this is causing very long response times and time outs.

I don't know why it needs to read ADR6

Former Member
0 Kudos
965

Hi James,

There are lots of threads discussed on this earlier. One the best links related to your issue. Here you go:

[Sending email to external mail ID's|;

Former Member
0 Kudos
965

Hi,

The FM "SO_NEW_DOCUMENT_ATT_SEND_API1" has now become old.

SAP now recommends the Class CL_BCS (the BCS interface), to be used since release 6.10

I have used it and I would say without much knowledge of OOPs and it has always worked fine for me.

I think you should try to use this once. It should help you out of your problem.

Also see this link

[Sending Mails - Home Page|http://wiki.sdn.sap.com/wiki/display/ABAP/SendingMails-HomePage]

I will also write the code snippet which I used in my report, if it helps you in some way.

Let me know if you need that.

Hope this helps you.

Regards,

Saurabh.

Edited by: Saurabh Banerjee on Dec 22, 2010 4:57 PM

Edited by: Saurabh Banerjee on Dec 22, 2010 4:58 PM

Former Member
0 Kudos
965

Thanks for your responses.

However, as stated, I don't have a problem with the coding of sending an email, my problem was with standard SAP reading ADR6 and timing out.

I have no found the problem anyway. This issue was happening in our UAT system. What I didn't know is that the data team had changed every email address of every business partner to be the same email address.

This meant the ADR6 read was trying to return several million entries and this caused the timeout.

I've asked them to use a different email address for the UAT test and it works fine.

Cheers

0 Kudos
965

What I didn't know is that the data team had changed every email address of every business partner to be the same email address.

Sweet...Presumably that was to prevent test emails from going out to live partners? A better approach is to lock-down SAPConnect by turning off any scheduled send jobs AND by restricting the SMTP node in any non-PROD system to your company domain or specific email addresses within that domain. After a client copy, I also drop the ADR6 table and delete the related ADRC flag pointer so that testers have to enter an address in any partner they want to test with.

0 Kudos
965

Hi Brad,

Yes, that's exactly why they did it, would have been nice to have been told though. It would have saved me a lot of messing around.

I'll pass your idea on to the team. My concern with their current approach is that after any copy back from production, they'll need to reset all the passwords again.

As you say, it'll be quicker to drop ADR6 and set entries in SCOT.