PP Report Custom development ALV report

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

Short answer: 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.

Estimated effort
M · 4–6 working days
System
ECC and S/4HANA
Tables
8
Scope
Global
Built by
NeKuDos Teknoloji
Last updated

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.

Who uses it? Product engineering and R&D teams, production planners, master data owners and buyers who manage supplier or part changes.

Closest standard alternatives

  • CS15 Single-Level Where-Used List. Shows single- or multi-level where-used per component; open orders and a flat path list are missing.
  • COOIS Production Order Information System. Lists open production orders, but does not start from a component's where-used.

Tables used

The tables the report reads and their join fields. ECC and S/4HANA differences are marked separately.

TableRoleJoinSystem
STPOBOM ItemBOM items: component, quantity, validity (driving table)—ECC + S/4
STKOBOM HeaderBOM header: alternative, status, deletion indicatorSTKO-STLTY = STPO-STLTY AND STKO-STLNR = STPO-STLNRECC + S/4
MASTMaterial to BOM LinkParent material, plant and usage of the BOMMAST-STLNR = STKO-STLNR AND MAST-STLAL = STKO-STLALECC + S/4
MARCPlant Data for MaterialSpecial procurement type for phantom detectionMARC-MATNR = MAST-MATNR AND MARC-WERKS = MAST-WERKSECC + S/4
AFPOOrder ItemOpen production order items of the top-level materialAFPO-MATNR = MAST-MATNR AND AFPO-DWERK = MAST-WERKSECC + S/4
AUFKOrder Master DataOrder object number (for the status check)AUFK-AUFNR = AFPO-AUFNRECC + S/4
JESTIndividual Object StatusExcludes technically completed and deleted ordersJEST-OBJNR = AUFK-OBJNRECC + S/4
MAKTMaterial DescriptionsComponent and material descriptionsMAKT-MATNR = STPO-IDNRK / MAST-MATNR AND MAKT-SPRAS = SY-LANGUECC + S/4

Selection screen parameters

ParameterDescriptionTypeReference fieldRequiredExample
S_IDNRKComponentRange / multipleSTPO-IDNRKYesRM-2040
S_WERKSPlantRange / multipleMAST-WERKSYes1000
S_STLANBOM usageRange / multipleMAST-STLANNo1
P_DATUVKey dateSingle valueSTPO-DATUVYes17.11.2026
P_LEVELMaximum levelsSingle value—No6
P_OPENOnly top-level materials with open ordersCheckbox—NoX
P_PHANTShow phantom assemblies as a separate levelCheckbox—No—

Output columns

#ColumnSource
1ComponentSTPO-IDNRK
2Component descriptionMAKT-MAKTX
3PlantMAST-WERKS
4LevelCalculated BOM levels counted from the component up to the top-level material
5Direct parentMAST-MATNR
6Top-level materialCalculated Last link of the path: a material that is not a component of another BOM
7Top-level descriptionCalculated MAKT-MAKTX of the top-level material
8PathCalculated Material numbers from the component to the top level, separated by ' > '
9Item quantitySTPO-MENGE
10UnitSTPO-MEINS
11Quantity per top-level unitCalculated Product of STPO-MENGE ÷ STKO-BMENG along the path
12Phantom on pathCalculated X when an assembly on the path has MARC-SOBSL = '50'
13Valid fromSTPO-DATUV
14BOM usageMAST-STLAN
15Open ordersCalculated Number of AFPO items of the top-level material with ELIKZ blank and no TECO
16Open order quantityCalculated Σ (AFPO-PSMNG − AFPO-WEMNG)

Sample output

ComponentComponent descriptionPlantLevelDirect parentTop-level materialTop-level descriptionPathItem quantityUnitQuantity per top-level unitPhantom on pathValid fromBOM usageOpen ordersOpen order quantity
RM-2040Steel sheet 2 mm10002SA-3100FG-5003Packed product CRM-2040 > SA-3100 > FG-50031.80KG3.6003/01/2026141,250
RM-2040Steel sheet 2 mm10003PH-3150FG-6100Panel cabinet 80 cmRM-2040 > PH-3150 > SA-3200 > FG-61002.40KG4.80X05/15/202612300
RM-3220Gasket set 12 pcs10001FG-6100FG-6100Panel cabinet 80 cmRM-3220 > FG-61001PC111/01/202512300
RM-3220Gasket set 12 pcs20002SA-4010FG-7200Compressor unit K2RM-3220 > SA-4010 > FG-72002PC401/10/2026100
A view built with fictional sample data; not real system data.

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.

Performance notes

Read STPO by IDNRK; a standard secondary index exists for STPO-IDNRK. Process each level with one FOR ALL ENTRIES read instead of one SELECT per material. For mass runs with thousands of components keep the level limit at 5–6 and run the report in the background.

Features

  • ALV list (sort, filter, subtotals)
  • User-specific layout variants
  • Double-click drill-down to the document The component and parent open CS03; the open order count opens the COOIS list of those orders.
  • Export to Excel
  • Runs as a background job

Authorization objects

  • C_STUE_WRKDisplay BOMs by plant
  • C_STUE_BERDisplay BOMs by BOM authorization group
  • C_AFKO_AWKDisplay 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.

Related reports

PP Program Custom Mass upload

Mass BOM Component Replacement Upload Program

A custom program that replaces, adds or deletes components or updates quantities in many material BOMs from Excel or CSV rows. Validity is set with a …

MAST · STKO · STPO · MARA

Let us build this report for your system

Briefly describe your system and expectations. We will clarify the scope and come back with an effort and price quote.

Related report: Multi-Level BOM Where-Used Report with Open Production Orders