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

dobule sap emails

Former Member
0 Likes
956

Hi,

I've go problem with SO_NEW_DOCUMENT_SEND_API1 FM. Its always send each mail to receiver and one copy of it to sender. So when I'm sending mail to anybody I'm always getting copy of it as a sender. Is it normal ? how can I turn off sending copy to sender ?

ps. I do it like this:

doc_chng-obj_name = 'ZZEM.

CONCATENATE 'zem info -' title

INTO doc_chng-obj_descr SEPARATED BY space.

DESCRIBE TABLE objtxt LINES tab_lines.

READ TABLE objtxt INDEX tab_lines.

doc_chng-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).

CLEAR objpack-transf_bin.

objpack-head_start = 1.

objpack-head_num = 0.

objpack-body_start = 1.

objpack-body_num = tab_lines.

objpack-doc_type = 'TXT'.

APPEND objpack.

CONDENSE email NO-GAPS.

SPLIT email AT ',' INTO TABLE recivers.

LOOP AT recivers.

IF recivers <> ''.

reclist-receiver = recivers.

reclist-rec_type = 'U'.

reclist-com_type = 'INT'.

APPEND reclist.

ENDIF.

ENDLOOP.

CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'

EXPORTING

document_data = doc_chng

put_in_outbox = ''

TABLES

packing_list = objpack

object_header = objhead

contents_bin = objbin

contents_txt = objtxt

receivers = reclist

EXCEPTIONS

too_many_receivers = 1

document_not_sent = 2

operation_no_authorization = 4

OTHERS = 99.

My address is not included in email variable above !

thx for help

Hi,

I've go problem with SO_NEW_DOCUMENT_SEND_API1 FM. Its always send each mail to receiver and one copy of it to sender. So when I'm sending mail to anybody I'm always getting copy of it as a sender. Is it normal ? how can I turn off sending copy to sender ?

ps. I do it like this:

doc_chng-obj_name = 'ZZEM.

CONCATENATE 'zem info -' title

INTO doc_chng-obj_descr SEPARATED BY space.

DESCRIBE TABLE objtxt LINES tab_lines.

READ TABLE objtxt INDEX tab_lines.

doc_chng-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).

CLEAR objpack-transf_bin.

objpack-head_start = 1.

objpack-head_num = 0.

objpack-body_start = 1.

objpack-body_num = tab_lines.

objpack-doc_type = 'TXT'.

APPEND objpack.

CONDENSE email NO-GAPS.

SPLIT email AT ',' INTO TABLE recivers.

LOOP AT recivers.

IF recivers <> ''.

reclist-receiver = recivers.

reclist-rec_type = 'U'.

reclist-com_type = 'INT'.

APPEND reclist.

ENDIF.

ENDLOOP.

CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'

EXPORTING

document_data = doc_chng

put_in_outbox = ''

TABLES

packing_list = objpack

object_header = objhead

contents_bin = objbin

contents_txt = objtxt

receivers = reclist

EXCEPTIONS

too_many_receivers = 1

document_not_sent = 2

operation_no_authorization = 4

OTHERS = 99.

My address is not included in email variable above !

thx for help

8 REPLIES 8
Read only

Former Member
0 Likes
911

HEllo,

Check the table LOOP AT <b>recivers</b> has your email Id.

Vasanth

Read only

0 Likes
911

no ,it doesnt

Read only

Former Member
0 Likes
911

Hi,

First of all try and debug the program and see where does the Receivers list gets generated and whether it contans the sender's name at the first place or at which point the sender's address gets generated and resolve the issue.

I cannot say as of now where the problem could be but I do have a workaround to your problem and that is at the statment Loop at Receivers,put a condition in there which checks if any of the entries in the Receivers list is equal to sy-uname or the email address of the sender,it should be deleted from the internal table.

In this way,in your case, each time the receivers list is prepared,the sender's email address would be removed from it and hence,no email sent to the sender.

In case you have any further clarifications,do let me know.

Regards,

Puneet Jhari.

Read only

0 Likes
911

I found that the additional copy is sending to sender email specified in table adr6 (smtp_addr field) Does anybody know transaction to change this entry ? I change 'internet-email' on communication frame in su01 but its not affected to adr6-stm_addr. Is there any other transaction for address assigment ?

Read only

Former Member
0 Likes
911

Hi,

Try changing the email address in the T-code FK01 or FK02 as these are the values that get stored in ADR6 table.

In case you have any further clarifications,do let me know.

Regards,

Puneet Jhari.

Read only

0 Likes
911

I dont know how to assign address to user using this transaction 😕 can You help me ?

thx

Read only

Former Member
0 Likes
911

Hi MK,

Whoever the users are in your system,they must be attached to some Vendor and some Company Code.

So,what needs to be done is that first try it with only one user.Find out the vendor and the Company Code he is attached to and you can the help of your Functional guy for this.

Go to T-code FK02 and enter the details as above and select all the checkboxes and press Enter.

On the first screen itself,you will have the field called "E-mail".If there is some data in there,either delete it or modify it and then try sending the mail again from the application.

Also, since the number of users could be large,you can develop a BDC report where you can either delete or modify the E-mail addresses of the users.

In case you have any further clarifications,do let me know.

Regards,

Puneet Jhari.

Read only

Former Member
0 Likes
911

Hi, the problem could be SAP mailer. Check the settings. (Our SAP mailer sends copy of email to sender too.

FM