# Multi-Level BOM Where-Used Report with Open Production Orders

> A custom ALV report that shows in which assemblies and, at the top, in which finished goods one or more components are used, as a flat list that includes intermediate levels and phantom assemblies. For every top-level material the number of open production orders and the remaining order quantity are on the same line, so the impact of a component change on open orders is visible in one run.

- Type: Report, Custom development, ALV report
- Module: PP
- Estimated effort: M (4–6 working days)
- Last updated: 2026-11-17
- URL: https://nekuhub.com/en/reports/multi-level-bom-where-used-report-with-open-orders/


## Why is the standard not enough?

The CS15 where-used list evaluates components one at a time; running several components in one list and exporting the result to Excel as a flat table is tedious. In the multi-level view the path between the top-level material and the component is not written on one line, phantom assemblies look like a normal level and open production orders are not in the list. Before an engineering change, users move between CS15, CS12 and COOIS to answer 'which finished goods and which open orders does this part touch'. The custom report combines these three steps in one list.

### Closest standard alternatives

- CS15: Shows single- or multi-level where-used per component; open orders and a flat path list are missing.
- COOIS: Lists open production orders, but does not start from a component's where-used.

## Tables used

| Table | Role | Access | Join | System |
|---|---|---|---|---|
| STPO | BOM items: component, quantity, validity (driving table) | Read | - | ECC + S/4 |
| STKO | BOM header: alternative, status, deletion indicator | Read | STKO-STLTY = STPO-STLTY AND STKO-STLNR = STPO-STLNR | ECC + S/4 |
| MAST | Parent material, plant and usage of the BOM | Read | MAST-STLNR = STKO-STLNR AND MAST-STLAL = STKO-STLAL | ECC + S/4 |
| MARC | Special procurement type for phantom detection | Read | MARC-MATNR = MAST-MATNR AND MARC-WERKS = MAST-WERKS | ECC + S/4 |
| AFPO | Open production order items of the top-level material | Read | AFPO-MATNR = MAST-MATNR AND AFPO-DWERK = MAST-WERKS | ECC + S/4 |
| AUFK | Order object number (for the status check) | Read | AUFK-AUFNR = AFPO-AUFNR | ECC + S/4 |
| JEST | Excludes technically completed and deleted orders | Read | JEST-OBJNR = AUFK-OBJNR | ECC + S/4 |
| MAKT | Component and material descriptions | Read | MAKT-MATNR = STPO-IDNRK / MAST-MATNR AND MAKT-SPRAS = SY-LANGU | ECC + S/4 |

## Selection screen parameters

| Parameter | Description | Type | Reference field | Required |
|---|---|---|---|---|
| S_IDNRK | Component | Range / multiple | STPO-IDNRK | Yes |
| S_WERKS | Plant | Range / multiple | MAST-WERKS | Yes |
| S_STLAN | BOM usage | Range / multiple | MAST-STLAN | No |
| P_DATUV | Key date | Single value | STPO-DATUV | Yes |
| P_LEVEL | Maximum levels | Single value | - | No |
| P_OPEN | Only top-level materials with open orders | Checkbox | - | No |
| P_PHANT | Show phantom assemblies as a separate level | Checkbox | - | No |

## Output columns

| Column | Source |
|---|---|
| Component | STPO-IDNRK |
| Component description | MAKT-MAKTX |
| Plant | MAST-WERKS |
| Level | Calculated: BOM levels counted from the component up to the top-level material |
| Direct parent | MAST-MATNR |
| Top-level material | Calculated: Last link of the path: a material that is not a component of another BOM |
| Top-level description | Calculated: MAKT-MAKTX of the top-level material |
| Path | Calculated: Material numbers from the component to the top level, separated by ' > ' |
| Item quantity | STPO-MENGE |
| Unit | STPO-MEINS |
| Quantity per top-level unit | Calculated: Product of STPO-MENGE ÷ STKO-BMENG along the path |
| Phantom on path | Calculated: X when an assembly on the path has MARC-SOBSL = '50' |
| Valid from | STPO-DATUV |
| BOM usage | MAST-STLAN |
| Open orders | Calculated: Number of AFPO items of the top-level material with ELIKZ blank and no TECO |
| Open order quantity | Calculated: Σ (AFPO-PSMNG − AFPO-WEMNG) |

## How does the report work?

1. Material BOM items (STLTY = 'M') are read from STPO for the components on the selection screen; deleted items (LKENZ) and items not valid on the key date (DATUV after the key date, or superseded by a newer change record) are skipped.
2. Through STPO-STLNR the STKO header (alternative, status STLST, deletion indicator LOEKZ) is read, and MAST gives the parent material, plant and usage (STLAN) the BOM belongs to.
3. The parent material is searched as a component in the next pass, until the selected level limit is reached or a material without further where-used is found. For recursive BOMs the visited materials are kept and a repeating path is cut.
4. At each level, assemblies with MARC-SOBSL = '50' are flagged as phantom assemblies; quantities are multiplied along the path to get the component quantity needed for one unit of the top-level material.
5. For the top-level materials, open production order items are read from AFPO (ELIKZ blank, TECO I0045 or the deletion flag I0076 not active on AUFK-OBJNR); the number of orders and the remaining quantity (PSMNG − WEMNG) are summed.
6. The result is listed as one line per component – top-level path; when 'only with open orders' is selected, paths without open orders are hidden.

## Authorization objects

- C_STUE_WRK: Display BOMs by plant
- C_STUE_BER: Display BOMs by BOM authorization group
- C_AFKO_AWK: Display open production orders by plant and order type

## Frequently asked questions

### How are phantom assemblies shown?

Because a phantom assembly is not produced on its own, it is kept as a link in the path and flagged in the 'Phantom on path' column. The quantity calculation ties the components below the phantom directly to the parent; if preferred, the phantom level can be hidden from the list completely.

### What happens if there are several alternative BOMs?

Each alternative (MAST-STLAL) is evaluated as a separate path and the alternative number is shown on the line. Showing only the alternatives used in a production version can be added as an optional filter.

### Does the report work on S/4HANA?

Yes. STPO, STKO, MAST and AFPO keep the same structure in S/4HANA. For a clean core approach it can also be built on released CDS views for BOMs and production orders.

---
Let us build this report for your system: https://nekuhub.com/en/request-a-quote/?report=pp-bom-where-used-open-orders
