# Customer Account Statement and Balance Confirmation Email Program

> A custom program that prepares a customer account statement as PDF, with opening balance, period movements, open items and closing balance, and sends it in bulk to each customer's accounting email address. It lists the sending result for every customer.

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


## Why is the standard not enough?

FD10N shows balances on screen and FBL5N lists items; neither produces a statement to send to the customer. The standard balance confirmation programs are designed to print letters and do not send a PDF by email to the customer's accounting contact with a sending result per customer. Statements are therefore often prepared in Excel and sent one by one.

### Closest standard alternatives

- FD10N: Shows customer balances on screen; does not produce or send a statement.
- FBL5N: Lists items; does not prepare a statement in a form to send to the customer.

## Tables used

| Table | Role | Access | Join | System |
|---|---|---|---|---|
| BSID | Customer items posted in the period and open at period end | Read | - | ECC + S/4 |
| BSAD | Items posted in the period and already cleared | Read | BSAD-BUKRS = BSID-BUKRS AND BSAD-KUNNR = BSID-KUNNR | ECC + S/4 |
| KNA1 | Customer name and address number | Read | KNA1-KUNNR = BSID-KUNNR | ECC + S/4 |
| KNB1 | Accounting contact email and accounting clerk | Read | KNB1-KUNNR = BSID-KUNNR AND KNB1-BUKRS = BSID-BUKRS | ECC + S/4 |
| ADR6 | Email address in the customer address | Read | ADR6-ADDRNUMBER = KNA1-ADRNR | ECC + S/4 |
| T001 | Company code name and currency | Read | T001-BUKRS = BSID-BUKRS | ECC + S/4 |

## BAPIs and functions used

- BAPI_AR_ACC_GETKEYDATEBALANCE: Returns the customer balance at a key date (opening and closing)
- SO_NEW_DOCUMENT_ATT_SEND_API1: Sends the statement by email as a PDF attachment

## Selection screen parameters

| Parameter | Description | Type | Reference field | Required |
|---|---|---|---|---|
| S_BUKRS | Company code | Range / multiple | BSID-BUKRS | Yes |
| S_KUNNR | Customer | Range / multiple | BSID-KUNNR | No |
| S_BUSAB | Accounting clerk | Range / multiple | KNB1-BUSAB | No |
| P_FROM | Period start | Single value | BSAD-BUDAT | Yes |
| P_TO | Period end (balance date) | Single value | BSID-BUDAT | Yes |
| P_TEST | Test mode (preview only, no sending) | Checkbox | - | No |
| P_CC | Send a copy to the accounting clerk | Checkbox | - | No |
| P_NZERO | Skip customers without balance and movements | Checkbox | - | No |

## Result list columns

| Column | Source |
|---|---|
| Company code | BSID-BUKRS |
| Customer | BSID-KUNNR |
| Customer name | KNA1-NAME1 |
| Email | ADR6-SMTP_ADDR |
| Opening balance | Calculated: BAPI_AR_ACC_GETKEYDATEBALANCE result as of P_FROM − 1 day |
| Closing balance | Calculated: BAPI_AR_ACC_GETKEYDATEBALANCE result as of P_TO |
| Currency | T001-WAERS |
| Status | Calculated: Sent, previewed, skipped or error |
| Message | Calculated: Return message of the send function or reason for skipping |

## How does the program work?

1. For the selected customers, the opening balance (one day before P_FROM) and closing balance (P_TO) are taken with BAPI_AR_ACC_GETKEYDATEBALANCE. With P_NZERO, customers without balance and movements are skipped.
2. Items posted in the period are read from open (BSID) and cleared (BSAD) items, and a running balance is calculated in document-date order. Items open at P_TO are shown in a separate section with their due dates.
3. The form (Smart Forms or Adobe Forms) is filled with the company name (T001-BUTXT), customer data, movements, open items and a balance confirmation text, and converted to PDF.
4. The recipient comes first from the customer's accounting contact address in the company code (KNB1-INTAD), otherwise from the default email in ADR6 through KNA1-ADRNR. Without an address the customer is listed as "Skipped".
5. In test mode a PDF preview is shown and no email is sent. In a real run the PDF is sent as an attachment with SO_NEW_DOCUMENT_ATT_SEND_API1; with P_CC the accounting clerk receives a copy. The result and message are listed for every customer.

## Authorization objects

- F_KNA1_BUK: Customer master authorization by company code
- F_BKPF_BUK: Accounting document display authorization by company code
- S_OC_SEND: Authorization to send external email from SAP

## Frequently asked questions

### In which language is the statement prepared?

The form is prepared in the customer's communication language; Turkish and English texts come as standard. Other languages can be added by translating the form texts.

### How is the customer's confirmation received?

The reply-to address of the email is set to the accounting clerk or a shared accounting mailbox; the customer sends approval or objection there. Sent emails can also be tracked in SAP's send queue.

### Can it be used for vendors as well?

Yes. The same structure can be adapted to vendors with BSIK/BSAK and the vendor balance BAPI; the adaptation adds about 2 days to the effort range.

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