SAP sales order automation means booking sales orders from data instead of typing each one into VA01. PostNow runs it from Excel: an order header and its partners sit together, the line items follow on their own rows, and the add-in posts everything through the standard BAPI_SALESORDER_CREATEFROMDAT2, attaching the sold-to and ship-to, scheduling and pricing each line, checking the values, and committing every order in one run, with any SAP error explained in plain language.
This is a twelve-step worked example of creating sales orders from Excel to SAP, single-line and multi-line orders together, in one mass run. Keep the mapping, partners and grouping included, and you have a sales order Excel template ready for the next batch. It holds on classic ECC and on S/4HANA, where Sales and Distribution still books orders behind VA01 and the same BAPI. After a one-time setup, the order desk running the load needs no ABAP and no developer.
Why create sales orders from Excel instead of keying VA01
Entering a sales order in VA01 means setting the order type and sales area, naming the sold-to and ship-to, then adding each material with its quantity, plant, and date. A single order is straightforward. A daily wave of orders from a portal export, a seasonal surge, or a backlog at cutover turns it into screen after screen, and a wrong sales area or an unextended customer only shows once the order refuses to save.
Creating sales orders from Excel rebalances the work. The orders are already in a spreadsheet, often dropped out of a webshop or EDI feed, and each one books in a single governed run. For a steady bulk sales order creation or a one-off mass sales order upload, the awkward parts, choosing the function, mapping header, partner, and item fields, getting requested dates right, and reading SD messages, are taken care of. The twelve steps below set out the whole flow.
Before you start: what you need
- Your orders in Excel, the header and partners on one row and a row per line item, with a shared key (an order reference) so the parts can be grouped into one order.
- SAP authorization to create sales orders, the access you would use for
VA01, across the order types and sales areas you are loading. - PostNow in Excel, with a live link to your SAP system. Its function modules are deployed to SAP once at setup, and the order loads then run entirely from the task pane.
VA01 on the surface and BAPI_SALESORDER_CREATEFROMDAT2 beneath, so the steps apply unchanged. S/4HANA may present the order through Fiori sales apps, but the posting interface is the same.Your sales order Excel template: the fields SAP expects
A sales order joins a header, the partners it is sold and shipped to, and the items being ordered, so the template blends header columns, partner columns, and repeating item columns. These are the fields an order load depends on; carry them, and check that the customers, materials, and sales area they name already exist.
| Excel column | SAP field | Why it matters |
|---|---|---|
| Order type | AUART | Header; sets the order category and number range (TVAK) |
| Sales area | VKORG / VTWEG / SPART | Header; the sales org, channel, and division must be set up together |
| Sold-to party | KUNNR (AG) | Partner; required, and must exist for the sales area (KNA1) |
| Customer PO number | BSTKD | Header; the customer's reference for the order |
| Material | MATNR | Item; the product being ordered |
| Target quantity | ZMENG | Item; how much is ordered, in the sales unit |
| Plant | WERKS | Item; the delivering plant, which must exist (T001W) |
BAPI_SALESORDER_CREATEFROMDAT2 books the order and BAPI_SALESORDER_CHANGE amends it. It brings together ORDER_HEADER_IN, a required ORDER_PARTNERS table carrying at least the sold-to (and usually a ship-to), ORDER_ITEMS_IN for the lines, ORDER_SCHEDULES_IN for requested quantities and dates, and ORDER_CONDITIONS_IN for any manual pricing, with INX structures marking which fields to write. The order is persisted by BAPI_TRANSACTION_COMMIT and the call returns the new SALESDOCUMENT number. Step 2 has PostNow's function finder pick BAPI_SALESORDER_CREATEFROMDAT2, pull its structures in, and run the commit.The sales order load, step by step
Lay out and open your sheet
Put each order header on a row with columns like Order Ref, Order Type, Sales Org, Channel, Division, Sold-To, Ship-To, and Customer PO, and give every line item its own row carrying the same Order Ref plus Material, Quantity, and Plant. Open the workbook and launch the PostNow task pane beside it.
Choose the sales order BAPI
A standard call books the order, so nothing is recorded. Open the function finder and take the call the job needs:
- For new orders, take
BAPI_SALESORDER_CREATEFROMDAT2, which books a header with its partners and items in one call - To amend an order, take
BAPI_SALESORDER_CHANGE, which writes the fields you flag - The order is saved only once the commit runs, and PostNow issues
BAPI_TRANSACTION_COMMITafter each successful booking
Confirm the function and PostNow brings in its header, partner, and item structures, ready to line up with your columns, and keeps the choice for every order so VA01 stays closed.

Look over the structures it returns
The call returns a header that appears once, a partner table the order cannot do without, and items that repeat. Because it mirrors how an order is built, a glance shows what belongs to the order and what belongs to each line:
That tells you, before any mapping, which columns are header, which are partners, and which repeat per line.
Open the Mapping Designer
Picking the BAPI loads the Mapping Designer with a line for every header, partner, and item field. Two things help here:
- Extensions are detected. Append fields your system adds to the order header or item, often custom SD fields, are pulled in automatically.
- You can add your own. Whatever it does not catch you add yourself, so standard and custom fields travel in the same load.


Match columns with Mapping AI AI
Now connect the structures to your spreadsheet. Mapping AI proposes an Excel column for each header, partner, and item field, reading your headers or a screenshot you drop in, and you confirm or adjust, which helps when an order mixes header attributes, partner roles, and repeating line fields.

Auto Map and nest items under each order
Press Auto Map to lock the mapping in and tag the sheet headers with their SAP fields. Because an order has structure, this is where you set the header/detail grouping: rows sharing an order reference are gathered into one order, the header and partners read once and the item rows read as lines. The workbook is now the template, and the grouping is saved alongside it.


Set formatting and the update flags
A field's properties shape how its value posts: upper case on codes, a date format on the requested delivery date, the right decimals on quantities, defaults, and regex. Customer and material numbers are padded to their stored length so the partner and item resolve.
For amendments through BAPI_SALESORDER_CHANGE, the INX structures (ORDER_HEADER_INX, ORDER_ITEMS_INX) decide what is written: each field is written only if its indicator is switched on. Rather than ticking them by hand, PostNow spots the fields you have edited and raises their INX indicators for you, so amending a run of orders stays limited to the values you changed.

Run the checks in Excel first
There is a good reason to check first: an SD error usually arrives as a short code once an order has already failed. Validate pulls that check forward, measuring every row against SAP's length, format, and required-field rules and marking the cells that fall short, so nothing leaves the sheet broken.
Confirm against live SAP
Good formatting is no guarantee a value is usable, a customer can read fine and not be extended to the sales area. To test it, open the field's properties, enable field validation, and supply the check table and field, a sold-to against KNA1, a material against MARA, or the sales organisation against its configuration. Pick the cell, run Validate master data, and PostNow checks live SAP for the value before you rely on it.
Group items into orders with loops
A sales order is a natural header/detail case, with partners in the mix, so this is where the structure pays off:
- Header/detail loops: rows sharing an order reference collapse into one order, the header and partners taken once and each item row added as a line, however many lines the order runs to.
- IF conditions: include only the lines you want, for example dropping rows with a zero quantity or holding back items flagged as not orderable.
Set the scope, post, and review AI
Set the range with Run Scope, post one order first, then release the rest, and hit Run. A few aids:
- Run log: results stream into the run window and drop into a log column next to each row.
- Payload view: open the exact data sent to SAP for any order, header, partners, and items together, so a failure is never a guess.
- AI error review: AI Review reads the SD message and explains, plainly, what blocked the order and where to fix it.
- RETURN per order: the BAPI reports messages per document, and PostNow ties each to its rows, writing the new order number back beside the order it belongs to.
Publish and roll it out to the team
With a clean run done, hit publish. The configuration, partners, grouping, and all, becomes a script the order desk runs unchanged, they open it, paste their orders, and post, with no mapping to rebuild and no need to know the BAPI underneath. A one-time build becomes the standard way to book sales orders.
Let's talk
Bring a real order file and a live SAP connection to a working session. We will tie the partners and items to their headers, map, validate, and book the orders for real, with AI taking the strain. No slide decks.
Frequently asked questions
What is SAP sales order automation?
VA01. With PostNow the order data stays in Excel, partners and item rows tie to their header, and the orders post in one governed run via BAPI_SALESORDER_CREATEFROMDAT2, with AI mapping fields, validating values, and explaining errors.How do you create sales orders in SAP from Excel?
BAPI_SALESORDER_CREATEFROMDAT2, groups partners and items under each order, and commits it, so there is no VA01 keying and no ABAP.Which BAPI creates SAP sales orders?
BAPI_SALESORDER_CREATEFROMDAT2 creates sales orders and BAPI_SALESORDER_CHANGE amends them. The call combines ORDER_HEADER_IN, a required ORDER_PARTNERS table for the sold-to and ship-to, ORDER_ITEMS_IN, ORDER_SCHEDULES_IN, and ORDER_CONDITIONS_IN, with INX structures flagging the fields to write. It is saved with BAPI_TRANSACTION_COMMIT, which PostNow handles for you.Can you upload multi-line sales orders from Excel?
BAPI_SALESORDER_CREATEFROMDAT2. One sheet can carry many multi-line sales orders in a single mass run.