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 email after save VA01

Former Member
0 Kudos

Dear All,

I need to send order acknowledgment report in Email to the customer after saving order in VA01/VA02.

the process will be automatic and the order acknowledgment report is a Z report and developed in smartforms.

no mannual input is required and it will pick from the VA01/VA02.

at present we are sending to customers mannually but now requirement comes for automatic process.

pls suggest how to do.

Thanks

Radhashyam

1 ACCEPTED SOLUTION

former_member673464
Active Contributor
0 Kudos

Hi Sahoo,

We can send mail using the output configurations of sales order itself. In output you will have a medium external send options where the output will send as mail attachment to the customer. You can use this option for sending the acknowledgement for the same. Change the print program to your zprogram and smartform to your smartform name in NACE transaction.

regards,

Veeresh

10 REPLIES 10

Former Member
0 Kudos

Dear Radhashyam ,

This can be done with user exits. Please consult your ABAPER and find appropriate Exit and write a logic for sending mail there in the Exits.

Regards,

Nikhil

Former Member
0 Kudos

Hi,

you need to code the logic for sending the email in the exits avaialble for the VA01 and Va02 TCodes.

This can be done in the exit mentioned below.

You may use FORM USEREXIT_SAVE_DOCUMENT of include MV45AFZZ for the same.

Regards,

SuryaD.

0 Kudos

Hi all,

Thnaks for valuable suggestion.

I am an ABAPER and applied the exit FORM USEREXIT_SAVE_DOCUMENT of include MV45AFZZ , but this executes before commit of transaction. i need the exit/enhancement or any SPRO config which will fire after commit/complete save of data .

Thanks

Radhashyam

former_member673464
Active Contributor
0 Kudos

Hi Sahoo,

We can send mail using the output configurations of sales order itself. In output you will have a medium external send options where the output will send as mail attachment to the customer. You can use this option for sending the acknowledgement for the same. Change the print program to your zprogram and smartform to your smartform name in NACE transaction.

regards,

Veeresh

0 Kudos

Hi Veeresh,

Thanks.

in Tcode NACE i do the same as you suggest and it's working but in this, i have to exclusivly select the output type and press the email button. now i want the same process should be automated. when VA01/VA02 save it will automatically send email to the customer.

pls suggest

Thanks again

Radhashyam

Edited by: RadhaShyam Sahoo on Oct 28, 2009 5:45 AM

0 Kudos

Hi Radhashyam,

Once you have configured the output type and it works, you'll have to configure the corresponding condition records (transaction VV11 or via button Condition records from NACE). You just need to pick the right key settings for which the output should be triggered (I assume that you have configured access sequence and output procedure already along with the output type).

Best wishes, harald

0 Kudos

HI

Thanks.

as you advice, actually the problem was in access sequence and now it's execute automatically after saving inVA01/VA02.

but here the problem is that when i set in Tcode NACE -> Output Types-> Processing Routine->Medium to 5 (external send) for email it showing error 00 671: ABAP/4 processor: COMMIT_IN_POSTING. but when i set Transmission Medium to 1(Print output) it's working fine and generate print out automatically.

for information, the same setting is also maintained in condition records.

pls suggest

Thanks

Radhashyam.

Former Member
0 Kudos

Hi,

Check whether any commit statements are used in your Z report.

Comment the commit statement and check.

Regards,

Ginu

0 Kudos

hi

thanks to all.

now the problem is solved.

actually in FM SO_NEW_DOCUMENT_ATT_SEND_API1 in exporting parameter "commit_work = 'X'" is there. i omit this statement and it works fine.

again thanks to all.

Radhashyam