# Mass Creation of Business Partners (BP) from Excel

> A custom program that mass creates organization business partners with general data, address, phone, email and roles (e.g. customer, vendor) from an Excel file through the standard BP BAPIs. Before loading, possible duplicates with the same name and postal code are searched; nothing is saved in test mode, and the result of each row is kept in a log.

- Type: Program, Custom development, Mass upload
- Module: CA
- Estimated effort: M (5–7 working days)
- Last updated: 2026-11-17
- URL: https://nekuhub.com/en/programs/mass-create-business-partners-from-excel/


## Why is the standard not enough?

Transaction BP creates business partners one at a time. The S/4HANA migration cockpit is designed for the initial data load; for hundreds of new dealers or suppliers during operations it does not offer a duplicate check and a simple Excel template. BP creation methods in LSMW are limited. This program enables operational bulk creation with a fixed template, a duplicate check and a test mode.

### Closest standard alternatives

- BP: Creates business partners one at a time; no bulk load or duplicate check.
- LSMW: General data transfer tool; recording methods for BP are limited and it offers no duplicate check.

## Tables used

| Table | Role | Access | Join | System |
|---|---|---|---|---|
| BUT000 | Business partner general data; created through the BAPI and read for the duplicate check | Write | - | ECC + S/4 |
| BUT100 | Business partner roles; added through the BAPI | Write | BUT100-PARTNER = BUT000-PARTNER | ECC + S/4 |
| BUT020 | Business partner address link; created through the BAPI | Write | BUT020-PARTNER = BUT000-PARTNER | ECC + S/4 |
| ADRC | Address and landline; written through the BAPI and read for the duplicate check | Write | ADRC-ADDRNUMBER = BUT020-ADDRNUMBER | ECC + S/4 |
| ADR6 | Email address; written through the BAPI | Write | ADR6-ADDRNUMBER = BUT020-ADDRNUMBER | ECC + S/4 |
| T005 | Postal code rule by country | Read | T005-LAND1 = ADRC-COUNTRY | ECC + S/4 |

## BAPIs and functions used

- BAPI_BUPA_CREATE_FROM_DATA: Creates the business partner with general data and standard address
- BAPI_BUPA_ROLE_ADD_2: Adds each role from the file to the business partner
- BAPI_TRANSACTION_COMMIT: Saves a successful row permanently
- BAPI_TRANSACTION_ROLLBACK: Rolls back changes in test mode or on error

## Selection screen parameters

| Parameter | Description | Type | Reference field | Required |
|---|---|---|---|---|
| P_FILE | Upload file (XLSX or CSV) | Single value | - | Yes |
| P_TEST | Test mode (check without saving) | Checkbox | - | No |
| P_DUP | Stop the row on a possible duplicate | Checkbox | - | No |
| S_ROLE | Allowed roles | Range / multiple | BUT100-RLTYP | No |

## Input file columns

| Column | Target field | Required |
|---|---|---|
| Grouping | BUT000-BU_GROUP | Yes |
| Category | BUT000-TYPE | Yes |
| Name 1 | BUT000-NAME_ORG1 | Yes |
| Name 2 | BUT000-NAME_ORG2 | No |
| Search term | BUT000-BU_SORT1 | No |
| Street | ADRC-STREET | No |
| House number | ADRC-HOUSE_NUM1 | No |
| Postal code | ADRC-POST_CODE1 | No |
| City | ADRC-CITY1 | Yes |
| Country | ADRC-COUNTRY | Yes |
| Region | ADRC-REGION | No |
| Phone | ADRC-TEL_NUMBER | No |
| Email | ADR6-SMTP_ADDR | No |
| Roles | BUT100-RLTYP | No |

## Result list columns

| Column | Source |
|---|---|
| Row | Calculated: Row number in the file |
| Business partner | BUT000-PARTNER |
| Name | BUT000-NAME_ORG1 |
| Grouping | BUT000-BU_GROUP |
| City | ADRC-CITY1 |
| Roles added | BUT100-RLTYP |
| Possible duplicate | Calculated: Existing business partner number with the same name 1 + postal code + city |
| Status | Calculated: Success / Test / Stopped / Error |
| Message | Calculated: BAPI return message or check error |

## How does the program work?

1. The file is read; grouping, category, name 1, city and country are mandatory. Roles are a semicolon-separated list (e.g. FLCU00;FLCU01).
2. Checks: does the postal code follow the country rule in T005, is the email format valid, are the roles in the allowed list.
3. Duplicate check: a business partner with the same name 1 + postal code + city combination is searched through BUT000 and the standard address (BUT020/ADRC); depending on the selection the row is stopped or continues with a warning.
4. General data and the standard address (including phone and email) are created with BAPI_BUPA_CREATE_FROM_DATA; the number is assigned by grouping.
5. BAPI_BUPA_ROLE_ADD_2 is called for each role. With CVI active, customer/vendor roles create customer and vendor general data automatically.
6. In test mode BAPI_TRANSACTION_ROLLBACK is called; in a real run BAPI_TRANSACTION_COMMIT is called when the row succeeded. The result is shown in ALV with business partner number, status and message; failed rows can be downloaded with the template.

## Authorization objects

- B_BUPA_GRP: Create in the business partner grouping (ACTVT 01)
- B_BUPA_RLT: Add business partner roles

## Frequently asked questions

### Are company code, sales area and purchasing data loaded too?

The basic version covers general data, address and roles; with CVI active, customer and vendor general data are created automatically. Company code (reconciliation account, payment terms), sales area and purchasing organization data can be added as an extension with extra template columns; this takes about three extra days.

### Can tax numbers and bank details be loaded?

Yes, as an extension: tax numbers and bank accounts are written with the standard business partner interfaces in the same logical unit of work, and the duplicate check also uses the tax number. This takes about two extra days.

### Can the program be used on ECC as well?

Yes. The BP BAPIs used also exist in ECC 6.0. If CVI is not active on ECC, only the business partner is created; customer and vendor records must be created separately.

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