How an SAP mass change from Excel works
An SAP mass change from Excel, often searched as an SAP mass update, changes fields on records that already exist in SAP, such as the payment terms of 180 vendors or the purchasing group of 2,000 materials, from values in a sheet. PostNow.ai runs it as a loop: it downloads the current SAP values into the sheet, you edit them in Excel, and after a review of old against new it posts the rows you changed through the template's change BAPI, recorded change transaction or API change service. Every posted row gets SAP's answer in its Run Log cell, so the sheet shows what changed and what SAP refused.
- You review old against new, then post the changed rows. PostNow.ai compares the downloaded columns with a snapshot taken at download and lists every row that differs; Update changed rows posts those rows. If nothing differs, nothing is posted.
- An emptied cell clears the field. On a posted row every mapped column is sent, so a cell you empty asks SAP to clear that field. The same goes for a mapped Skip column that nobody filled in.
This page covers one job: an SAP mass update from Excel of records that already exist. Creating new records or posting documents is covered in SAP mass upload from Excel, the material master in detail in material master mass update with MM02, and SAP's own mass maintenance transactions, MASS and MM17 among them, in the section on SAP mass maintenance below.
How PostNow.ai runs an SAP mass change from Excel
PostNow.ai adds Mass Change to a template that already posts to SAP. A designer sets it up once on that template and publishes it; operators then download, edit and post, each with their own SAP login on their own computer.
- Start from a change template. The template calls something that changes records: a change BAPI such as
BAPI_MATERIAL_SAVEDATA, a recording of a change transaction such asXK02, or a change service in API mode. Mass Change runs on templates with one row per record, which is how master data changes are built. - Name the source tables. In the Mass Change dialog, enter the SAP tables that hold the current values, for example
LFB1for vendor company code data. When you add a second table, PostNow.ai proposes the join from the SAP data dictionary, foreign keys first. Suggest from template fills the tables from the template's own SAP fields. - Bind the columns. Each template column gets a table field and a role. Key Field identifies the record, such as vendor and company code. Download is pulled from SAP, can be edited, and is what the review compares. Skip is left for manual input and is not compared. Fixed values and system variables stay in the template and are applied when the run starts.
- Set the criteria and download. Filter with SAP-style operators (equal to, between, matches pattern, any of a list), including a list read from an Excel range. Max rows starts at 100, a preview fills the first 100 rows, and a download above 500 rows asks for confirmation. Before reading, PostNow.ai checks in SAP that your user may read those tables and applies your organisational restrictions. The values land in the template's columns, and a snapshot of them is kept on a hidden sheet in the workbook.
- Edit in Excel. Overwrite values, paste them, or fill them with a formula such as
XLOOKUPagainst the list the business sent. Leave the Key Field columns as they are, and keep every row where the download put it. - Review changes, then update. Review changes compares each Download cell with the snapshot and lists the changed rows, every changed cell as the old value next to the new one, under a count such as "152 changed of 180 rows". Update changed rows posts the listed rows through the template's normal run engine. If an approval policy covers the template, the posting waits for an approver like any other run.
- Read the results, then re-download. Each posted row gets SAP's message, with the SAP user, time and system, in its Run Log cell. Retry Failed re-posts the rows marked ERROR. Before the next round of changes, choose Re-download for the next cycle so the snapshot matches SAP again.
When the template is published, operators open Mass Change on the criteria step: they fill in the values of the designer's filters and download. Tables, bindings and filter fields stay as the designer set them, and the row limit cannot go above the designer's cap.
What an SAP mass update from Excel involves
An SAP mass update from Excel changes existing records through the same interface SAP uses for a single change, once per row. In PostNow.ai each changed row reaches SAP by one of three routes, set by the template:
| Route | What PostNow.ai calls | Where it fits | What to get right |
|---|---|---|---|
| Change BAPI | The object's change BAPI, for example BAPI_MATERIAL_SAVEDATA, BAPI_PO_CHANGE, BAPI_SALESORDER_CHANGE | Objects with a released change BAPI that covers the fields you change | The change flags (X structures), described in the next section |
| Recorded change transaction | A recording of the change transaction, for example XK02 for vendors in ECC, replayed per row | Fields that no change BAPI reaches, or teams that work from the screens they know | Which screens and fields the recording sends |
| API mode change service | The change operation of an OData or SOAP service | S/4HANA objects whose released APIs offer an update | That the template uses the service's update operation |
Three things make a change harder than a create:
- Identity. The key columns must point at a record that exists. Some change BAPIs also create:
BAPI_MATERIAL_SAVEDATAis SAP's "create and change" BAPI for the material master, so a plant key edited to a new plant extends the material instead of changing it. That is why key columns are never edited on the sheet. - The value you replace. Once SAP saves the new value, the old one survives only in SAP's change documents and in your download. Keep the download.
- Which fields you meant. A change interface has to know which fields to touch and which to leave alone. For BAPIs that is the job of the change flags; for recordings, the fields the recording sends.
Pull, edit, post: the mass change loop
The loop's job is to find the rows someone changed before anything goes to SAP. PostNow.ai compares the Download columns with the snapshot taken at download, cell by cell, in Excel, and the review lists the rows that differ.
| What happened in the sheet | How PostNow.ai treats it |
|---|---|
A value was overwritten, for example payment terms 0030 → 0045 | Changed: the row is posted |
Excel re-formatted a number, for example 10.50 shown as 10.5 | Not a change: numbers that are equal count as equal |
| Trailing spaces were added or removed | Not a change |
Only the case differs, for example abc → ABC | Changed: the comparison is case-sensitive, as SAP values are |
| A Key Field cell was edited | Not compared: key columns identify the record and are posted as they stand |
| A value was typed only into a Skip column | Not compared: the row is listed only if one of its Download cells differs |
| Rows were inserted or deleted after the download | The rows below no longer line up with their snapshot rows. On a template with two or more Download columns, the review spots the pattern (many rows changed in every column), stops, and asks you to run Download again. Keep rows in place and this never comes up |
| Nothing differs from the snapshot | Nothing is posted: "No changes detected since the download" |
A changed row is posted whole: the edited cells with their new values, and every other mapped column with the value it holds in the sheet, which for downloaded columns is the value SAP had at download time. Download close to the posting, so those values are still current.
Change flags: why an untouched field stays untouched
PostNow.ai sets the change flag for every field the template maps, so a change BAPI updates the mapped fields and leaves the rest of the record as it is.
The mechanism is SAP's. A change BAPI's data parameter has a twin with an X at the end and the same field names, for example PLANTDATA and PLANTDATAX in BAPI_MATERIAL_SAVEDATA, or POITEM and POITEMX in BAPI_PO_CHANGE. Each flag field is one character (data element BAPIUPDATE): X means "this field carries a new value", blank means "leave it". SAP added the flags because an initial value can be a valid new value, so the value alone cannot say whether a field should change (SAP Help).
- Flags follow the mapping. When a designer enables a field in the BAPI designer, PostNow.ai fills its flag with
X; Review update flags lists any mapped field still missing one, with Set X for all. - Key fields in the X twin are copied, not flagged. Fields such as
PO_ITEMinPOITEMXmust carry the same item number as the data row. PostNow.ai copies them from the data row when the run starts. - Unmapped fields are not sent. Their flags stay blank, so SAP keeps their values. The same holds for recordings: a field the template does not map is not sent to the screen.
- Some BAPIs also want an update indicator.
BAPI_SALESORDER_CHANGE, for example, expectsUPDATEFLAG=UinORDER_HEADER_INXand in eachORDER_ITEM_INXline you change. Set it as a fixed value in the template; Review update flags covers the per-field X flags.
What an empty cell does in a mass change
On a posted row, an empty cell in a mapped column clears that field in SAP. In a BAPI template the field goes to SAP without a value but with its flag set to X, which is SAP's instruction to set it to initial; a Default Value set on the column in the template replaces the blank. In a recording, the mapped screen field is filled with a blank, which overwrites what the screen showed.
| Cell on a posted row | What SAP receives | Result |
|---|---|---|
| Download column you emptied on purpose | The field, empty, flagged for change | The value is removed, which is the right way to clear a field in bulk |
| Download column SAP already had empty | The field, empty, flagged for change | No change: empty stays empty |
| Skip column nobody filled | The field, empty, flagged for change | The value in SAP is cleared. Bind the column as Download, fill it, or remove it from the template |
| Field not mapped in the template | Nothing | SAP keeps the value |
MM04, XD04 or XK04 show exactly which fields SAP changed.Row-level results and retrying failed rows
PostNow.ai writes SAP's answer into the Run Log cell of every posted row: a status line with SAP's message, then the SAP user, time and system. After an Update changed rows run, only the posted rows get a new entry, so the Run Log shows at a glance which records this change touched.
| Run Log shows | Meaning | What to do |
|---|---|---|
| SAP's success message | SAP saved the change for that record | Nothing. The Run Log cell and SAP's change document both record it |
| ERROR with SAP's message | SAP refused the row, for example a value not allowed for the field, or a record another user was editing at that moment | Fix the cell, or wait for the lock to clear, then Retry Failed |
| UNKNOWN | The row reached SAP but the answer was lost, so it may have been saved | Display the record in SAP first; Retry Failed leaves UNKNOWN rows alone |
Retry Failed re-posts only the rows whose Run Log starts with ERROR. Each real run is also sent to the posting audit in the PostNow.ai portal, with the same message per row that the Run Log cell shows.
Worked example: new payment terms for 180 vendors in company code 1010
PostNow.ai handles this with one published template, a recording of XK02 on an ECC system that opens the vendor's company code payment data and saves. Procurement has renegotiated terms and sends a list of 180 vendors in company code 1010 with their new payment terms key.
- Binding. The designer's Mass Change setup reads table
LFB1: vendor (LIFNR) and company code (BUKRS) as Key Fields, payment terms (ZTERM) as Download. The only field the recording sends besides the keys is the payment terms. - Download. The AP clerk pastes the 180 vendor numbers into a spare column, sets the criteria to company code equal to
1010and vendor "any of" that range, and raises Max rows to 200, within the designer's cap. 180 rows arrive with today's terms. - Edit. An
XLOOKUPagainst procurement's list fills the new terms. 28 vendors are already on the new terms, so their cells do not change. - Review. The review shows "152 changed of 180 rows"; row 7, vendor
100045, reads00300045. One row shows an empty new value, because that vendor is missing from procurement's list and the lookup's not-found value is an empty string. The clerk restores0030before posting, because an empty cell would clear the terms. - Post. A second review now reports 151 changed rows, and Update changed rows posts them.
- Results. 149 rows show SAP's save message. Two show ERROR because a colleague had those vendors open in
XK02. Ten minutes later, Retry Failed posts both. - Proof. Re-download for the next cycle pulls the 180 vendors again, and the review reports no changes: SAP now holds exactly what the sheet holds.
The 29 vendors whose terms stayed the same were never sent to SAP, and their change documents show nothing from this run.
When SAP's own mass maintenance is enough
PostNow.ai Mass Change fits when each record gets its own value from a list. SAP's mass maintenance transactions are enough when one new value goes to every selected record and the field is part of the mass object.
| Tool | Object | Fits when |
|---|---|---|
| PostNow.ai Mass Change | Any record the template's change BAPI, recording or API service reaches | Values differ per record, come from a business list, or need a review of old against new before posting |
MM17 | Material master | One value for a selection of materials, in fields the mass object exposes |
XD99 / XK99 | Customer and vendor master in ECC | One value across many customers or vendors; on S/4HANA, check the Business Partner route first |
MEMASSPO | Purchase orders (BUS2012) | The same field change across many orders |
MEMASSRQ | Purchase requisitions (BUS2105) | The same header or item field change across many requisitions |
MEMASSIN | Purchasing info records (BUS3003) | One value across many info records, in the general or purchasing organisation data |
MEMASSSA / MEMASSCONTRACT | Scheduling agreements and contracts | The same header or item field change across many outline agreements |
KS12 | Cost centers | One value across a selection of cost centers, for a validity period you enter; KS13 displays a selection |
MASS | Any object with a mass maintenance object type | Objects without their own mass transaction, for example sales orders (BUS2032) |
| LSMW | Objects with a recording or a standard import method | A file-based change program a consultant builds and runs; see LSMW in SAP |
On S/4HANA, MM17 and MASS work as in ECC. Customer and vendor general data is maintained on the Business Partner, so check the object list before planning on XD99 or XK99: open MASS and press F4 on the object type to see what your release offers. SAP Fiori also offers mass maintenance apps for some objects, the product master among them, built on the same selection-and-value principle. The MM17 walkthrough, step by step, is in material master mass update with MM02 and MM17.
Where SAP mass maintenance stops
- No creates. The mass transactions change records that exist. Creating a record, or extending a material to a new plant, storage location or sales area, goes through
MM01,BPor a BAPI. - Only the fields the mass object exposes. Each object offers a subset of the transaction's fields; if a field is not on the change screen, the mass transaction cannot change it.
- One value across the selection. The transactions set one new value for many records. A different value per record means typing cells one by one.
- Long texts and classification sit outside it. They are maintained in their own transactions, classification for example in
CLMM.
Six mistakes in an SAP mass maintenance run
- Selecting by attribute. "All materials of type ROH in plant 1200" can include records nobody meant; select by key from a reviewed list.
- Leaving the organisational level blank. With no plant in the selection, a
MARCfield change reaches every plant the material exists in. - Stopping before the end of the log. Partial success is normal, and the log is the only list of records that did not change.
- No before extract. Change documents hold old values record by record; a list of old values for the whole run exists only if you extract one first.
- Production first. Run the change in the quality system, on the same selection, before production.
- Using it for a create. The transaction will not create a record, so plan a create as its own load.
Reverse and audit an SAP mass change
PostNow.ai reverses a mass change the way it made it: by posting the old values back through the same template. A master data change has no reversal document, so the old values have to come from somewhere, and the best source is the download itself.
- Save a copy of the workbook straight after Download. It holds every record's value before the change and is the before-image for the run.
- To reverse, re-download the same records, paste the old values from the copy into the Download columns, and open the review: it lists exactly the rows going back, old value against new.
- Post with Update changed rows, then re-download once more to confirm SAP holds the old values again.
SAP keeps its own trail. For fields set to write change documents, each save records the old and new value with user and time (tables CDHDR and CDPOS), and MM04, XD04 and XK04 display them per material, customer or vendor. On the PostNow.ai side, every posted row carries SAP's message, the SAP user, time and system in its Run Log cell, the run goes to the portal's posting audit, and a template under an approval policy posts only after an approver has released that run.
Checklist before an SAP mass change from Excel
PostNow.ai finds the changed rows and writes SAP's answer to each one; this list covers the decisions that stay with the team.
- The template calls a change interface: a change BAPI, a recording of a change transaction, or an API change service.
- Only the fields this change should touch are mapped; anything else is removed or bound as Download.
- In a BAPI template, Review update flags shows no mapped field without its
X. - The Key Fields identify one record per row, for example vendor and company code, or material and plant.
- The criteria select exactly the population, and a preview of the first 100 rows looks right.
- A copy of the workbook was saved straight after Download.
- No rows were inserted, deleted or sorted after Download.
- Every empty cell in the review is meant to clear its field.
- One record was posted in a test client and checked in its change documents.
- The owner of the data has seen the review count and the list of changes, and the posting starts from that review with Update changed rows.
What to plan for in an SAP mass change
PostNow.ai posts each changed row through SAP's own change logic, so SAP's checks, locks and change documents apply to every record exactly as in a manual change.
- Download close to the posting. The comparison is with the snapshot, and the unchanged columns of a posted row carry their download-time values. Same-day download and posting keeps those values current.
- Keep rows where the download put them. Filter to find rows; filtering hides rows without moving them. To work in a different order, download again with other criteria.
- One row per record. Mass Change templates carry one record per row; for item-level changes, use one row per item with the document number repeated.
- Install the read function once. The download runs through PostNow.ai's read function in SAP,
ZPOSTNOW_READ_JOIN, which checks each user's table authorisation. Basis transports it once per system, like other Z objects. - Size the batches. Split a large population by criteria, such as company code or plant, into runs of a few hundred records; the download asks for confirmation above 500 rows.
- Decide who releases the change. For a change that needs a second pair of eyes, put the template under an approval policy in the PostNow.ai portal; each Mass Change post then waits for an approver before it reaches SAP.
Making a template like this repeatable for a team, with designers who build, operators who only run and a central library, is covered in Excel to SAP automation.
SAP mass change on S/4HANA
PostNow.ai runs the same loop on S/4HANA; what changes is the interface behind some objects.
- Customers and suppliers are Business Partners.
XD02andXK02lead to transactionBP, so a change template uses a Business Partner interface, such asBAPI_BUPA_CENTRAL_CHANGEfor central data or a released Business Partner API in API mode. - Material numbers can be 40 characters. Where a BAPI offers
MATERIAL_LONGnext toMATERIAL, map the long field once the extended material number is active. - Read the same tables.
LFB1,KNB1,MARCand the other master data tables are still there to download from, so a binding built on ECC usually carries over; prove it on a few records first.
