Mass Change Program for Open Sales Orders (Delivery Date, Ship-to, Rejection Reason)
Short answer: 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 file. It makes the changes through the standard BAPI, can redetermine pricing, checks everything in test mode first and logs the old and new value of every row.
- Estimated effort
- M · 4–6 working days
- System
- ECC and S/4HANA
- Tables
- 6
- Scope
- Global
- Built by
- NeKuDos Teknoloji
- Last updated
Why is the standard not enough?
VA02 changes one order. MASS can make mass changes, but it does not read a file, does not always redetermine schedule lines, route and pricing as expected, and gives no test result per row. After a supply delay, changing the date or the ship-to of hundreds of orders needs a controlled program that keeps a log.
Who uses it? Customer service, sales operations and planning teams; users who update the dates of many orders after a production or supply delay.
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 and sold-to (check) | Read | ECC + S/4 |
| VBAPSales Document Item | Reason for rejection of the item | Write | ECC + S/4 |
| VBEPSales Document: Schedule Line Data | Requested delivery date in the schedule line | Write | ECC + S/4 |
| VBPASales Document: Partners | Ship-to partner | Write | ECC + S/4 |
| VBUPSales Document: Item Status | Item overall and delivery status (check) | Read | ECC only |
| KNVPCustomer Master Partner Functions | Permitted ship-to partners of the sold-to (check) | Read | ECC + S/4 |
S/4HANA notes
- VBUP → VBAP: VBUP was removed in S/4HANA; the item status fields moved directly into VBAP (sales), LIPS (delivery) and VBRP (billing).
BAPIs and functions used
- BAPI_SALESORDER_CHANGEChange Sales Order. Changes the date, partner and rejection reason on the order
- BAPI_TRANSACTION_ROLLBACKRoll Back BAPI Transaction. Rolls back the change in test mode
- BAPI_TRANSACTION_COMMITCommit a BAPI transaction. Saves successful changes permanently
Selection screen parameters
| Parameter | Description | Type | Reference field | Required | Example |
|---|---|---|---|---|---|
| P_FILE | Change file (XLSX or CSV) | Single value | — | Yes | C:\temp\siparis_degisiklik.xlsx |
| P_PRICE | Redetermine pricing for changed items | Checkbox | — | No | — |
| P_TEST | Test mode (check 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 | Sales order | VBAP-VBELN | Yes |
| 2 | Item (blank = all items) | VBAP-POSNR | No |
| 3 | New requested delivery date | VBEP-EDATU | No |
| 4 | New ship-to | VBPA-KUNNR | No |
| 5 | Reason for rejection | VBAP-ABGRU | No |
Sample upload file
| 1 | Sales order * | Item (blank = all items) | New requested delivery date | New ship-to | Reason for rejection |
|---|---|---|---|---|---|
| 2 | 0000123455 | 000010 | 11/28/2026 | ||
| 3 | 0000123498 | 200425 | |||
| 4 | 0000123512 | 000030 | 05 |
Result list columns
| # | Column | Source |
|---|---|---|
| 1 | Row | Calculated Row number in the file |
| 2 | Sales order | VBAP-VBELN |
| 3 | Item | VBAP-POSNR |
| 4 | Changed field | Calculated The field filled in the file: delivery date, ship-to or rejection reason |
| 5 | Old value | Calculated VBEP-EDATU, VBPA-KUNNR or VBAP-ABGRU before the change |
| 6 | New value | Calculated Value from the file |
| 7 | Status | Calculated From the BAPI return messages: checked, changed or error |
| 8 | Message | Calculated First error or success message from the BAPI return table |
Sample result list
| Row | Sales order | Item | Changed field | Old value | New value | Status | Message |
|---|---|---|---|---|---|---|---|
| 2 | 0000123455 | 000010 | Delivery date | 11/20/2026 | 11/28/2026 | Changed | Sales order 123455 saved |
| 3 | 0000123498 | 000000 | Ship-to | 200422 | 200425 | Changed | Sales order 123498 saved |
| 4 | 0000123512 | 000030 | Rejection reason | 05 | Error | Item is fully delivered; no rejection reason allowed |
How does the program work?
- The file is read; each row holds the order, the item and the fields to change (new requested delivery date, new ship-to, reason for rejection).
- Checks: the order must exist and be open (VBUP-GBSTA ≠ C); for a date change the item must not be fully delivered (VBUP-LFSTA ≠ C); the new ship-to must be among the partners of the sold-to (KNVP).
- The old values are read from VBEP, VBPA and VBAP and logged.
- The header, item, schedule line and partner change structures of BAPI_SALESORDER_CHANGE are filled with their update flags (X structures); with pricing redetermination selected, pricing is triggered through LOGIC_SWITCH.
- In test mode the BAPI is called and rolled back with BAPI_TRANSACTION_ROLLBACK; in a real run BAPI_TRANSACTION_COMMIT follows each successful order. Old value, new value and message are listed per row.
Performance notes
Group the rows of the same order and change the order in a single BAPI call; this reduces lock conflicts and unnecessary repricing. Run large files in the background.
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 A change template pre-filled from selected orders can be downloaded as Excel.
- Runs as a background job
Authorization objects
- V_VBAK_VKOSales document change authorization by sales area
- V_VBAK_AATChange authorization by order type
Frequently asked questions
What happens to the confirmation and schedule lines when the date changes?
After changing the requested date, the BAPI runs the standard availability check; the confirmed date and quantity are redetermined according to SAP rules. The resulting messages are written to the log.
Can items that already have a delivery be changed?
Dates and rejection reasons are not changed on fully delivered items; the program flags these rows as errors. For partially delivered items, the open quantity can be changed.
Can this program be used on S/4HANA?
Yes. BAPI_SALESORDER_CHANGE is supported on S/4HANA; the status checks use the status fields in VBAP instead of VBUP.
Related reports
On-Time In-Full (OTIF) Delivery Performance Report by Customer
A custom ALV report that compares every sales order item with the customer's requested delivery date and ordered quantity, and works out whether the …
Mass Sales Order Creation from Excel Program
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 …
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.