cancel
Showing results for 
Search instead for 
Did you mean: 

PO to multiple Email addresses/Mail group

Former Member
0 Kudos

Hi,

We have a requirement in wherein the PO is to be sent to multiple email addresses of the vendor. In the vendor master there is an option of putting in multiple email addresses but only one can be made as standard communication (radio button) i.e. PO will be mailed to the email address where standard radio button is checked.

Kindly throw some light on how the PO can be sent to multiple Email addresses of the same vendor.

Regards,

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi. I actually just found a better way without updating any tables.

Copy the standard print program and before function 'ME_PRINT_PO' is called change L_NAST-NACHA to 1 and clear L_NAST-DIMME.

This will then create a spool instead of an e-mail.

After ME_PRINT_PO is run make sure ENT_RETCO = 0, that means the spool created, then you can get the spool number from SY-MSGV1 or by selecting it from table NAST.

Then call function CONVERT_OTFSPOOLJOB_2_PDF using the spool ID, that converts the spool to PDF, then change the linesize with function SX_TABLE_LINE_WIDTH_CHANGE, then call SO_NEW_DOCUMENT_SEND_API1 using whatever recipients you want.

You can use this to send 1 mail to multiple recipients, or loop round to send many mails. You can also CC or BCC using this.

You could even use SO_DOCUMENT_SEND_API1 instead, and use the packlist to send the PDF and also send some text, that way the body of the e-mail can have whatever text you want as well as sending the PO as a PDF attachment. With this function as well you can choose the sending e-mail address to be different to the user that is mailing the PO.

Regards,

Dave.

Edited by: David Barber on Jul 17, 2009 10:51 AM - Added detail about the sending e-mail address

Former Member
0 Kudos

Hi. I have a solution for this without using mail groups, but it depends on your thoughts on using ABAP to update standard tables.

What I did was copy the standard print program, and in the sub routine ENTRY_NEU, I put a loop around function ME_PRINT_PO.

In this loop I go through all the different e-mail addresses that can be selected from the vendor master or anywhere else you want, and modify ADR6 where the address number = L_DOC-XEKKO-ADRNR.

When ME_PRINT_PO is called it sends the mail to the address in ADR6. It sends any number of mails based on how many times it loops.

Then, after the loop, I modify ADR6 back to how it started.

At the end, ADR6 is exactly the same as when it started, but we get multiple mails to as many e-mail addresses as we want. We can also modify the title of the mail by changing the structure L_NAST before calling ME_PRINT_PO.

Regards,

Dave.

Former Member
0 Kudos

hi david,

by dis enhancement r u going to get the output in pdf and how external mail will be pushed without using so_document_send _api fm  pls throw some light on this..

regards,

chandu

...

Former Member
0 Kudos

Hi,

I have learnt that there are 2 ways to send mail to multiple recipients. 1- Get mail administrator to create a global distribution list that I can maintain, and specify this address for the mail in sap. 2- Get my unix adminstrator to put an entry in the "aliases" file in unix. Use the find command to locate this file in your particular version of unix. He makes an entry like "fred" and enters multiple mail addresses. In sap I use fred@MACHINE_NAME as the mail address, where MACHINE_NAME is the name of the unix box.

(Get your main admin to set up a mail group with a 'group' name and populated with the multiple mail addresses, and assign this in the vendor.

Means that you mail from SAP to your internal mail system which then mails to the internet)

Open the below link.It may help you.

http://www.sapfans.com/forums/viewtopic.php?f=6&t=309773

Thanks,

Swapnil