SD Program Custom development Mass upload

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

  • VA01 Create Sales Order. Creates orders one at a time by hand; does not read files.
  • LSMW Legacy System Migration Workbench. Can load from files but relies on screen recordings and needs technical maintenance.

Tables used

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

TableRoleAccessSystem
VBAKSales Document HeaderOrder header: type, sales area, sold-toWriteECC + S/4
VBAPSales Document ItemOrder items: material, quantity, plantWriteECC + S/4
VBEPSales Document: Schedule Line DataSchedule lines: requested delivery dateWriteECC + S/4
VBKDSales Document: Business DataCustomer PO number and date; also read for the duplicate checkRead / writeECC + S/4
VBPASales Document: PartnersShip-to partnerWriteECC + S/4
KNVVCustomer Master Sales DataCustomer sales area data (check)ReadECC + S/4
KNMTCustomer-Material Info RecordConversion from customer material number to SAP materialReadECC + S/4
MVKESales Data for MaterialSales organization data of the material (check)ReadECC + 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

ParameterDescriptionTypeReference fieldRequiredExample
P_FILEOrder file (XLSX or CSV)Single value—YesC:\temp\musteri_siparis.xlsx
P_AUARTOrder typeSingle valueVBAK-AUARTYesTA
P_VKORGSales organizationSingle valueVBAK-VKORGYes1000
P_VTWEGDistribution channelSingle valueVBAK-VTWEGYes10
P_SPARTDivisionSingle valueVBAK-SPARTYes00
P_DUPCHKSkip orders whose customer PO number already existsCheckbox—NoX
P_TESTTest mode (simulate without saving)Checkbox—NoX

Input file columns

The columns of the upload template and the SAP fields they are written to. Columns with an asterisk are mandatory.

#ColumnTarget fieldRequired
1Customer PO numberVBKD-BSTKDYes
2Customer PO dateVBKD-BSTDKNo
3Sold-toVBAK-KUNNRYes
4Ship-toVBPA-KUNNRNo
5MaterialVBAP-MATNRNo
6Customer material (if material is blank)KNMT-KDMATNo
7QuantityVBAP-KWMENGYes
8Sales unitVBAP-VRKMENo
9Requested delivery dateVBEP-EDATUNo
10PlantVBAP-WERKSNo

Sample upload file

1Customer PO number *Customer PO dateSold-to *Ship-toMaterialCustomer material (if material is blank)Quantity *Sales unitRequested delivery datePlant
2PO-KG-8812011/16/2026200310200311KG-55012400KG11/24/20261000
3PO-KG-8812011/16/2026200310200311FG-2051150KG11/24/20261000
4MYM-2026-114511/17/2026200145FG-1001600PC11/27/20261000
A view built with fictional sample data; not real system data.

Result list columns

#ColumnSource
1RowCalculated Row number in the file
2Customer PO numberVBKD-BSTKD
3Sales orderVBAK-VBELN
4ItemVBAP-POSNR
5MaterialVBAP-MATNR
6Net valueVBAP-NETWR
7StatusCalculated From the BAPI return messages: simulated, created, skipped or error
8MessageCalculated First error or success message from the BAPI return table

Sample result list

RowCustomer PO numberSales orderItemMaterialNet valueStatusMessage
2PO-KG-881200000123601000010FG-205031,200CreatedSales order 123601 saved
3PO-KG-881200000123601000020FG-205112,450CreatedSales order 123601 saved
4MYM-2026-1145FG-10010SkippedOrder 123401 already exists with this customer PO number
A view built with fictional sample data; not real system data.

How does the program work?

  1. 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.
  2. 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).
  3. 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.
  4. In test mode BAPI_SALESORDER_SIMULATE is called; net price, confirmed quantity and messages are shown without saving.
  5. 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

CA Package Custom

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 …

5 components · v1.0

Related reports

SD Report Custom ALV report

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 …

VBAK · VBUK · VBUV · DD03L

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: Mass Sales Order Creation from Excel Program