# Business Partner Save Checks for IBAN, Tax Number and Mandatory Fields

> A development that checks, when a customer or supplier business partner is saved, the consistency of IBAN and bank details, the country-specific format of the tax number and the company's mandatory fields. Incorrect or incomplete master data is stopped before it is saved; rules are kept in a setup table by role, grouping and country.

- Type: Program, Custom development, Enhancement
- Module: CA
- Estimated effort: M (6–10 working days)
- Last updated: 2026-11-18
- URL: https://nekuhub.com/en/programs/business-partner-save-checks-iban-tax-number-mandatory-fields/


## Why is the standard not enough?

The standard BP transaction checks the general structure of the IBAN and the length of the tax number for some countries; it does not check the check digit of the local tax ID, whether the IBAN matches the bank key and account number, or whether the same IBAN or tax number is already used by another business partner. Field status settings can make a field mandatory, but rules that depend on role and country, such as 'tax office mandatory for domestic suppliers', cannot be set up.

### Closest standard alternatives

- BP: Business partner maintenance; checks the general IBAN structure but not the local tax number check digit, bank consistency or mandatory fields by role and country.
- SPRO: Field status settings can make fields mandatory by grouping; country-dependent rules and duplicate checks cannot be set up.

## Tables used

| Table | Role | Access | Join | System |
|---|---|---|---|---|
| BUT000 | Business partner general data, grouping and category | Read | - | ECC + S/4 |
| BUT0BK | Bank details and IBAN | Read | BUT0BK-PARTNER = BUT000-PARTNER | ECC + S/4 |
| TIBAN | IBAN to bank account link, duplicate IBAN check | Read | TIBAN-BANKL = BUT0BK-BANKL AND TIBAN-BANKN = BUT0BK-BANKN | ECC + S/4 |
| BNKA | Existence of the bank key | Read | BNKA-BANKS = BUT0BK-BANKS AND BNKA-BANKL = BUT0BK-BANKL | ECC + S/4 |
| DFKKBPTAXNUM | Tax number type and tax number | Read | DFKKBPTAXNUM-PARTNER = BUT000-PARTNER | ECC + S/4 |
| ADRC | Address fields | Read | - | ECC + S/4 |
| ADR6 | Email address | Read | ADR6-ADDRNUMBER = ADRC-ADDRNUMBER | ECC + S/4 |
| KNB1 | Customer company code data: reconciliation account, payment terms | Read | - | ECC + S/4 |
| LFB1 | Supplier company code data: reconciliation account, payment terms | Read | - | ECC + S/4 |
| BALHDR | Application log of blocked saves | Write | - | ECC + S/4 |

## BAPIs and functions used

- BAPI_BANK_GETDETAIL: Reads the bank key master data
- BAPI_BUPA_CENTRAL_GETDETAIL: Reads central business partner data in the audit report

## Selection screen parameters

| Parameter | Description | Type | Reference field | Required |
|---|---|---|---|---|
| S_PARTNER | Business partner | Range / multiple | BUT000-PARTNER | No |
| S_BUGRP | Business partner grouping | Range / multiple | BUT000-BU_GROUP | No |
| S_LAND | Country | Range / multiple | ADRC-COUNTRY | No |
| P_ROLE | Role (customer, supplier or both) | Single value | - | No |
| P_ERR | Only records violating a rule | Checkbox | - | No |

## Result list columns

| Column | Source |
|---|---|
| Business partner | BUT000-PARTNER |
| Name | BUT000-NAME_ORG1 |
| Grouping | BUT000-BU_GROUP |
| Check | Calculated: IBAN, bank consistency, tax number, duplicate or mandatory field |
| Field value | Calculated: Value checked (IBAN or tax number masked) |
| Level | Calculated: Error or warning |
| Message | Calculated: Description of the rule |

## How does the program work?

1. Rules are kept in a setup table: business partner grouping, role (customer, supplier), country, check (IBAN, bank consistency, tax number format, duplicate check, mandatory field) and level (error or warning).
2. The checks run in a function module registered with BUS7 for the BDT check event (DCHCK), which runs on save in the BP transaction; messages are returned to the BP screen with BUS_MESSAGE_STORE and the record cannot be saved while there is an error. Mass load programs and interfaces call the same rule class before saving.
3. Bank: for every bank line in BUT0BK the IBAN is validated with CHECK_IBAN for check digits and country length; the bank key and account number resolved with CONVERT_IBAN_2_BANK_ACCOUNT are compared with those on the line, and the bank key must exist in BNKA. If the same IBAN exists for another business partner in TIBAN/BUT0BK, a warning is issued.
4. Tax number: the format is checked by tax number type in DFKKBPTAXNUM (local check digit calculation in addition to the standard TAX_NUMBER_CHECK); separate types are used for organisations and persons. If the same tax number exists for another business partner, an error or warning is issued according to the rule.
5. Mandatory fields: address fields (ADRC), email (ADR6), tax office and company code data (KNB1/LFB1 reconciliation account, payment terms) are checked by role and country.
6. Every blocked save is written to the application log. The audit report scans existing business partners with the same rules and lists incorrect records created before the rules were introduced. In S/4HANA customers and suppliers are maintained only with BP; in ECC the CHECK_ALL_DATA method of the CUSTOMER_ADD_DATA and VENDOR_ADD_DATA BAdIs is used for XD01/XK01.

## Authorization objects

- B_BUPA_GRP: Business partner maintenance by authorization group
- B_BUPA_RLT: Business partner maintenance by role
- F_LFA1_BUK: Supplier company code data maintenance
- S_APPL_LOG: Displaying the check log

## Frequently asked questions

### Are business partners from mass loads and interfaces checked too?

The BDT check event runs in the BP screen. Load programs and interfaces call the same rule class before saving, so the same rules apply whichever path the data comes from and incorrect rows are listed in the load log.

### What about existing incorrect records?

The rules apply only to new records and changes. The audit report scans existing business partners with the same rules; the master data team uses the list to correct old records in a planned way.

### What happens if the tax number format changes by regulation?

Format and check digit rules are kept in a separate class per country and tax number type. They are checked against current rules during installation; when something changes, only the rule of that country is updated.

---
Let us build this program for your system: https://nekuhub.com/en/request-a-quote/?report=ca-business-partner-validation-checks
