Mass Sales Order Creation from Excel Program
Short answer: A custom program that creates sales orders in bulk from the rows of an order file sent by the customer. It groups rows into orders by customer PO number, converts customer material numbers to SAP materials, shows price and confirmed quantity in test mode without saving, and lists the result of every row.
- Estimated effort
- M · 5–7 working days
- System
- ECC and S/4HANA
- Tables
- 8
- Scope
- Global
- Built by
- NeKuDos Teknoloji
- Last updated
Why is the standard not enough?
VA01 creates orders one at a time by hand. Automatic orders through IDoc ORDERS need an EDI partner setup and a fixed mapping, while many customers send their orders as Excel sheets. LSMW recordings break when screens change. Teams that enter hundreds of order lines a week need an upload with a test mode that recognizes customer material numbers and prevents duplicate orders.
Who uses it? Customer service and order entry teams, and sales operations teams that receive orders as files from retail chains or distributors.
Closest standard alternatives
Tables used
The tables the program reads and updates. ECC and S/4HANA differences are marked separately.
| Table | Role | Access | System |
|---|---|---|---|
| VBAKSales Document Header | Order header: type, sales area, sold-to | Write | ECC + S/4 |
| VBAPSales Document Item | Order items: material, quantity, plant | Write | ECC + S/4 |
| VBEPSales Document: Schedule Line Data | Schedule lines: requested delivery date | Write | ECC + S/4 |
| VBKDSales Document: Business Data | Customer PO number and date; also read for the duplicate check | Read / write | ECC + S/4 |
| VBPASales Document: Partners | Ship-to partner | Write | ECC + S/4 |
| KNVVCustomer Master Sales Data | Customer sales area data (check) | Read | ECC + S/4 |
| KNMTCustomer-Material Info Record | Conversion from customer material number to SAP material | Read | ECC + S/4 |
| MVKESales Data for Material | Sales organization data of the material (check) | Read | ECC + S/4 |
BAPIs and functions used
- ALSM_EXCEL_TO_INTERNAL_TABLERead Excel File into Internal Table by Cell. Reads the XLSX file cell by cell
- BAPI_SALESORDER_SIMULATESimulate Sales Order. Prices and confirms the order in test mode without saving
- BAPI_SALESORDER_CREATEFROMDAT2Create Sales Order. Creates the sales order for each order group
- BAPI_TRANSACTION_COMMITCommit a BAPI transaction. Saves successful orders permanently
Selection screen parameters
| Parameter | Description | Type | Reference field | Required | Example |
|---|---|---|---|---|---|
| P_FILE | Order file (XLSX or CSV) | Single value | — | Yes | C:\temp\musteri_siparis.xlsx |
| P_AUART | Order type | Single value | VBAK-AUART | Yes | TA |
| P_VKORG | Sales organization | Single value | VBAK-VKORG | Yes | 1000 |
| P_VTWEG | Distribution channel | Single value | VBAK-VTWEG | Yes | 10 |
| P_SPART | Division | Single value | VBAK-SPART | Yes | 00 |
| P_DUPCHK | Skip orders whose customer PO number already exists | Checkbox | — | No | X |
| P_TEST | Test mode (simulate without saving) | Checkbox | — | No | X |
Input file columns
The columns of the upload template and the SAP fields they are written to. Columns with an asterisk are mandatory.
| # | Column | Target field | Required |
|---|---|---|---|
| 1 | Customer PO number | VBKD-BSTKD | Yes |
| 2 | Customer PO date | VBKD-BSTDK | No |
| 3 | Sold-to | VBAK-KUNNR | Yes |
| 4 | Ship-to | VBPA-KUNNR | No |
| 5 | Material | VBAP-MATNR | No |
| 6 | Customer material (if material is blank) | KNMT-KDMAT | No |
| 7 | Quantity | VBAP-KWMENG | Yes |
| 8 | Sales unit | VBAP-VRKME | No |
| 9 | Requested delivery date | VBEP-EDATU | No |
| 10 | Plant | VBAP-WERKS | No |
Sample upload file
| 1 | Customer PO number * | Customer PO date | Sold-to * | Ship-to | Material | Customer material (if material is blank) | Quantity * | Sales unit | Requested delivery date | Plant |
|---|---|---|---|---|---|---|---|---|---|---|
| 2 | PO-KG-88120 | 11/16/2026 | 200310 | 200311 | KG-55012 | 400 | KG | 11/24/2026 | 1000 | |
| 3 | PO-KG-88120 | 11/16/2026 | 200310 | 200311 | FG-2051 | 150 | KG | 11/24/2026 | 1000 | |
| 4 | MYM-2026-1145 | 11/17/2026 | 200145 | FG-1001 | 600 | PC | 11/27/2026 | 1000 |
Result list columns
| # | Column | Source |
|---|---|---|
| 1 | Row | Calculated Row number in the file |
| 2 | Customer PO number | VBKD-BSTKD |
| 3 | Sales order | VBAK-VBELN |
| 4 | Item | VBAP-POSNR |
| 5 | Material | VBAP-MATNR |
| 6 | Net value | VBAP-NETWR |
| 7 | Status | Calculated From the BAPI return messages: simulated, created, skipped or error |
| 8 | Message | Calculated First error or success message from the BAPI return table |
Sample result list
| Row | Customer PO number | Sales order | Item | Material | Net value | Status | Message |
|---|---|---|---|---|---|---|---|
| 2 | PO-KG-88120 | 0000123601 | 000010 | FG-2050 | 31,200 | Created | Sales order 123601 saved |
| 3 | PO-KG-88120 | 0000123601 | 000020 | FG-2051 | 12,450 | Created | Sales order 123601 saved |
| 4 | MYM-2026-1145 | FG-1001 | 0 | Skipped | Order 123401 already exists with this customer PO number |
How does the program work?
- The file (XLSX or CSV) is read from the user’s PC or, in a background job, from the application server; rows are grouped into orders by customer PO number (BSTKD), sold-to and ship-to.
- Checks: the sold-to must exist in the selected sales area (KNVV); if the material is blank, the customer material number is converted to the SAP material through KNMT; the material must have sales organization data (MVKE).
- With the duplicate check selected, a group is skipped when an order with the same customer PO number (VBKD-BSTKD) already exists for the customer.
- In test mode BAPI_SALESORDER_SIMULATE is called; net price, confirmed quantity and messages are shown without saving.
- In a real run BAPI_SALESORDER_CREATEFROMDAT2 is called per group, followed by BAPI_TRANSACTION_COMMIT for successful orders. Order number, item, net value and messages are listed per row; failed rows can be downloaded as a separate file.
Performance notes
Run files above a few thousand rows as a background job. Committing per order isolates failed orders. Read KNMT and KNVV once with the list of customers in the file.
Features
- Test mode (check without posting)
- Line-by-line result and error log
- Download failed lines as a separate file Failed rows can be corrected and uploaded again with the same template.
- Export to Excel An empty upload template can be downloaded as Excel.
- Runs as a background job
Authorization objects
- V_VBAK_VKOSales document create authorization by sales area
- V_VBAK_AATCreate authorization by order type
Frequently asked questions
Are prices taken from the file or from the system?
By default the price comes from SAP pricing. If the price agreed with the customer must come from the file, a column can be added that is passed as a manual pricing condition.
What if the customer uses their own material codes?
The material column can be left blank and the customer material number entered. The program finds the SAP material from the customer-material info record in KNMT; without a record, the row returns an error.
Can this program be used on S/4HANA?
Yes. BAPI_SALESORDER_CREATEFROMDAT2 and BAPI_SALESORDER_SIMULATE are supported on S/4HANA; although customer master data is kept through the business partner, the sales area data is checked the same way.
Packages that include this solution
Excel Mass Data Upload Pack
A pack that puts the five bulk uploads key users run most often into one upload structure: material master, equipment master with installation at a …
Related reports
Incomplete Sales Orders with Missing Fields Report
A custom ALV report that lists sales orders with an incompletion log, one line per missing field, with the field name, the affected item, the order …
Mass Change Program for Open Sales Orders (Delivery Date, Ship-to, Rejection Reason)
A custom program that changes the requested delivery date, the ship-to and the reason for rejection on open sales orders in bulk, from the rows of a …
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.