# Mass Sales Price Condition Upload from Excel Program

> A custom program that creates sales price condition records per customer/material or per material, with validity dates, in bulk from Excel or CSV rows. Before saving, it reads the current price and shows the change in percent, runs every check in test mode and lists the result of each row.

- Type: Program, Custom development, Mass upload
- Module: SD
- Estimated effort: M (4–6 working days)
- Last updated: 2026-11-17
- URL: https://nekuhub.com/en/programs/mass-sales-price-condition-upload-from-excel-program/


## Why is the standard not enough?

VK11 enters or copies condition records one by one; it does not read a file. VK12 changes existing records only by a common percentage or amount and cannot load a different price per row. For the yearly price list update, thousands of customer/material prices are entered manually or through fragile recordings. The custom program loads the price list from the file as it is and shows the difference to the old price before saving.

### Closest standard alternatives

- VK11: Creates or copies condition records one at a time; does not load from a file.
- VK13: Displays existing condition records; no comparison with new prices and no upload.

## Tables used

| Table | Role | Access | Join | System |
|---|---|---|---|---|
| T685 | Condition type check (sales application) | Read | T685-KSCHL = A305-KSCHL | ECC + S/4 |
| KNVV | Check that the customer exists in the sales area | Read | KNVV-KUNNR = A305-KUNNR AND KNVV-VKORG = A305-VKORG AND KNVV-VTWEG = A305-VTWEG | ECC + S/4 |
| MVKE | Check that the material exists in the sales organization and distribution channel | Read | MVKE-MATNR = A305-MATNR AND MVKE-VKORG = A305-VKORG AND MVKE-VTWEG = A305-VTWEG | ECC + S/4 |
| A305 | Customer/material condition table: the old record is read, the new key and validity are written | Read / write | - | ECC + S/4 |
| A004 | Material condition table (when price per material is selected) | Read / write | - | ECC + S/4 |
| KONH | Condition record header | Write | - | ECC + S/4 |
| KONP | Condition amount, currency, price unit and unit of measure | Read / write | - | ECC + S/4 |

## BAPIs and functions used

- RV_CONDITION_COPY: Prepares the condition record with key, validity and amount for each row

## Selection screen parameters

| Parameter | Description | Type | Reference field | Required |
|---|---|---|---|---|
| P_FILE | Price list file (XLSX or CSV) | Single value | - | Yes |
| P_KSCHL | Condition type | Single value | A305-KSCHL | Yes |
| R_A305 | Customer/material price (A305) | Radio button | - | No |
| R_A004 | Material price (A004) | Radio button | - | No |
| P_TEST | Test mode (check without saving) | Checkbox | - | No |

## Input file columns

| Column | Target field | Required |
|---|---|---|
| Sales organization | A305-VKORG | Yes |
| Distribution channel | A305-VTWEG | Yes |
| Customer (mandatory for A305) | A305-KUNNR | No |
| Material | A305-MATNR | Yes |
| Amount | KONP-KBETR | Yes |
| Currency | KONP-KONWA | Yes |
| Price unit | KONP-KPEIN | No |
| Unit of measure | KONP-KMEIN | No |
| Valid from | A305-DATAB | Yes |
| Valid to | A305-DATBI | Yes |

## Result list columns

| Column | Source |
|---|---|
| Row | Calculated: Row number in the file |
| Customer | A305-KUNNR |
| Material | A305-MATNR |
| Condition record | KONH-KNUMH |
| Old price | Calculated: KONP-KBETR of the record valid today |
| New price | KONP-KBETR |
| Change % | Calculated: (New price − old price) ÷ old price × 100 |
| Status | Calculated: Created, test OK or error |
| Message | Calculated: Check or save message |

## How does the program work?

1. The file is read; the condition table is chosen on the selection screen: A305 (customer/material) or A004 (material). The condition type must be defined in T685 for the sales application (KAPPL = V).
2. Every row is checked: the customer exists in the sales area (KNVV), the material exists in the sales organization and distribution channel (MVKE), the amount is positive, currency and unit are valid and the start date is before the end date; if the same key appears twice in the file, the second row gets an error.
3. The record valid today for the same key is read from A305/A004 and KONP; the old price and the change in percent are written to the result list.
4. RV_CONDITION_COPY prepares the key, validity and KONP amount; the validity of an overlapping old record is delimited with the standard VK11 logic. The record is written to KONH, KONP and the condition table with RV_CONDITION_SAVE and COMMIT WORK; RV_CONDITION_RESET clears the buffer between rows.
5. In test mode only the checks and the old price comparison run; no record is created. In a real run, the condition record number and message are listed per row; failed rows can be downloaded as a separate file.

## Authorization objects

- V_KONH_VKO: Authorization to create condition records by sales organization
- V_KONH_VKS: Authorization by condition type

## Frequently asked questions

### What happens to the old price record?

If the validity of the new record overlaps the old one, the old record's end date is moved to the day before the new start date, as in VK11. The old record is not deleted, so the price used on past invoices stays traceable.

### Are other condition tables (e.g. customer group/material) supported?

Yes. The program can be built to read the condition table and key fields from a mapping table; each additional condition table adds its own key columns to the file template and raises the effort range slightly.

### Does the program work on S/4HANA?

Yes. In S/4HANA condition records are still stored in KONH, KONP and the A tables (only document conditions moved from KONV to PRCD_ELEMENTS). In systems that use the Fiori 'Manage Prices – Sales' app, the same checks can also be applied to its file template.

---
Let us build this program for your system: https://nekuhub.com/en/request-a-quote/?report=sd-price-condition-upload
