cancel
Showing results for 
Search instead for 
Did you mean: 

Configuration email to one specific email adress in sales order processing

Former Member
0 Kudos

Hi,

I have searched the forums but I can not get a good overview how I can achieve the following:

For a specific sales order type, I have defined an output type. This output type was normally used to print.

Now the business wants to email this output type to ONE specific emailaddress. This is in fact, an external vendor.

I know and use the option to add contact persons to customers to be able to use the 5. External send function to be able to email the output as an attachment to the emailaddress specified in the contact person. This works.

But I do not want to maintain for all customers (and newly created customers) a contact person for this purpose. I just want to mail the output to one email address.

Now I have looked at the 7. Simple mail function in SAP.

According to the settings and I believe the functionality, this is only to mail a plain text to a receipient. No attachment.

In customizing I have set up 7. Simple mail with RSNASTS0 / SAPOFFICE_AUFRUF_VX / My own form. This results in an empty attachment because the form (sapscript) is depending on the print program. The print program for my print is an own developed program. This program has the Form ENTRY, but does not include the SAPOFFICE_AUFRUF_VX.

I have tried to add for example the VN partner in the output customizing and add in the condition record a partner number which has an email address. Then I get messages in the processing that address nr. is not maintained. Partner function VN is not available in the order and is also not the right way because then we have to maintain the partner function in the customer master.

So I am looking for a possibility to mail this to a specific mailaddress (ideally to more than 1 address, that's why I tried 7. Simple mail because you can enter more addresses or a distribution list).

Looking forward to your suggestions. Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Jelena
Active Contributor
0 Kudos

I'm not familiar with Simple Mail, but I suspect it won't help in this case anyway. You can use '5. External Send' with a special partner type. Partner does not have to be maintained in the customer master (it needs to be added in determination procedure though). It could be added in a user exit or manually. Although I don't think it's possible to send an email to an SAP distribution list like that. If it's an externally maintained distribution list that has its own email address then it's not a problem.

But if you already have a custom output processing program, why not just create a new output type and then add some code there based on that output type?

Answers (1)

Answers (1)

Former Member
0 Kudos

I have been working for another solution. And I am now possible to send a mail with attachment for one email address.

I have created a new partner function ZZ for sales document header. I linked partnerfunction to KU (customer).

I created a new customer number and there I  maintained an email address,

For the output type, I have added the same processing routines, forms etc for 5 - External Send.

I created the output condition record with my new partner function (ZZ) and linked to the newly created customer.

Now in standard SAP behaviour the processing routine of the output is expecting a link between customer master and the partner function you have maintained. But there is no link because I do not want to maintain the same partner function to all customers.

In the print program there is a part :

* fill address key --> neccesary for emails

It will fill ADDR_KEY with VBDKA-ADRNR etc.

Because of the missing link, the VBDKA-ADRNR is empty.

I just added in that piece of the code a extra selection on NAST-PARNR = 'ZZ', then I retrieve the ADRNR from KNA1 with NAST-PARNR.

Then I fill the newly retrieved ADRNR in ADDR_KEY-ADDRNUMBER.

This should do the trick for now.