# Vendor Payment Advice Email Program

> A custom program that, after an automatic payment run, emails every vendor a PDF payment advice listing the invoices that were paid. A preview comes first, and the sending result is logged per vendor.

- Type: Program, Custom development, Form
- Module: FI
- Estimated effort: M (4–7 working days)
- Last updated: 2026-11-17
- URL: https://nekuhub.com/en/programs/vendor-payment-advice-email-program/


## Why is the standard not enough?

F110 produces the payment advice through printing or standard output management; the advice form, the choice of the recipient email address and bulk sending as PDF have to be set up per company. Several email addresses, copy recipients and a resend check are not part of the standard flow. To cut vendor queries, an automatic email on the payment day is needed.

### Closest standard alternatives

- F110: Produces the payment advice through printing or output management; no email address logic or resend check.
- FBL1N: Shows paid items on screen; sends no notification to the vendor.

## Tables used

| Table | Role | Access | Join | System |
|---|---|---|---|---|
| REGUH | Payment document, payee, payment amount and currency (driving table) | Read | - | ECC + S/4 |
| REGUP | Paid invoices, reference and cash discount | Read | REGUP-LAUFD = REGUH-LAUFD AND REGUP-LAUFI = REGUH-LAUFI AND REGUP-XVORL = REGUH-XVORL AND REGUP-ZBUKR = REGUH-ZBUKR AND REGUP-LIFNR = REGUH-LIFNR AND REGUP-VBLNR = REGUH-VBLNR | ECC + S/4 |
| LFB1 | Accounting email address in the company code | Read | LFB1-LIFNR = REGUH-LIFNR AND LFB1-BUKRS = REGUH-ZBUKR | ECC + S/4 |
| LFA1 | Vendor address number | Read | LFA1-LIFNR = REGUH-LIFNR | ECC + S/4 |
| ADR6 | Default email in the vendor address | Read | ADR6-ADDRNUMBER = LFA1-ADRNR AND ADR6-FLGDEFAULT = 'X' | ECC + S/4 |

## BAPIs and functions used

- SO_NEW_DOCUMENT_ATT_SEND_API1: Sends the payment advice by email as a PDF attachment

## Selection screen parameters

| Parameter | Description | Type | Reference field | Required |
|---|---|---|---|---|
| P_LAUFD | Run date | Single value | REGUH-LAUFD | Yes |
| P_LAUFI | Run identification | Single value | REGUH-LAUFI | Yes |
| S_ZBUKR | Paying company code | Range / multiple | REGUH-ZBUKR | No |
| S_LIFNR | Vendor | Range / multiple | REGUH-LIFNR | No |
| P_CC | Copy recipient email | Single value | - | No |
| P_TEST | Test mode (preview only) | Checkbox | - | No |
| P_RESEND | Resend advices already sent | Checkbox | - | No |

## Result list columns

| Column | Source |
|---|---|
| Vendor | REGUH-LIFNR |
| Vendor name | REGUH-NAME1 |
| Payment document | REGUH-VBLNR |
| Payment amount | REGUH-RBETR |
| Currency | REGUH-WAERS |
| Invoice count | Calculated: Number of REGUP rows for the payment document |
| Email | ADR6-SMTP_ADDR |
| Status | Calculated: Sent, preview, no address or error |
| Message | Calculated: Return message of the send function |

## How does the program work?

1. The actual payment records of the selected run are read: REGUH with XVORL blank and the payment document (VBLNR) filled.
2. For every payment document the paid invoices come from REGUP: reference (XBLNR), document date, gross amount, cash discount (SKNTO) and net payment.
3. The recipient address is determined: first LFB1-INTAD (accounting email in the company code), otherwise the default email of the vendor address (LFA1-ADRNR → ADR6-SMTP_ADDR, FLGDEFAULT).
4. The advice form (Smart Form or Adobe Form) is converted to PDF; in test mode only a preview is shown.
5. In a real run the PDF is sent as an attachment with SO_NEW_DOCUMENT_ATT_SEND_API1; vendors without an address and errors are listed in the log, and unless P_RESEND is set, payment documents already sent are skipped.

## Authorization objects

- F_REGU_BUK: Access to payment program data by company code
- F_LFA1_BUK: Vendor master authorization by company code
- S_OC_SEND: Authorization to send external email from SAP

## Frequently asked questions

### Can one vendor receive it at several addresses?

Yes. All emails in the address or only the default one can be chosen; P_CC adds a fixed copy recipient to every email.

### Can the advice layout be changed?

The form is designed per company: logo, bank details, invoice reference and deduction lines can be added. The Turkish or English version is chosen by the vendor's language.

### Can the same advice be sent twice?

Sent payment documents are logged and skipped in the next run. If the vendor asks again, it is resent with P_RESEND.

---
Let us build this program for your system: https://nekuhub.com/en/request-a-quote/?report=fi-vendor-payment-advice-email
