FI Program Custom development Form

Customer Account Statement and Balance Confirmation Email Program

Short answer: 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.

Estimated effort
M · 4–6 working days
System
ECC and S/4HANA
Tables
6
Scope
Global
Built by
NeKuDos Teknoloji
Last updated

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.

Who uses it? Accounts receivable and collections teams, accounting teams that run month-end and year-end balance confirmations.

Closest standard alternatives

  • FD10N Customer Balance Display. Shows customer balances on screen; does not produce or send a statement.
  • FBL5N Customer Line Items. Lists items; does not prepare a statement in a form to send to the customer.

Tables used

The tables the program reads and updates. ECC and S/4HANA differences are marked separately.

TableRoleAccessSystem
BSIDCustomer Open ItemsCustomer items posted in the period and open at period endReadECC + S/4
BSADCustomer Cleared ItemsItems posted in the period and already clearedReadECC + S/4
KNA1Customer Master (General Section)Customer name and address numberReadECC + S/4
KNB1Customer Master (Company Code)Accounting contact email and accounting clerkReadECC + S/4
ADR6E-Mail Addresses (Business Address Services)Email address in the customer addressReadECC + S/4
T001Company CodesCompany code name and currencyReadECC + S/4

S/4HANA notes

  • BSID → I_OperationalAcctgDocItem: In S/4HANA BSID is no longer filled as a separate index table; reads work through a compatibility view of the same name. For new developments the I_OperationalAcctgDocItem CDS view is recommended.
  • BSAD → I_OperationalAcctgDocItem: In S/4HANA BSAD is not filled as a separate table; it is read through a compatibility view of the same name. For new developments the I_OperationalAcctgDocItem CDS view is recommended.

BAPIs and functions used

  • BAPI_AR_ACC_GETKEYDATEBALANCECustomer Account Balance at Key Date. Returns the customer balance at a key date (opening and closing)
  • SO_NEW_DOCUMENT_ATT_SEND_API1SAPoffice: Send New Document with Attachments. Sends the statement by email as a PDF attachment

Selection screen parameters

ParameterDescriptionTypeReference fieldRequiredExample
S_BUKRSCompany codeRange / multipleBSID-BUKRSYes1000
S_KUNNRCustomerRange / multipleBSID-KUNNRNo200118
S_BUSABAccounting clerkRange / multipleKNB1-BUSABNoT1
P_FROMPeriod startSingle valueBSAD-BUDATYes01.10.2026
P_TOPeriod end (balance date)Single valueBSID-BUDATYes31.10.2026
P_TESTTest mode (preview only, no sending)Checkbox—NoX
P_CCSend a copy to the accounting clerkCheckbox—NoX
P_NZEROSkip customers without balance and movementsCheckbox—NoX

Result list columns

#ColumnSource
1Company codeBSID-BUKRS
2CustomerBSID-KUNNR
3Customer nameKNA1-NAME1
4EmailADR6-SMTP_ADDR
5Opening balanceCalculated BAPI_AR_ACC_GETKEYDATEBALANCE result as of P_FROM − 1 day
6Closing balanceCalculated BAPI_AR_ACC_GETKEYDATEBALANCE result as of P_TO
7CurrencyT001-WAERS
8StatusCalculated Sent, previewed, skipped or error
9MessageCalculated Return message of the send function or reason for skipping

Sample result list

Company codeCustomerCustomer nameEmailOpening balanceClosing balanceCurrencyStatusMessage
1000200118Bereket Tarım Ürünleri[email protected]312,400446,100TRYSentStatement sent as PDF
1000200245Kuzey Yapı Market[email protected]96,3200TRYSentStatement sent as PDF
1000200377Selin Kozmetik41,78041,780TRYSkippedNo email address in the customer master
A view built with fictional sample data; not real system data.

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.

Performance notes

Calling the balance BAPI per customer is fine for hundreds of customers; for thousands, calculate the balance from the BSID/BSAD read and send in a background job.

Features

  • Test mode (check without posting) Each customer's PDF can be previewed before sending.
  • Line-by-line result and error log
  • Runs as a background job Can run automatically on the first working day of each month for the previous month.
  • Send the result by email

Authorization objects

  • F_KNA1_BUKCustomer master authorization by company code
  • F_BKPF_BUKAccounting document display authorization by company code
  • S_OC_SENDAuthorization 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.

Packages that include this solution

FI Package Custom

Customer Receivables Collection Pack

A pack that brings together four solutions a collection team needs, with one customer and company code selection: receivables aging, the customer's …

4 components · v1.0

Related reports

FI Report Custom ALV report

Customer Payment Behavior and Days-to-Pay Report

A custom ALV report that uses customer invoices cleared in the selected period to calculate each customer's average days to pay, amount-weighted days …

BSAD · BKPF · BSID · KNA1

FI Report Custom ALV report

Customer Receivables Aging Report

A custom ALV report that ages customer open items by net due date and shows down payments received and other special G/L items in the same list. …

BSID · BSAD · KNA1 · KNB1

Let us build this program for your system

Briefly describe your system and expectations. We will clarify the scope and come back with an effort and price quote.

Related report: Customer Account Statement and Balance Confirmation Email Program