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: 

CCing another persons while sending mail to external world

Former Member
0 Kudos
223

Hi I am facing problem while marking a CC to other persons during sending mail to external world.

I am trying with the following logic.

itab_reclist-receiver = 'abc@yahoo.com'.

itab_reclist-adr_type = 'U'.

itab_reclist-adr_flg = ''.

APPEND itab_reclist.

itab_reclist-receiver = 'pqr@yahoo.com'.

itab_reclist-adr_type = 'U'.

itab_reclist-adr_flg = 'C'.

APPEND itab_reclist.

itab_reclist-receiver = 'lmn@yahoo.com'.

itab_reclist-adr_type = 'U'.

itab_reclist-adr_flg = 'C'.

APPEND itab_reclist.

This values will in turn be passed to fun module ZSENDEMAIL, and over there it will resolve adr_flag = 'c' as copy functionality.

But as a result all these three receipients received same mail thrice instead of one single mail.

Also can you let me know the use of EXPRESS field while sending a mail??

can you please help me out for the same?

Thanks i Advance

Jigar

3 REPLIES 3

Former Member
0 Kudos
101

Also can you let me know the use of EXPRESS field while sending a mail??

if you see the function module SO_NEW_DOCUMENT_ATT_SEND_API1 documentation,

EXPRESS :

If this flag is activated ('X'), the document is sent with the attribute 'express'. If the recipient is a logged-on SAPoffice user, he or she receives a message immediately, saying that he or she has received an express mail.

and if you want to put an ID in CC of the mail, in the RECEIVERS table of this function module,

there is field CC.

it_receivers-RECEIVER = 'abc@yahoo.com'.

it_receivers-rectyp = 'U'. <--U means :internet address

<b>it_receivers-COPY = 'X'.</b>

if you mention COPY = X then that id appears in CC column of that mail.

Regards

Srikanth

0 Kudos
101

Hi Srikanth,

Thanks a lot for your quick respose.

Srikanth, I have used the same logic.

i.e.

itab_reclist-adr_type = 'U'

for id abc@yahoo.com.

And:

itab_reclist-adr_type = 'U'

itab_reclist-adr_flg = 'C'.

for ids pqr@yahoo.com and lmn@yahoo.com.

Both these two persons are getting copied, but if i check in SAP(SOST) then i find three mails..each with same content...And also in receipient list of each mail i find names of all the three persons....

i.e. same mail is sent thrice to all these three persons..

can you please help me for the same?

Thanks in advance.

Jigar

0 Kudos
101

I think the problem might be with your ZSENDMAIL FM...where it must be loopint at itab_reclist and calling the FM thrice..A way to confirm is that if you test the same with only 1 person in cc than it should send out the email twice ...Can you please check on the same and let the forum know.

If that is the case, solution is to loop at itab-reclist only for adr_flg <> 'C'.