cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically generate an email per invoice containing a copy of the invoic

Former Member
0 Kudos

hi

i am working on a requirement, where i have to trigger EMAIL when saving an INVOICE via VF01/VF02.

My requirement is to convert the sap script to PDF and send that to finance processing centre via email. this should happen for new invoice creation and for changed invoice.

I have done the configuration in NACE for billing document type V3.

i would like to understand the following things

1) should there be any code to be written when saving INVOICE?

2) or does it workout if we configure in NACE AND VV31?

3) if in the ocnfiguration i mention as PDF output type will the form get converted into PDF type?or should there be coding be done to convert it?

4)where do i put the email id of the person whom this form has to go?

5) should i make a Zcopy of script and print program?

searched before posting the query but couldnt get more understanding as email has to trigger when saving INVOICE.i know sending email when selecting output options.

regards

Moorthy

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

If you have to send mail at the time of Creation or updation of invaoices , then you have to find appropriate Use exit to send mail.

Just call you Sap Script in the exit then convert your sap script to PDF format .

Finally using function module (CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1') you can send the mail to appropriate person . Also you can pass mail id in the function module under tables " Receivers " .

Thanks....

Former Member
0 Kudos

hi

can u let me know how can i call a script inside a exit?if i call function module open_form will that work?

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

Yes , in my opinion you can call SAP Script in User Exit through open_form & Close_form . My only concern is , if the script gives some error then this may or may not affect the saving of you Invoice thus created .

Please make sure to handle this scenerio .

Thanks ....

Former Member
0 Kudos

in nace, select V3-> then click output types -> select the output type -> double click on processing routine-> select external send and make the entries for the driver program and the script.

Former Member
0 Kudos

hi

the configuration mentioned by you works when i have to trigger INVOICE from output options.

But here i have to trigger invoice when i creation/updation is done.let me know in the enhancement point for the program SAPMV60A how should i call the form.