Use business transaction events in conjunction with SAPconnect to manage automated email communication initiated by various processes. See configuration steps and development during the automatic payment run (transaction code F110).
Key Concept
Business transaction events (BTE), also known as open FI interfaces, are more generic than enhancement project-based user exits and are of similar use to the end user. SAP predefines the events for these user exits and delivers sample function modules to assist users in developing their own code. Users then assign the customer function modules to the events in customizing. A typical day in an organization’s Accounts Payable (AP) department includes a lot of inefficient activity. Whether it’s fielding vendors’ phone calls about unsettled payments, printing out payment advices in the SAP system and physically mailing them, or handling reprint or resend requests for payment advices, many of these actions consume employees’ time without adding any value to the organization.
The SAPconnect service, a remote function call (RFC) interface that enables connection between the SAP system and devices such as fax machines and printers, helps solve this problem. It can automatically send out emails based on the status of different processes to keep work flowing and communication operating correctly. I explain business transaction event (BTE) functionality and then describe how some simple configuration steps and development with BTEs allow you to send payment advices through email during the payment run, which saves you both time and effort. I composed my example on a mySAP ERP 2004 system, but it works on R/3 4.6C systems with Support Package 21 and SAP ERP Central Component (ECC) 6.0 systems as well.
Overview of BTE Functionality
BTEs only work with payment methods using the Payment Medium Workbench (PMW). You execute the automatic payment run transaction for payment methods using PMW. The system automatically generates the payment advice for each vendor as a PDF and sends an email to the vendor email ID. I use BTEs to provide:
- Derivation of the vendor email ID. This isn’t always needed, but I’ll assume it is in my example. Primarily email IDs are stored in the vendor master, but sometimes these email IDs pertain to the sales group at the vendor. Because payment advices are meant for a different audience, you may have to derive them from a different place.
- A file name for the generated PDF file
To send the payment advices through email, you have to use two BTEs to address the vendor email ID and file name data listed above. Both of these belong to the process interfaces. You configure the BTEs by copying the standard function modules provided by SAP in the customer name space and then assigning these to the predefined SAP events. I use two BTEs:
- 00002040: Finds the vendor email from the vendor master (standard function). You can also use this if you want to determine a different email ID for the vendor.
- 00002050: Changes the file name for the PDF file generated
Now I show you a five-step process to automate emails using BTEs. These five steps are:
- Create function modules
- Assign these function modules to the events in the SAP system
- Maintain the form (SAPscript) that you’ll use to create the payment advice
- Set up the variant for program RFFOAVIS_FPAYM
- Set up the SAPconnect service if it is not set up
Step 1. Create function modules. Use transaction code FIBF or follow IMG menu path Financial Accounting>Financial Accounting Global Settings>Business Transaction Events. Then follow Environment>Infosystem(Processes) (Figure 1).

Figure 1
BTE screen
Figure 2

Figure 2
BTEs for process interfaces
To customize the file, click 00002050 in the screen shown in Figure 2 and then click the Sample function module button to go to transaction code SE37 with function module SAMPLE_PROCESS_00002050. Copy the function module in the customer name space and save it. The field TDTITLE in structure ITCPO carries the file name. You can create your own file names using various fields from the structures available in this function module. You can see some sample code in Figure 3.

Figure 3
Sample code for file name
Step 2. Assign these function modules to the events in the SAP system.Figure 4
Figure 4
Assign the function modules
Figure 5

Figure 5
Step 2 in assigning the function modules
Step 3. Maintain the form (SAPscript) that you’ll use to create the payment advice.Figure 6
Figure 6
Form assignment
Step 4. Set up the variant for program RFFOAVIS_FPAYM.
Step 5. Set up the SAPconnect service for your client if it is not set up. Now you are ready to use this functionality. Figure 7 shows a sample email received from SAPconnect.

Figure 7
Email with payment advice attachment
Notice the PDF file name, which is derived based on the coding shown in Figure 3. The payment advice PDF file generated with the SAPscript F110_US_AVIS appears as shown in Figure 8.

Figure 8
Payment advice
Note
The sender email ID in this functionality is that of the user executing the automatic payment run (transaction F110). If you want to specify a unique sender email ID, follow the instructions in SAP Note 989043.
Vishal S. Thakur
Vishal S. Thakur has more than 10 years of experience in finance and accounting including management assurance services. He has served as a FI/CO configurator and solution architect in consulting firms for more than five years. He specialized in FI-G/L, AR, AP, AA, and EC-PCA. He has in-depth knowledge of Report Painter and ABAP Query reporting tools. He also has extensive experience working with SAP enhancements. For the past three years he has been serving as a FI/CO business analyst for TriQuint Semiconductor Inc. You may reach him via email at vthakur@tqs.com.
You may contact the author at vishalsthakur@sapficoexpert.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.