SAP bill of material automation is the practice of building material BOMs from a spreadsheet, each parent with its components beneath, rather than keying every line into CS01. PostNow runs it from Excel: each component is a row, and the add-in posts them with the standard CSAP_MAT_BOM_CREATE function module, gathering components under their parent, checking the values, and committing in one run, with any SAP error rendered in plain language.
This is a twelve-step worked example of creating bills of material from Excel to SAP, parent materials with their full component lists, built in one run. Keep the mapping, the component grouping included, and you have a BOM Excel template ready for the next product or engineering change. It works on classic ECC and on S/4HANA, where production still maintains BOMs behind CS01 and the same function. Once setup is done the first time, the people loading BOMs need no ABAP and no developer.
Why create bills of material from Excel instead of keying CS01
Building a BOM manually in CS01 means choosing the parent material, plant, and usage, then adding each component with its item category, quantity, and unit, line after line. A short BOM is quick. A finished product with dozens of parts, a new plant's product range, or a migration of an engineering library becomes hundreds of components keyed one at a time, and a wrong item category or a missing component only shows once the line is rejected.
Creating bills of material from Excel changes the work. The structures already sit in a spreadsheet, an engineering export or a planning file, and post to SAP, each parent with its components, in one run. For a routine bulk BOM upload or a one-off mass bill of material load, the awkward parts, picking the function, mapping the header and component fields, getting item categories and quantities right, and reading CS messages, are taken care of. The twelve steps below map out the whole flow.
Before you start: what you need
- Your BOMs in Excel, one component per row, with a shared parent material so the components group into one BOM.
- SAP authorization to maintain BOMs, the access you would use for
CS01, across the plants and BOM usages you are building. - PostNow in Excel, connected straight to your SAP system. Its function modules are registered in SAP a single time with your Basis or ABAP team, after which the BOM runs happen from the task pane.
Your BOM Excel template: the fields SAP expects
A BOM has a parent material at the header and a component on each item line. These are the fields a BOM run depends on; carry them, and confirm the parent material, components, and plant they name already exist.
| Excel column | SAP field | Why it matters |
|---|---|---|
| Parent material | MATERIAL | Header; the material the BOM describes |
| Plant / BOM usage | PLANT / BOM_USAGE | Where it applies and its usage, 1 for production |
| Valid from | VALID_FROM | The date the BOM takes effect |
| Base quantity | BASE_QUAN | Header (STKO_API01); the quantity the BOM is built for |
| Component | COMPONENT | Item; the part that goes into the parent |
| Item category / quantity | ITEM_CATEG / COMP_QTY | L for stock, N for non-stock, and how much is used |
CSAP_MAT_BOM_CREATE creates a material BOM from the parent material, plant, and BOM usage, a header structure STKO_API01 carrying the base quantity and unit, and a component table STPO_API01 whose rows hold each item's category, component, and quantity. It is a function module rather than a classic BAPI, returns the new BOM number, and is persisted with COMMIT WORK. Step 2 has PostNow's function finder pick the function, pull its structures in, and take care of the commit.The bill of material run, step by step
Lay out and open your sheet
Put each component on a row under headers like Parent Material, Plant, BOM Usage, Valid From, Component, Quantity, and Item Category, with a shared Parent Material so the components group into one BOM. Open the workbook and dock the PostNow task pane to one side.
Choose the BOM function
A standard interface does the work, so nothing is recorded. In the function finder, pick the one you need:
- Take
CSAP_MAT_BOM_CREATE, which builds a material BOM with its components in one call - It is a function module rather than a classic BAPI, so it is persisted with
COMMIT WORKrather than the transaction commit - The parent and header sit alongside the component table, so one call carries the whole structure
Confirm the function and PostNow brings in its header and component structures, ready to line up with your columns, so CS01 stays shut.

Look over the structures it returns
What comes back is the parent, a header structure, a table of components, and the result. Because it mirrors how a BOM is built, a glance shows what belongs to the parent and what belongs to each component:
That tells you, before any mapping, which columns describe the parent and which repeat per component.
Open the Mapping Designer
Choosing the function loads the Mapping Designer with a line for each header and component field. Two things matter here:
- Extensions are detected. Append fields your system adds to the BOM structures are pulled in automatically.
- You can add your own. Anything overlooked you place manually, so standard and custom fields ride in one run.

Match columns with Mapping AI AI
Now align the structures with your data. Mapping AI proposes an Excel column for each header and component field, reading your headers or a screenshot you drop in, and you confirm or adjust, useful when a BOM brings parent data alongside a list of components.

Auto Map and group components under a parent
Run Auto Map to settle the mapping and write SAP-tagged headers across the sheet. Because a BOM gathers several components, this is where you set the grouping: rows sharing a parent material build one BOM, the header read once and the component rows read as items. The workbook is the template after this, and the grouping is carried with it.


Set formatting and defaults
A field's properties steer how its value posts: leading zeros on the material numbers, upper case on codes, a date format on the valid-from date, the right decimals on the component quantity, defaults for a constant plant or usage, and regex. Getting the quantity decimals right keeps each component consuming the amount the BOM intends.
Check the rows in Excel first
Best to check before posting: a CS error usually shows up as a short code once a BOM has already failed. Validate brings the check upstream, every row is held against SAP's length, format, and required-field rules and the problem cells are flagged, so the sheet is sound before any BOM is sent.

Confirm against live SAP
Clean formatting is no proof a value exists, a component can read fine and not be extended to the plant. To confirm it, open the field's properties, switch on field validation, and set the check table and field, a parent material or component against MARA, a plant against T001W, or a BOM usage against its configuration. Select the cell, run Validate master data, and PostNow asks live SAP whether the value is present and usable.
Group components into BOMs with loops
A parent with its components is a natural header/detail case, so this is where the structure pays off:
- Header/detail loops: rows sharing a parent material collapse into one BOM, the header taken once and each component added as an item.
- IF conditions: include only the components you want, for example loading a line only where a quantity is present, or skipping rows flagged as superseded.
Set the scope, post, and review AI
Set the range with Run Scope, one BOM first, then the rest, and press Run. A few aids:
- Run log: results land live and write into a log column beside each row in Excel.
- Payload view: open the exact data sent to SAP for any BOM, parent and components together, so a failure is never a guess.
- AI error review: AI Review reads the CS message and explains, plainly, what blocked the BOM and where to look.
- BOM number: PostNow writes the new BOM number back beside the parent it belongs to.
Publish and roll it out to the team
Once the run is clean and verified, publish. The configuration, grouping and all, becomes a script engineering and planning run unchanged, they open it, paste their BOMs, and post, with no mapping to rebuild and no need to know the function underneath. A one-time build becomes the standard way to load product structures.
Let's talk
Bring a real product structure and a live SAP connection to a working session. We will group the components under their parent, map, validate, and build the BOMs for real, with AI taking the strain. No slide decks.
Frequently asked questions
What is SAP bill of material automation?
CS01. With PostNow the BOMs stay in Excel and post in one governed run via the standard CSAP_MAT_BOM_CREATE function module, while AI maps the fields, checks the values, and explains any CS error.How do you create bills of material in SAP from Excel?
CSAP_MAT_BOM_CREATE, groups components under their parent, and commits the BOM, so there is no CS01 keying and no ABAP.Which function creates SAP bills of material?
CSAP_MAT_BOM_CREATE creates a material BOM from the parent material, plant, and BOM usage, a header structure STKO_API01 with the base quantity, and a component table STPO_API01 holding each item, its category, component, and quantity. It is a function module rather than a classic BAPI, returns the BOM number, and is saved with COMMIT WORK, which PostNow handles for you.