Before writing this blog, I came across so many posts and a lot of scattered information on this topic that I thought it might be beneficial to write a blog that contains this information in one place.
Requirement was to generate automatic payment advice when a payment is saved via F110 and email a sapscript form as a PDF attachment along with the mail body in the desired language. This can be easily implemented via BTE 00002040. Refer to SAP Note 836169 for more details.
I have listed all the steps below. Please note it is very important that the following customization is done. In our system this was with the default setting and the payment advice email was not getting generated.
Select company code and Payment Method I.
Steps to program the changes –
- FIBF Settings
- Maintain the new Function module in FIBF->Settings->Process Modules->of a customer.
- Maintain Email Body in S010:Create your text with email body for Text ID FIKO using transaction SO10. Transport the text using report RSTXTRAN.Refer to SAP Note 1033893
- Function module changes: Copy FM SAMPLE_PROCESS_00002040 and make the changes below to send the email.REGUH-ZADNR contains the Payee’s Address Number. You may use FM ‘ADDR_GET_COMPLETE’ to get the actual email address of the vendor maintained or directly from table LFB1, depending on your specific requirement.Set c_finaa-formc with the actual form name.
- Once these changes are implemented required emails should be sent out to the intended recipients, you can check this in transaction SOST. Set c_finaa-mail_body_text with the name of the standard text with the mail body. Set c_finaa-intad with the email address details.