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

Issue in 'SO_NEW_DOCUMENT_SEND_API1' Function Module

Former Member
0 Likes
1,339

Hi All,

I have a problem when using the Function Module 'SO_NEW_DOCUMENT_SEND_API1'.

I am able to send data to SAP Users Email ID's using this function module, but the issue here is when i am sending

the content and receivers lists all are working fine.

But In The 'From:' part of Email receiver is getting

My Name[SAP User ID@myorganization.com]

like Shaik Rayeezuddin[F80120@XYZ.com]

But i want it to be shown as it is sent by SAP but not by me. If we can put any constant as 'SAP' also it is ok, But it should not show my details in 'FROM:' Part os Email.

Can anybody solve my problem as i need it urgent.

Thanks in advance.

Thanks & Regards,

Rayeezuddin.

12 REPLIES 12
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,149

The "From:" will always be the email address of the user id that actually is running the function module. This is why you need a valid user id in your user profile to send an email. I've always wanted to be able to force an "Sender" email address, but have never found a way. In most cases will set up background jobs under a generic user id which has a generic email address like donotreply@mycompany.com. The the receiver will see the company name as the sender.

If anyone knows of a way to achieve this, please post.

Regards,

Rich Heilman

Read only

0 Likes
1,149

Hi all,

Thanks for that replies.

Is it possible atleast not to show any thing on 'FROM:' part, I mean to say hide sender. From: will be blank then.

Thanks & Regards,

Rayeezuddin.

Read only

0 Likes
1,149

I don't think that that is possible either, at least not from the SAP side. Maybe there is a setting on the exchange server side that can hide it, but then how would you know when to hide and when not to.

Please remember to award points accordingly for helpful answers. Thanks.

Regards,

RIch Heilman

Read only

0 Likes
1,149

Hi,

Why should you?

Most email gateways will NOT accept annonymous

emails, anonymous mailings are abused to send spam.

Eddy

Read only

ramki_maley
Active Contributor
0 Likes
1,149

If your installation has a separate user id for running batch jobs, you can schedule your program with that user id. Don't forget to assign a dummy email address for this user like SAP_System@XYZ.com or DO_NOT_REPLY@XYZ.com. You should also indicate your message as system genereated in the mail body.

Cheers,

Ramki Maley.

Please reward points if the answer is helpful.

For info on awarding points click on this link: https://www.sdn.sap.com/sdn/index.sdn?page=crp_help.htm

Read only

andreas_mann3
Active Contributor
0 Likes
1,149

Hi,

you've to execute your report per batch-job with

another user ! (batch-user))

or try:

submit zreport ...USER user VIA JOB job NUMBER n

...

Andreas

Read only

Former Member
0 Likes
1,149

Hi All,

Thanks for all your replies.

I resolved the issue By passing parameter

originator = 'SAP@COMPANY.COM'

to F.M 'SO_OBJECT_SEND' that is in F.M

SO_NEW_DOCUMENT_SEND_API1.

we can pass anything we want here, that will come in 'From:' part of Email ID.

once again thanks for those replies.

Thanks & Regards,

Rayeezuddin.

Read only

0 Likes
1,149

So you are now using the fm 'SO_OBJECT_SEND' instead?

Regards,

Rich Heilman

Read only

0 Likes
1,149

In the same F.M 'SO_NEW_DOCUMENT_SEND_API1' the F.M 'SO_OBJECT_SEND' already there from there we are able to cahnge the Sender for 'From:'.

Thanks & Regards,

Rayeezuddin.

Read only

0 Likes
1,149

So you are saying that you have changed the code in the function module 'SO_NEW_DOCUMENT_SEND_API1'?

Regards,

Rich Heilman

Read only

0 Likes
1,149

Yes we have changed.

originator = 'SAP@COMPANY.COM'

ORIGINATOR_TYPE = 'U'

Just added above parameters to F.M 'SO_OBJECT_SEND' in the F.M SO_NEW_DOCUMENT_SEND_API1.

That has done the trick for us.

Read only

0 Likes
1,149

Hi,

Pls don't forget to reward points if you find the answers useful.

Eddy