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: 

Automatically Send email after Creating Sales Order from VA01

Former Member
0 Kudos
7,497

Hi All,

I have one development to be done.

Once we create a Sales Order for any order no. using VA01,

after completion of creating sales order when clicked on save, an email notification along with sales order number about that order creation mail has to be send to customer.....

We have configured outgoing MAIL successfully and Outgoing Mails from SAP ECC 6.0  to external email ID (abc@xyzcompany.com) our company ID are going successfully.

So please help me with this...?

Regards,

Atul

1 ACCEPTED SOLUTION

former_member200345
Contributor
0 Kudos
1,913

Hi, Your requirement can be fulfilled by configuring an output type which needs to be triggered while creating a sales order.

The output type has to be configured using the tcode NACE. You need to build the logic to trigger mail to the customer in the driver program. Please check the below link for more details on how to send mail.

http://wiki.sdn.sap.com/wiki/display/Snippets/Send+mail+via+SAP+ABAP+Code

22 REPLIES 22

former_member200345
Contributor
0 Kudos
1,914

Hi, Your requirement can be fulfilled by configuring an output type which needs to be triggered while creating a sales order.

The output type has to be configured using the tcode NACE. You need to build the logic to trigger mail to the customer in the driver program. Please check the below link for more details on how to send mail.

http://wiki.sdn.sap.com/wiki/display/Snippets/Send+mail+via+SAP+ABAP+Code

0 Kudos
1,913

Hi vijaymadhur papabathini,

Thanks for ur support....

I tried ur given logic and its really nice;

But i am expecting this as Trigger which gets executed on creation of sales order.

I also went to NACE and im attaching my NACE configs (V1 Sales-> BA00 order confirmation)

and

as u told about " logic to trigger mail to the customer in the driver program"---- should i use driver program 'RVADOR01' and make desire changes in 'ZRVADOR01'....

Im too confused,.......... Please help.....

Thanks,

Atul

0 Kudos
1,913

Hi Atul,

Instead of modifying standard code 'RVADOR01' , You can add your code inside Include MV45AFZZ under USEREXIT_SAVE_DOCUMENT . This exit will be invoked each time when you create or change sales order.

0 Kudos
1,913

Hi Sachin,

Feels great to meet U again..... New task-Fresh Start..!!!!

Do I have to create a New ENHANCEMENT under USEREXIT_SAVE_DOCUMENT in MV45AFZZ.

and paste code provided by vijaymadhur papabathini.?

Please help..!!

Regards,

Atul

0 Kudos
1,913

Hi Atul,

No need to create New Enhancement.

Just add code for triggering mail in USEREXIT_SAVE_DOCUMENT

0 Kudos
1,913

Hi Atul,

Are you sending smartform or something else.

Regards,

Madhu.

0 Kudos
1,913

Hi Sachin,

Thanks mate...

I tried with ENHANCEMENT... it works.....

My SD functional consultant checked it and after complete SALES ORDER creation cycle it works...

I got Mail on my Company ID...

Thanks Buddy,,,,,,

Regards,

Atul.

0 Kudos
1,913

Hi Vijaymadhur,

Thanks a Lot for ur support...............

Regards,

Atul

0 Kudos
1,913

Hi Sachin,


Any suggestions How can i bring Newly Created Sales Order in this outgoing MAIL....???

Reagards,

Atul

0 Kudos
1,913

Hi Madhu,

No i am not sending any Smartform thru NACE....

Im using standard SAPscript as converted to ZRVORDER01.

I have made tremendous developments in this ZRVORDER01 script.

So i have to use this.

And between,  Can I send newly created SALES ORDER to Outgoing Mail...

Reagrds,

Atul

0 Kudos
1,913

Yes you can.

Regards,

Madhu.

0 Kudos
1,913

Hi Madhu,

Can u help me out with this process for attach a newly created salesorder as attachment with mail...

Wats the process..???

I am confused and Blank...??

DO we need to create a WORKFLOW for the same and later attach newly created Workflow on SPRO....??

Regards,

Atul.

0 Kudos
1,913

Hi,

Did you check the standard form for so,all the details are there in that standard report.I am not sure whether you can use that for script also.

Regards,

Madhu.

0 Kudos
1,913

Hi Atul,

I am not able to find the code. Could you please past it here for me.

Thanks,

Ashok.

nageshwar_reddy
Contributor
0 Kudos
1,913

You can also achieve this requirement using the user exit MV45AFZZ / USEREXIT_SAVE_DOCUMENT.

You can refer to the wiki Vijaymadhur has given above to prepare and send Email.

former_member213851
Active Contributor
0 Kudos
1,913

Hi Atul,

For sending mail , use FM  SO_DOCUMENT_SEND_API1  or cl_document_bcs.

You can add your code inside Include MV45AFZZ.

madhu_vadlamani
Active Contributor
0 Kudos
1,913

Hi Atul,

Once you configured access sequence and mail out put mail will go automatically to customer which is  maintained.If you are planning to send out put to customer there is no need of any custom things.You can use the standard form and driver program which is enough.Ask your basis  people to configure the scot .

Regards,

Madhu.

0 Kudos
1,913

Hi,

How you did that.

Regards,

Madhu.

Former Member
0 Kudos
1,913

Dear SAP experts,

How can we attach a newly created Sales Order to the Mail (sending SO as an attachment) and send to a user (abc@xyzcompany.com).

Currently we are able to send only mail which gets triggered on clicking on SAVE button.

Now i need to attach Sales Order (if possible PDF format) with Mail.

Please Help.

Regards,

Atul

0 Kudos
1,913

Search user exits and write code to send email using function module SO_NEW_DOCUMENT_ATT_SEND_API1.

Regards,

Shailesh

Former Member
0 Kudos
1,913

Hi Atul

can you please let us know the configurations to be done for sending Outgoing Mails from SAP ECC 6.0  to external email ID 

Regards

Vijay

0 Kudos
1,913

Hi Vijay,

For Mail Configuration .. Please contact ur BASIS consultant..

else u can refer this Link on SMTP configuration.

http://help.sap.com/saphelp_nw04/helpdata/en/af/73563c1e734f0fe10000000a114084/content.htm

After Configuring SMTP..

Follow this to test thru SCOT:

1)SCOT- >Routing test-->Enter the recepient address and recepient type(eg:-INT).

Then click on ROUTES-->explain.

It should give three green colour icons.

2)Make sure the e-mail address is added to the user sending the e-mail in SU01.

3)You can send a message via System Status-->short message (or SO01).

4)You can view status of the message using the tcode SOST.