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: 

Send 2 or more emails from 1 PO

Former Member
0 Kudos

Hi Friends,

I want to send 2 or more emails to vendor for different email addresses from one PO (this should be applicable to ME21N, ME22N or ME21, ME22). The standard PO program is sending only one email. In XK02, vendor is maintained with different email addresses. I researched forums but I couldn't find a clue on how to achieve this. Can some one please guide me to do this? Is there any sample code for achieving this? How is this possible for a SAP Script form?

Please help.

Thank you.

5 REPLIES 5

Former Member
0 Kudos

I don't have SAP logistics modules installed, so I can't test this.  But, what I would do would be to look at the output program that creates the email.  If there is a subroutine where the receiver is created, I would activate an implicit enhancement (if possible) and add code to obtain and append more receiver rows (obtained from ADR6??) to the receiver table (I assume that it's all one vendor, with different email addresses?). 

If you cannot enhance the SAP standard, create your own output driver program, and handle as needed (loop and send email with different receiver as many times as needed).

Former Member
0 Kudos

You could create a Z program from SAPFM06P, check the data inside the form "entry_neu" and if it's possible to add one more email address there. And assign the Z program to message output using tcode NACE.

Regards,
Felipe

madhu_vadlamani
Active Contributor
0 Kudos

Hi Mani,

In standard it is not possible.You need to develop a custom one.There is a good discussion on this thread just go through this.

Regards,

Madhu.

0 Kudos

Thanks Break Point, Felipe and Madhu for the replies posted. But, I am not able to debug the print program SAPFM06P, just to see how SAP has written the code in debug mode. Can anyone suggest me how to debug this print program? or is there any other way I can achive my scenario?

Is this scenario achieved by Njoy transactions like ME21N and ME22N? or only achieved by ME21 and ME22?

Any help is really appreciated.

Thanks.

0 Kudos

Why are you not able? have you set the breakpoint and it was not achieved? go to tcode NACE and check if the print program is not a custom development.

Yes the scenario is the same for enjoy transactions.