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

[SAPscript] Mail sent tio wrong receiver

Former Member
0 Likes
754

Hi @all,

I have a problem with sending mails (Order confirmation, offers).

When the user sends a mail, sometimes it happens, that the mail appears twice in SOST. One mail to correct receiver, one mail to wrong receiver. The wrong receiver is always the receiver from the previous mail.

I can“t follow this problem, because it orrurs just sporadically.

Has anybody an Idea? Is this problem known to somebody?

Thank you,

Best regards.

1 ACCEPTED SOLUTION
Read only

former_member188827
Active Contributor
0 Likes
715

Which FM or class are you using?Make sure to clear receiver variable before fetching new receiver.

Regards

5 REPLIES 5
Read only

former_member188827
Active Contributor
0 Likes
716

Which FM or class are you using?Make sure to clear receiver variable before fetching new receiver.

Regards

Read only

0 Likes
715

Thank you, I switched from FM 'SO_OBJECT_SEND' to cl_bcs.

And yes, I simple forgot a CLEAR at the beginning.

Best regards

Robert

Read only

Former Member
0 Likes
715

Can you reasonably say that your from should never be in your to list?

Neal

Read only

arindam_m
Active Contributor
0 Likes
715

Hi,

May be check the code where the code populate's the mail ID in the recievers list may be a CLEAR is missing causing the last value to still remain. Few more details would also help us to analyze it better.

Cheers,

arindam

Read only

raviahuja
Contributor
0 Likes
715

Hi,

It looks like an issue of variable/structure clearing. Some variable/structure is not getting cleared before the new email id is inserted.

Regards,

Ravi